Skip to content

feat(copilotcli): add agent skills adapter (.github/skills, ~/.copilot/skills) - #1872

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-1687-copilotcli-skills
Jun 15, 2026
Merged

feat(copilotcli): add agent skills adapter (.github/skills, ~/.copilot/skills)#1872
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-1687-copilotcli-skills

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

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 no copilotcli skills adapter, so the skills feature was unsupported for that target.

Changes

  • CopilotcliSkill adapter (src/features/skills/copilotcli-skill.ts), modeled on CopilotSkill but supporting both scopes: project skills → .github/skills/, global skills → ~/.copilot/skills/ (getSettablePaths returns the global dir instead of throwing).
  • Wiring: registered copilotcli in the skills processor (target tuple + factory map with supportsProject: true / supportsGlobal: true), added a copilotcli section to the rulesync skill frontmatter (license / allowed-tools), tagged the shared .github/skills/ gitignore entry for copilotcli, and added the E2E happy-path case.
  • Docs: synced the supported-tools matrix (README + docs/ + skills/rulesync/) — copilotcli skills is now ✅ 🌏.

Fact-check notes (other gaps in #1687)

  • agentStop hook event — already done. Canonical stop is mapped to Copilot CLI's agentStop (stop: "agentStop" in CANONICAL_TO_COPILOTCLI_EVENT_NAMES, and stop is in COPILOTCLI_HOOK_EVENTS).
  • Per-hook cwd/env — already functional. copilotcli-hooks.ts passes non-canonical fields (including cwd/env) through verbatim. Declaring them first-class in the canonical HookDefinitionSchema would actually break that pass-through (the adapter filters out keys present in HookDefinitionSchema.shape), so the current behavior is left as-is.

All checks pass via pnpm cicheck.

Closes #1687

…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.
@dyoshikawa
dyoshikawa merged commit 4856ec7 into main Jun 15, 2026
8 checks passed
@dyoshikawa

Copy link
Copy Markdown
Owner Author

@dyoshikawa Thank you!

@dyoshikawa
dyoshikawa deleted the resolve-scrap-issue-1687-copilotcli-skills branch June 15, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow up Copilot CLI upstream updates: hooks agentStop/cwd/env and agent skills

2 participants