|
| 1 | +# Agent instructions and skills |
| 2 | + |
| 3 | +This repository keeps agent instructions in the AGENTS standard. |
| 4 | +Contributors should only edit these standard files. |
| 5 | + |
| 6 | +## Sources of truth |
| 7 | + |
| 8 | +- `AGENTS.md` contains repository-wide context and constraints, including the |
| 9 | + plugin architecture, packaging, dependencies, command registration, versioning, and CI setup. |
| 10 | + Agents will read this file automatically at the beginning of a session. |
| 11 | +- `.agents/skills/` contains reusable, task-specific instructions. Each |
| 12 | + skill lives in its own directory and is defined by a `SKILL.md` file. |
| 13 | + Agents get a list of available skills and can decide when to read their full contents. |
| 14 | + |
| 15 | +#### Claude Code sync |
| 16 | + |
| 17 | +`.claude/hooks/sync-agent-files.sh` copies the following: |
| 18 | + |
| 19 | +| Canonical, tracked source | Generated, ignored Claude Code file | |
| 20 | +| --- | --- | |
| 21 | +| `AGENTS.md` | `CLAUDE.md` | |
| 22 | +| `.agents/skills/<skill>/` | `.claude/skills/<skill>/` | |
| 23 | + |
| 24 | +Hooks in `.claude/settings.json` run synchronization automatically: |
| 25 | + |
| 26 | +- `SessionStart` on new, resumed, and cleared sessions. |
| 27 | +- `PostToolUse` when Claude Code writes or edits AGENTS sources. |
| 28 | + |
| 29 | +Do not edit or create `CLAUDE.md` or files under `.claude/skills/`. |
| 30 | +They are automatically generated/replaced by scripts, and never tracked. |
| 31 | + |
| 32 | +## Adding a skill |
| 33 | + |
| 34 | +1. Create `.agents/skills/<skill-name>/SKILL.md`. |
| 35 | +2. Write the following: |
| 36 | + |
| 37 | +``` |
| 38 | +--- |
| 39 | +name: skill-name |
| 40 | +description: Give it a short description. |
| 41 | +--- |
| 42 | +``` |
| 43 | + |
| 44 | +`name` is the same as the directory. |
0 commit comments