Skip to content

[Plugin] Claude Code Plugin + Script to automatically keep it in sync with the GHCPCLI Plugin.#569

Merged
Jaylyn-Barbee merged 8 commits into
mainfrom
jay/cc-ext
Jun 11, 2026
Merged

[Plugin] Claude Code Plugin + Script to automatically keep it in sync with the GHCPCLI Plugin.#569
Jaylyn-Barbee merged 8 commits into
mainfrom
jay/cc-ext

Conversation

@Jaylyn-Barbee

@Jaylyn-Barbee Jaylyn-Barbee commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

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 to stable, 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-only infer: frontmatter field stripped)
    • .claude/skills/winapp-{frameworks,identity,manifest,package,setup,signing,troubleshoot,ui-automation}/SKILL.md — directory names match the skill name: from frontmatter; sibling files (e.g. ui-automation/references/) preserved
  • scripts/sync-claude-plugin.ps1 — reads .github/plugin/ (source of truth), parses skill name: from frontmatter to derive Claude skill dir names, strips the Copilot-only infer: field from agents, and rebuilds .claude/skills and .claude/agents. Idempotent. Includes a -Check flag 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/. Running scripts/build-cli.ps1 keeps 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

# Normal flow — build-cli.ps1 already calls generate-llm-docs.ps1, which now also syncs .claude/
.\scripts\build-cli.ps1

# Or sync directly (e.g., after editing .github/plugin/ manually)
pwsh scripts/sync-claude-plugin.ps1

# CI/PR drift check (non-zero exit if .claude/ is out of date)
pwsh scripts/sync-claude-plugin.ps1 -Check

Related Issue

Type of Change

  • ✨ New feature
  • 🔧 Config/build
  • 📝 Documentation

Checklist

  • Tested locally on Windows (ran generate-llm-docs.ps1 end-to-end and verified [CLAUDE] syncing .claude/ from .github/plugin/ produces all 8 skills + agent; re-run reports "already up to date")
  • Agent skill templates updated in docs/fragments/skills/ — N/A (no CLI command/workflow changes; .claude/ is purely a mirror of the existing Copilot plugin)

Additional Notes

  • Source of truth: .github/plugin/ remains canonical. .claude/ is a generated output and should never be edited directly — edits will be overwritten on the next build.
  • Why hook into generate-llm-docs.ps1 instead of just adding a CI guard? The skills under .github/plugin/skills/ are themselves generated from docs/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 -Check flag is available as a CI backstop if we want to add a workflow guard later.
  • Marketplace next steps: after merge, sync to 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:

# Normal flow — build-cli.ps1 already calls generate-llm-docs.ps1, which now also syncs .claude/
.\scripts\build-cli.ps1

# Directly sync .claude/ after editing .github/plugin/
pwsh scripts/sync-claude-plugin.ps1

# CI/PR drift check for .claude/ freshness
pwsh scripts/sync-claude-plugin.ps1 -Check

@github-actions github-actions Bot added the enhancement New feature or request label Jun 5, 2026
Jaylyn-Barbee and others added 2 commits June 5, 2026 11:17
…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>
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 31.45 MB 31.45 MB ✅ 0.0 KB (0.00%)
CLI (x64) 31.79 MB 31.79 MB ✅ 0.0 KB (0.00%)
MSIX (ARM64) 13.22 MB 13.22 MB ✅ 0.0 KB (0.00%)
MSIX (x64) 14.05 MB 14.05 MB 📈 +0.0 KB (+0.00%)
NPM Package 27.50 MB 27.50 MB 📈 +0.1 KB (+0.00%)
NuGet Package 27.59 MB 27.59 MB 📉 -0.1 KB (-0.00%)
VS Code Extension 20.32 MB 20.32 MB 📈 +0.1 KB (+0.00%)

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 Time

41ms median (x64, winapp --version) · ✅ -5ms vs. baseline


Updated 2026-06-08 20:37:04 UTC · commit e28845d · workflow run

Jaylyn-Barbee and others added 2 commits June 5, 2026 14:54
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>
@Jaylyn-Barbee Jaylyn-Barbee marked this pull request as ready for review June 5, 2026 20:04
Copilot AI review requested due to automatic review settings June 5, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ps1 to regenerate .claude/{skills,agents} from .github/plugin/ (including stripping the Copilot-only infer: frontmatter field from agents).
  • Updated scripts/generate-llm-docs.ps1, .gitattributes, and AGENTS.md to treat .claude/ as a generated, checked-in output kept in sync by the standard build/docs workflow.
  • Added the generated .claude/agents/winapp.md and .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 thread scripts/sync-claude-plugin.ps1
Comment thread scripts/sync-claude-plugin.ps1
Comment thread scripts/generate-llm-docs.ps1
Comment thread .claude/skills/winapp-manifest/SKILL.md Outdated
Comment thread .claude/skills/winapp-frameworks/SKILL.md

@chiaramooney chiaramooney left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would address copilot's comments otherwise looks good! 👍

@zateutsch zateutsch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/fragments/skills/winapp-cli/manifest.md
@Jaylyn-Barbee Jaylyn-Barbee requested a review from zateutsch June 11, 2026 18:57
@Jaylyn-Barbee Jaylyn-Barbee merged commit e267948 into main Jun 11, 2026
22 checks passed
@Jaylyn-Barbee Jaylyn-Barbee deleted the jay/cc-ext branch June 11, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants