[Plugin] Claude Code Plugin + Script to automatically keep it in sync with the GHCPCLI Plugin.#569
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>
Build Metrics ReportBinary Sizes
Test Results✅ 1192 passed, 1 skipped out of 1193 tests in 457.1s (-11.6s vs. baseline) Test Coverage❌ 17.2% line coverage, 36.3% branch coverage · ✅ no change vs. baseline CLI Startup Time41ms median (x64, Updated 2026-06-08 20:37:04 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>
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.
chiaramooney
left a comment
There was a problem hiding this comment.
would address copilot's comments otherwise looks good! 👍
zateutsch
left a comment
There was a problem hiding this comment.
Looks good to me except looking into the add-alias stuff getting pulled.
PR review skill returned no major issues.
I can approve once we double check the docs.
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 plugin structure for Claude Code, adding a directory
.claude/that mirrors the existing GitHub Copilot plugin structure under.github/plugin/, and includes a synchronization script to maintain consistency between the two. The addition of tools allows for seamless integration into the Claude Code community plugin marketplace without manual duplication. Users can now build and sync the plugin trees using the following commands: