skills
AGENTS.md2 starsChanged 35 days agoMITView on GitHub
Central source of truth for reusable skills. Edits happen here; projects only consume. Pushed changes propagate via git pull — never edit copies inside other projects. Fresh machines run scripts/install.sh from the checkout (clone location does not matter). The script is idempotent — re-run it after git pull:
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- accessibilitySkill
- adr-skillSkill
- clean-codeSkill
- code-reviewSkill
- debugSkill
- git-worktreesSkill
- good-cssSkill
- grillSkill
- hardeningSkill
- observabilitySkill
- parallel-dispatchSkill
- performanceSkill
- security-auditSkill
- seoSkill
- skill-inspectorSkill
- tech-skillsSkill
- web-quality-auditSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 35
If it doesn't exist → copy global-AGENTS.md verbatim.
- Distinctive: line 36
If it exists → read both files, then add what's missing from the repo, update from the repo where they conflict (repo wins), and preserve …
- Very specific: line 39
Verify: /setup appears in the command list everywhere.
- Very specific: line 43
Add: create skills/<skill-id>/SKILL.md with name + description, supporting files beside it.
- Very specific: line 44
Update: edit here, push; consumers git pull + re-run scripts/install.sh if wiring changed.
- Very specific: line 45
Remove: delete the skills/<skill-id>/ directory.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — skills library
Central source of truth for reusable skills. Edits happen here; projects only consume. Pushed changes propagate via git pull — never edit copies inside other projects.
Layout (directory form only)
skills/<skill-id>/SKILL.md
skills/<skill-id>/scripts/...
skills/<skill-id>/references/...
setup/ # setup references for /setup (plain .md, never SKILL.md, never discovered as skills)
setup/bootstrap.md # project AGENTS.md scaffold + per-project library wiring (plain reference, run as /setup Phase 0)
commands/setup.md # single setup wizard command (installed by scripts/install.sh)
global-AGENTS.md # universal guidance; installed as ~/.config/opencode/AGENTS.md
templates/AGENTS.template.md # thin per-project template (used by /setup Phase 0)
scripts/install.sh # one-shot new-machine setup (idempotent; `--global` / `--remove-global` for the legacy global entry)
scripts/lint-skills.py # repo tooling, not a skill- Library skills live under
skills/and wiring points atskills/, never the checkout root. The root holdsREADME.md,AGENTS.md,global-AGENTS.md— OpenCode treats every root-level*.mdas a flat-file skill, so a checkout-rootskillsentry would advertise those docs as bogusREADME/AGENTS/global-AGENTSskills. - ID = directory name. Lowercase kebab-case, 1–64 chars:
^[a-z0-9]+(-[a-z0-9]+)*$. - Frontmatter
namemust equal the directory ID (OpenCode treats it as display-only, but VSCode/Claude tooling requires the match); the path-derived ID is what theskilltool loads (case-sensitive). descriptionin frontmatter is required — without it the skill is never advertised to the model.- Invocation mode is one of two: advertised (default) or user-only via
metadata.opencode/autoinvoke: false. There are no native always/once-per-session flags — those rules go inglobal-AGENTS.md, and the linter rejects such keys in skill frontmatter. - Paths inside a skill are relative to its own directory, or relative to the skills checkout resolved at runtime (
$SKILLS_DIR, never a hardcoded clone location). Canonical~/.config/references are allowed; machine-specific absolute paths (/home/…,/Users/…) and hardcoded checkout paths (~/code/skills) are not. - Flat
*.mdskills and nestedteams/<id>/SKILL.mdare not used here; keep every skill top-level underskills/asskills/<skill-id>/SKILL.md.
New-machine setup (agent task)
Fresh machines run scripts/install.sh from the checkout (clone location does not matter). The script is idempotent — re-run it after git pull:
- Write the pointer file
~/.config/opencode/skills-repo.pathwith this checkout's absolute path (locates the checkout for/setup; advertises nothing). Default installs add no globalskillsentry, so library skills stay invisible until a project is wired. Opt-in only:--globaladds the checkout'sskills/subdirectory to the globalskillsarray (advertises everywhere);--remove-globalremoves both theskills/entry and any legacy checkout-root entry (migrate to per-project wiring). Never commit a personal checkout path into any project'sopencode.jsonc. - Install universal guidance as
~/.config/opencode/AGENTS.mdby merging, never by blind overwrite (the script copies only when the target is missing; otherwise the agent merges):- If it doesn't exist → copy
global-AGENTS.mdverbatim. - If it exists → read both files, then add what's missing from the repo, update from the repo where they conflict (repo wins), and preserve local-only content untouched.
- Present the final merged result to the user and write it only after explicit confirmation. Surface local-only rules as upstream candidates; never move them into the repo unasked.
- If it doesn't exist → copy
- Install the setup wizard as
~/.config/opencode/commands/setup.mdby copyingcommands/setup.mdverbatim (create the directory if missing). It resolves the checkout via$SKILLS_DIR, then the pointer file, then a legacy globalskillsentry. - Verify:
/setupappears in the command list everywhere; library skills advertise only in projects where/setupwired them (check from a wired project).
Add / update / remove
- Add: create
skills/<skill-id>/SKILL.mdwithname+description, supporting files beside it. Pick advertised (default) or user-only (metadata.opencode/autoinvoke: false). Run lint before committing. Setup docs are not skills — add tosetup/<topic>.md+ route viasetup/_index.md, exposed throughcommands/setup.md. - Update: edit here, push; consumers
git pull+ re-runscripts/install.shif wiring changed. No re-copying needed for project-localskillsentries pointing at the checkout'sskills/dir. - Remove: delete the
skills/<skill-id>/directory. Before deleting, grep consuming projects for per-project copies under.opencode/skills/<id>. - Per-project copy (
<project>/.opencode/skills/<id>/) is opt-in only, when a skill must ship with that repo for team/CI — it is the team-sharing mechanism. Default is the project-localskillsentry pointing at the checkout'sskills/dir (machine-local, each teammate runs/setuponce, never committed). Avoid duplicate IDs: explicitskillsconfig entries outrank.opencode/skillson the same ID in V2, so a pinned copy with the same ID is hidden — use a different ID (e.g.<id>-pinned) when pinning. - Consumer projects: run
/setupfrom the project directory. Phase 0 wires the project to the library (project-localskillsentry) and scaffoldsAGENTS.mdfromtemplates/AGENTS.template.md. Universal text stays in the global file; never inline it into project files.
Verify
python3 scripts/lint-skills.pyZero dependencies, stdlib only. Fails on: bad ID/dirname, missing SKILL.md or description, stray root-level skill files, machine-specific absolute paths, hardcoded checkout paths, non-native invocation keys (always, once-per-session, etc. — those belong in global-AGENTS.md). Warns (non-failing) on autoinvoke: false / disable-model-invocation: true since those hide the skill.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

