Skills and agents layout¶
How this repository lays out agent skills and sub-agents, and why. Decided in #438.
Layout¶
| Path | What it is | Edit it? |
|---|---|---|
.agents/skills/<name>/ |
Every folder under .agents/skills/. The Agent-kit names are the table in Agent-kit integration |
Yes, except the Agent-kit skills in that table |
.claude/skills |
A tracked relative symlink (git mode 120000) to ../.agents/skills |
No. Never replace it with a copy |
.github/agents/<name>.agent.md |
Canonical sub-agent file that Copilot offers and reads as it is | Yes |
.github/agents/<name>.md |
Canonical file for a Claude and Cursor agent. Copilot does not offer a file without the .agent.md suffix. commit-drafter and pr-drafter use this: their prompts run git and gh, which Copilot's read and search tools cannot |
Yes |
.claude/agents/<name>.md, .cursor/agents/<name>.md |
Sub-agent files generated from the canonical file | No. Edit the canonical file, then run the sync |
.github/copilot-instructions.md |
Copilot's repository instructions | Yes |
Cursor and Copilot read .agents/skills/ natively. Claude Code reads only .claude/skills/, so that path is the link.
The Copilot prompts and instructions that used to sit in .github/prompts/ and .github/instructions/ are skills now. architect, manager, implementor and troubleshooting were explicit prompts, so they carry disable-model-invocation: true and run only when invoked by name. resolve-issue can be picked by the model. The /commit prompt and the pre-commit instructions were removed without a copy: commit-change and the commit pipeline own that workflow.
The link check¶
python scripts/development/check_skills_link.py fails unless all of these hold:
- the git index holds exactly one symlink,
.claude/skills, and its blob is../.agents/skills; - on disk
.claude/skillsis a link to../.agents/skillsthat resolves to.agents/skills; .agents/skillsis a real directory.
pre-commit runs it on every commit (hook skills-link), the destroyed-symlinks hook catches a link turned into a file, and CI runs it in the changes job, which CI gate needs. On Windows a clone made without core.symlinks turns the link into a text file. The check then prints the repair; the steps are in Developer setup.
The sub-agent sync¶
python scripts/development/sync_agents.py --apply rewrites the generated files; --check (pre-commit hook agents-sync, and a CI step) exits 1 on any drift, a missing target, or a target with no canonical file.
- The body is shared. Text for some harnesses only sits between
<!-- harness:claude -->(orcursor,copilot, or a comma list) and<!-- /harness -->. - A canonical file is
<name>.agent.mdwhen Copilot should offer it, or<name>.mdwhen it is Claude and Cursor only.commit-drafterandpr-drafterare<name>.md. nameanddescriptioncome from the canonical file. Every other frontmatter key in a target (Claudetools,model,hooks; Cursormodel,readonly) is kept as it is, because model pins and tool grants differ by harness. A<name>.agent.mdfile may also carry atoolslist (read,search) for GitHub Copilot; sync does not copy it, and any other canonical key is an error.- A target that does not exist is created with
nameanddescriptiononly. Add the harness keys by hand.
Research and sources¶
Checked on 2026-11-27. Each claim names where it comes from.
- Claude Code does not read
.agents/skills/. The project location is.claude/skills/<name>/SKILL.md; a skill folder can be a symlink, and Claude Code loads it once even if several locations point at the same target (Claude Code skills docs, "Choose where skills load" and "Symlinked folders"). The skills CLI mapsclaude-codeto.claude/skillsandcursorto.agents/skills(src/agents.ts). - A directory link works in Claude Code 2.1.329. Probe:
.agents/skills/<probe>/SKILL.mdplus.claude/skills -> ../.agents/skillsin a throwaway repo and in a linked worktree, thenclaude -p "Reply with the single word OK." --output-format stream-json --verbose --max-turns 1. Thesystem/initevent'sskillslist held the probe skill. A control repo without the link did not list it. Open upstream reports (anthropics/claude-code #37435, #68318, #72631) concern a link for each skill, and Desktop and IDE menus; none reports a failure with a linked.claude/skillsdirectory. The Desktop and IDE/menu was not probed. - Cursor reads
.agents/skills/natively and collapses duplicates. Cursor skills docs list.agents/skills/and, for compatibility,.claude/skills/. A Cursor staff reply on the forum says the duplicate-loading fix landed in Cursor 3.17. Not probed locally. skills-lock.jsonis not edited. In the skills CLI,skillPathis the path of the skill'sSKILL.mdinside the source repository, andskillFolderHashdescribes the source tree (src/local-lock.ts). Agent-kitv1.0.0-beta.9keeps its skills under.claude/skills/<name>/, so everyskillPathhere (.claude/skills/<name>/SKILL.md) is still the right source path. EachskillFolderHashequalsgit rev-parse v1.0.0-beta.9:.claude/skills/<name>in Agent-kit, and the move did not change any tree:git rev-parse HEAD:.agents/skills/<name>equals it for all 11 entries.- The Agent-kit CLI refuses to write through the link. At
v1.0.0-beta.9,cli/src/local-writes.mjsthrows "is a symbolic link or junction; the CLI does not delete or write through links" for any path that is, or sits under, a link, andupgradecalls it for each kit-owned path. Sonpx @mnaimfaizy/agent-kit upgradestops here. The by-hand route is in Agent-kit integration, Upgrading. The kit's own scripts already handle the layout: orchestrate, qa-plan and manual-qa compare real paths over.claude/skillsand.agents/skills, andinstruction-drift-auditnames.claude/skills -> .agents/skills. - Nothing else reads the path. Docker build contexts are
backend/andreact-frontend/, no workflowpaths:filter names.claude, and skill links todocs/use../../../, the same depth under.agents/skills/<name>/.
Lock file finding¶
skills-lock.json uses the schema of the skills CLI's global lock (version: 3, skillFolderHash). The CLI's project lock reader accepts only versions 1 and 2. npx skills@1.9.0 list on a copy of the file printed [SKILLS_INVALID_LOCAL_LOCK] ... unsupported lock version 3 (expected 2) and found no project skills. So npx skills update -p cannot use this lock, whatever paths it holds, and no tool in this repository reads it. That predates #438 and is a separate follow-up: regenerate a version-2 lock, or drop the file and rely on the Agent-kit CLI for upgrades.