feat(copilotcli): add agent skills adapter (.github/skills, ~/.copilot/skills) - #1872
Merged
Merged
Conversation
…t/skills) Follow-up from #1687 (Copilot CLI upstream updates). GitHub Copilot CLI reads agent skills from `.github/skills/` (project, shared with the Copilot IDE target) and `~/.copilot/skills/` (personal/global), but rulesync had no `copilotcli` skills adapter. - Add `CopilotcliSkill` (`src/features/skills/copilotcli-skill.ts`), modeled on `CopilotSkill` but supporting both project and global scope: project skills go to `.github/skills/`, global skills to `~/.copilot/skills/`. - Register `copilotcli` in the skills processor (target tuple + factory map with `supportsProject`/`supportsGlobal`), add a `copilotcli` section to the rulesync skill frontmatter, tag the shared `.github/skills/` gitignore entry for `copilotcli`, and add the E2E happy-path case. - Sync the supported-tools matrix (README + docs + skills/rulesync): `copilotcli` skills is now ✅ 🌏. Out of scope (verified during fact-check): - The `stop → agentStop` hook event is already mapped, and Copilot CLI hooks already pass `cwd`/`env` through verbatim (declaring them first-class in the canonical schema would break that pass-through), so the hook gaps need no change. Closes #1687
…tcli skill frontmatter Address review findings on PR #1872: - Add the `copilotcli` case to the global-mode skills E2E matrix so the new global capability (output to ~/.copilot/skills/) has happy-path coverage, matching every other global-capable skills target. - Document the `copilotcli:` skill frontmatter section in file-formats.md (mirrors the `copilot:` section), keeping the per-tool enumeration in sync.
Owner
Author
|
@dyoshikawa Thank you! |
Merged
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.
Background
Follow-up from #1687 (Copilot CLI upstream updates).
GitHub Copilot CLI reads agent skills from
.github/skills/(project, shared with the Copilot IDE target) and~/.copilot/skills/(personal/global), per the Copilot CLI skills docs. rulesync had nocopilotcliskills adapter, so theskillsfeature was unsupported for that target.Changes
CopilotcliSkilladapter (src/features/skills/copilotcli-skill.ts), modeled onCopilotSkillbut supporting both scopes: project skills →.github/skills/, global skills →~/.copilot/skills/(getSettablePathsreturns the global dir instead of throwing).copilotcliin the skills processor (target tuple + factory map withsupportsProject: true/supportsGlobal: true), added acopilotclisection to the rulesync skill frontmatter (license/allowed-tools), tagged the shared.github/skills/gitignore entry forcopilotcli, and added the E2E happy-path case.docs/+skills/rulesync/) —copilotcliskills is now ✅ 🌏.Fact-check notes (other gaps in #1687)
agentStophook event — already done. Canonicalstopis mapped to Copilot CLI'sagentStop(stop: "agentStop"inCANONICAL_TO_COPILOTCLI_EVENT_NAMES, andstopis inCOPILOTCLI_HOOK_EVENTS).cwd/env— already functional.copilotcli-hooks.tspasses non-canonical fields (includingcwd/env) through verbatim. Declaring them first-class in the canonicalHookDefinitionSchemawould actually break that pass-through (the adapter filters out keys present inHookDefinitionSchema.shape), so the current behavior is left as-is.All checks pass via
pnpm cicheck.Closes #1687