[Plugin] Claude Code Plugin + Script to automatically keep it in sync with the GHCPCLI Plugin.#569
Open
Jaylyn-Barbee wants to merge 5 commits into
Open
[Plugin] Claude Code Plugin + Script to automatically keep it in sync with the GHCPCLI Plugin.#569Jaylyn-Barbee wants to merge 5 commits into
Jaylyn-Barbee wants to merge 5 commits into
Conversation
…i-schema.json Running generate-llm-docs.ps1 against a stale 0.3.2 CLI binary regenerated auto-generated tables and reverted recent description edits. Restore these generated files to origin/main and re-run sync-claude-plugin.ps1 so .claude/ mirrors the correct content. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Build Metrics ReportBinary Sizes
Test Results✅ 1192 passed, 1 skipped out of 1193 tests in 460.9s (-7.8s vs. baseline) Test Coverage❌ 17.2% line coverage, 36.3% branch coverage · ✅ no change vs. baseline CLI Startup Time42ms median (x64, Updated 2026-06-05 20:24:00 UTC · commit |
The sync script wrote the agent file via Set-Content -Encoding utf8, which produces UTF-8 BOM + CRLF on PowerShell 5 and UTF-8 no-BOM on PowerShell 7, and .gitattributes had no eol=lf rule for .claude/** or .github/plugin/agents/**. Together these meant sync-claude-plugin.ps1 -Check could trip false-positive drift across Windows vs Linux contributors and CI. Fix: - sync-claude-plugin.ps1: write the agent with [File]::WriteAllText + UTF8 no-BOM and explicit LF normalization, matching the convention in generate-llm-docs.ps1. - .gitattributes: force eol=lf for .claude/** and .github/plugin/agents/** so the on-disk bytes match what the sync writes on every platform. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a Claude Code-compatible plugin tree under .claude/ that mirrors the existing Copilot plugin under .github/plugin/, and wires a sync step into the existing docs generation pipeline so the two stay aligned.
Changes:
- Added
scripts/sync-claude-plugin.ps1to regenerate.claude/{skills,agents}from.github/plugin/(including stripping the Copilot-onlyinfer:frontmatter field from agents). - Updated
scripts/generate-llm-docs.ps1,.gitattributes, andAGENTS.mdto treat.claude/as a generated, checked-in output kept in sync by the standard build/docs workflow. - Added the generated
.claude/agents/winapp.mdand.claude/skills/**content for Claude Code consumption.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/sync-claude-plugin.ps1 | New sync script that rebuilds .claude/ from .github/plugin/ |
| scripts/generate-llm-docs.ps1 | Hooks Claude sync into the existing LLM docs + skills generation pipeline |
| AGENTS.md | Documents .claude/ as an auto-generated output |
| .gitattributes | Enforces LF endings for .github/plugin/agents/** and .claude/** |
| .claude/agents/winapp.md | Generated Claude agent mirror of the Copilot agent |
| .claude/skills/winapp-ui-automation/SKILL.md | Generated Claude skill mirror |
| .claude/skills/winapp-ui-automation/references/ui-json-envelope.md | Generated reference doc mirror |
| .claude/skills/winapp-troubleshoot/SKILL.md | Generated Claude skill mirror |
| .claude/skills/winapp-signing/SKILL.md | Generated Claude skill mirror |
| .claude/skills/winapp-setup/SKILL.md | Generated Claude skill mirror |
| .claude/skills/winapp-package/SKILL.md | Generated Claude skill mirror |
| .claude/skills/winapp-manifest/SKILL.md | Generated Claude skill mirror |
| .claude/skills/winapp-identity/SKILL.md | Generated Claude skill mirror |
| .claude/skills/winapp-frameworks/SKILL.md | Generated Claude skill mirror |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+131
to
+134
| if ($diff) { | ||
| Write-Error ".claude/ is out of date. Run: pwsh scripts/sync-claude-plugin.ps1" | ||
| exit 1 | ||
| } |
Comment on lines
+85
to
+89
| $skillName = Get-FrontmatterName -Path $skillFile | ||
| $destDir = Join-Path $tmpSkills $skillName | ||
| Copy-Item -LiteralPath $skillDir.FullName -Destination $destDir -Recurse | ||
| Write-Host "skill : $($skillDir.Name) -> .claude/skills/$skillName" | ||
| } |
Comment on lines
+306
to
+313
| $syncScript = Join-Path $PSScriptRoot 'sync-claude-plugin.ps1' | ||
| if (Test-Path $syncScript) { | ||
| Write-Host "`n[CLAUDE] syncing .claude/ from .github/plugin/" -ForegroundColor Gray | ||
| & $syncScript | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Error "sync-claude-plugin.ps1 failed (exit $LASTEXITCODE)" | ||
| exit $LASTEXITCODE | ||
| } |
Comment on lines
+105
to
+121
| ### Add an execution alias | ||
|
|
||
| Execution aliases let users launch the app by typing its name in a terminal (e.g. `myapp`). | ||
|
|
||
| ```powershell | ||
| # Add alias inferred from the Executable attribute in the manifest | ||
| winapp manifest add-alias | ||
|
|
||
| # Specify the alias name explicitly | ||
| winapp manifest add-alias --name myapp | ||
|
|
||
| # Target a specific manifest file | ||
| winapp manifest add-alias --manifest ./path/to/Package.appxmanifest | ||
| ``` | ||
|
|
||
| This adds a `uap5:AppExecutionAlias` extension to the manifest. If the alias already exists, the command reports it and exits successfully. | ||
|
|
Comment on lines
+28
to
+31
| ### Electron (npm package) | ||
| Use the **npm package** (`@Microsoft/WinAppCli`), **not** the standalone CLI. The npm package includes: | ||
| - The native winapp CLI binary bundled inside `node_modules` | ||
| - A Node.js SDK with helpers for creating native C#/C++ addons |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a Claude Code-compatible plugin tree at
.claude/mirroring the existing GitHub Copilot plugin under.github/plugin/, plus tooling to keep the two in sync automatically. This lets us register the repo with the Claude Code community plugin marketplace using the same source-of-truth content (skills + agent) authored for Copilot, with no manual duplication.The plan is to land this on
main, sync tostable, and then add an external plugin reference in the cc-community repo pointing at this.claude/tree.What changed:
.claude/(generated, checked in) — Claude Code project plugin layout:.claude/agents/winapp.md(Copilot-onlyinfer:frontmatter field stripped).claude/skills/winapp-{frameworks,identity,manifest,package,setup,signing,troubleshoot,ui-automation}/SKILL.md— directory names match the skillname:from frontmatter; sibling files (e.g.ui-automation/references/) preservedscripts/sync-claude-plugin.ps1— reads.github/plugin/(source of truth), parses skillname:from frontmatter to derive Claude skill dir names, strips the Copilot-onlyinfer:field from agents, and rebuilds.claude/skillsand.claude/agents. Idempotent. Includes a-Checkflag that exits 1 if.claude/is stale (CI backstop).scripts/generate-llm-docs.ps1— now invokes the sync script as its final step, so.claude/is regenerated in the same pipeline that already produces.github/plugin/skills/. Runningscripts/build-cli.ps1keeps both plugin trees in sync with no extra steps.AGENTS.md— Auto-generation pipeline section updated to list.claude/as a generated output.Usage Example
Related Issue
Type of Change
Checklist
generate-llm-docs.ps1end-to-end and verified[CLAUDE] syncing .claude/ from .github/plugin/produces all 8 skills + agent; re-run reports "already up to date")docs/fragments/skills/— N/A (no CLI command/workflow changes;.claude/is purely a mirror of the existing Copilot plugin)Additional Notes
.github/plugin/remains canonical..claude/is a generated output and should never be edited directly — edits will be overwritten on the next build.generate-llm-docs.ps1instead of just adding a CI guard? The skills under.github/plugin/skills/are themselves generated fromdocs/fragments/skills/by that same script. Putting the.claude/sync in the same place means both plugin trees come out of one build step, so contributors who follow the documented workflow ("Always call the build script at the end") get the sync for free. The-Checkflag is available as a CI backstop if we want to add a workflow guard later.stable, then add the external plugin reference in the cc-community repo.AI Description
This PR introduces a new Claude Code-compatible plugin structure in the
.claude/directory, mirroring the existing GitHub Copilot plugin found in.github/plugin/, along with a syncing script to maintain their consistency. New skills and agent documentation have been added, allowing integration with the Claude Code community plugin marketplace without duplication of content. Users can now run the following commands to utilize this new functionality: