skills
AGENTS.md1 starsChanged 4 months agoMITView on GitHub
A shared library of Agent Skills (agentskills.io spec) used across multiple projects. Skills are generic and project-agnostic. Project-specific overrides live in a /skills/ directory within each project repo. All active skills live under skills/. No other top-level layout is required by the spec. Two situations warrant a suffix: Without a sibling variant, do not add a suffix prophylactically — it adds noise without information. When a skill needs a variant, each variant lives in its own directory: Variants share the…
- Reads credentials
- Installs packages
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 35,117 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 repository22 other files it gives its agents.
- adopting-dependabotSkill
- auditing-ci-costSkill
- coordinating-epicsSkill
- curating-contextSkill
- deploying-releasesSkill
- enforcing-architectureSkill
- init-project-fastapiSkill
- init-socraticodeSkill
- maintaining-host-diskSkill
- managing-skillsSkill
- orchestrating-issue-backlogSkill
- patching-hostsSkill
- reviewing-architectureSkill
- reviewing-code-phpSkill
- reviewing-code-python-clickSkill
- reviewing-code-python-fastapiSkill
- reviewing-codeSkill
- shipping-workSkill
- using-git-worktreesSkill
- using-mayfly-chatSkill
- vendoring-openapi-clientSkill
- writing-plansSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
19 rules. About 0 are common, 7 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
All active skills live under skills/.
- Very specific: line 31
Agent-specific variant: when a skill genuinely needs to diverge for one provider (e.g.
- Distinctive: line 38
When a skill needs a variant, each variant lives in its own directory:
- Distinctive: line 63
When creating a project override, copy the global skill as a starting point
- Very specific: line 80
Use uv tool install (recommended — isolated, no --break-system-packages needed):
- Distinctive: line 110
All scripts must be self-contained or document dependencies clearly
- Distinctive: line 112
No interactive prompts — agents run in non-interactive shells
- Distinctive: line 113
Use structured output (JSON, TSV) on stdout.
- Very specific: line 114
Use set -euo pipefail in bash scripts
- Very specific: line 138
Per-script resolution: Never write bash scripts/X.sh in a SKILL.md: the agent's cwd is the *project* root (#63), and resolve each script on …
- Very specific: line 172
Relative links resolve from the file that contains them: Every rendered link in any skills//*.md — SKILL.md and references alike — must …
- Very specific: line 188
Every SKILL.md is held to a 6,000-token ratchet — the figure curating-context enforces on a consuming repo's AGENTS.md — by …
- Distinctive: line 229
Create a venv, install dependencies, and activate local git hooks (run once after cloning):
- Very specific: line 270
Create skills/<skill-name>/SKILL.md with valid frontmatter
- Very specific: line 271
Add scripts/ and references/ as needed
- Very specific: line 274
Update project AGENTS.md files that reference this repo to include the new skill in their <available_skills> block (if applicable)
- Very specific: line 275
If the skill should be listed in this repo's README.md skills table, add it there too
- Distinctive: line 279
When an agent-specific or stack-specific divergence is needed (see "Variant strategy"):
- Very specific: line 282
Update name, rewrite description:, declare in VARIANT_FAMILIES — why
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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
Agent Guidance — gregoryfoster/skills
What this repo is
A shared library of Agent Skills (agentskills.io spec) used across multiple projects.
Skills are generic and project-agnostic. Project-specific overrides live in a /skills/ directory within each project repo.
Repository structure
skills/
<skill-name>/ # One directory per skill variant
SKILL.md # Required. Frontmatter + instructions.
scripts/ # Executable scripts (bash, Python, etc.)
references/ # Supplementary docs loaded on demand
assets/ # Static resources (templates, schemas, etc.)All active skills live under skills/. No other top-level layout is required by the spec.
Naming conventions
- Skill directories use gerund form, no suffix:
reviewing-code,shipping-work,init-project-fastapi. - Names must be lowercase, hyphens only, no consecutive hyphens, max 64 chars (spec requirement).
- In practice all current skills run identically across agent providers, so the bare name is the default.
When to add a suffix
Two situations warrant a suffix:
- Agent-specific variant when a skill genuinely needs to diverge for one provider (e.g. provider-specific tool invocation, prompt-style tuning that materially affects behavior). Allowed suffixes:
-claude,-cursor,-copilot,-gemini. - Stack-specific variant when a skill diverges along a technology axis (e.g.
reviewing-code-php,reviewing-code-python-fastapi). Use the language or framework as the suffix; when a single language hosts multiple genuinely-different workflows (e.g. Python FastAPI vs Python Click), include the framework in the suffix and skip the bare-language variant.
Without a sibling variant, do not add a suffix prophylactically — it adds noise without information.
Variant strategy
When a skill needs a variant, each variant lives in its own directory:
skills/
reviewing-code/ # baseline (used when no variant matches)
reviewing-code-php/ # PHP/WordPress stack variant
reviewing-code-python-fastapi/ # Python/FastAPI stack variant
reviewing-code-python-click/ # Python/Click CLI stack variant
reviewing-code-cursor/ # Cursor-specific agent variant (hypothetical)
shipping-work/ # one skill: detects the stack (#537)Variants share the same trigger phrases (documented in metadata.triggers). The runtime selects the appropriate variant. Each variant is a complete, self-contained skill — no inheritance between variants.
Project-level superseding
Projects may define a local /skills/ directory with the same skill name. The local version is a complete replacement — not an extension. There is no partial override or inheritance.
Resolution order (most specific wins):
- Project-level skill (e.g.,
my-project/skills/reviewing-code/) - Global skill (this repo, e.g.,
gregoryfoster/skills/skills/reviewing-code/)
Consequences:
- Global skills must be fully general and project-agnostic
- Project skills must be fully self-contained (they cannot assume the global version exists)
- When creating a project override, copy the global skill as a starting point
An override must declare overrides: <vendor>/<upstream-skill-name> and
override-reason: in its metadata block — the vendor prefix is what
disambiguates which parent is being replaced when two vendored sources ship the
same skill name, and should declare synced-from: (#286). A fragment the
vendor marks <!-- skill:required id=<slug> --> that genuinely cannot apply is
declared, not dropped, in omits-required: (#265). Authoring detail, the
legacy unqualified form, and the H1 suffix:
docs/CONVENTIONS.md.
Spec compliance
Validate skills with skills-ref validate skills/<name>.
Installing skills-ref
Use uv tool install (recommended — isolated, no --break-system-packages needed):
uv tool install "git+https://github.com/agentskills/agentskills#subdirectory=skills-ref"Or with pip in a venv:
python -m venv .venv && source .venv/bin/activate
pip install "git+https://github.com/agentskills/agentskills#subdirectory=skills-ref"Spec rules
- Required frontmatter:
name,description namemust match the directory name exactlydescriptionmax 1024 chars; write in third person; include what and whenSKILL.mdbody recommended under 500 lines; move detail toreferences/
Writing effective skills
- Be concise. Claude already knows how to use git, read Python, etc. Only add context it doesn't have.
- Match freedom to fragility. Exact scripts for dangerous/stateful ops; high-level instructions for judgment calls.
- Descriptions drive discovery. The description is how Claude decides which skill to activate from 100+ candidates. Make it specific and include trigger keywords.
- Progressive disclosure.
SKILL.mdis the overview.references/files are loaded only when needed.scripts/are executed, not loaded into context. - Test across models. Skills tuned for Opus may need more detail for Haiku.
Scripts
- All scripts must be self-contained or document dependencies clearly
- Support
--helpwith usage + flag descriptions - No interactive prompts — agents run in non-interactive shells
- Use structured output (JSON, TSV) on stdout; diagnostics to stderr
- Use
set -euo pipefailin bash scripts - A write through a temp file must be checked, and a deliberate exception must
say so with
# unchecked-write-ok: <reason>— gated bytest_checked_temp_writes.py, explained in docs/STYLE.md - Pin versions when invoking tools (e.g.,
uvx ruff@0.16.6— the pin this repo's own Python gate uses, kept inrequirements-test.txt) - Must pass
shellcheck --external-sources --source-path=SCRIPTDIR --severity=style(shellcheck's own default floor — no level is exempt).TestShellcheckruns it overskills/*/scripts/,scripts/and.claude/hooks/with the buildrequirements-test.txtpins, and skips loudly when it is absent or another version (#481).SHELLCHECK_REQUIRED=1turns either skip into a failure. - A
# shellcheck disable=SCxxxxmust carry a reason comment on the line directly above it.TestShellcheckSuppressionsCarryReasonsenforces the pairing, so a suppression stays a documented decision rather than a silencer (#90).
These carry a full template and a rationale in docs/STYLE.md, and each is enforced:
- A repo-creating git command must scrub
GIT_DIR— it overridesgit -Cand cwd, and git exports it to every hook, so a fixture's throwaway repo writes to the real one (#189).extensions.worktreeConfigwas measured and refused. - Per-script resolution. Never write
bash scripts/X.shin a SKILL.md: the agent's cwd is the project root (#63), and resolve each script on its own (#301).TestNoBareScriptPaths. - Gate-script discipline. A script whose output drives a ship/skip decision
must never silently swallow the stderr of the tool producing that output.
TestGateScriptHardeningbinds everyshipping-work*/reviewing-code*/coordinating-epicsscript plus repo-rootscripts/(#318, #398), each classified gate or reporting (#255);test_pre_ship_env_override.pyholds the wrapper-don't-fork override block inshipping-work's gate (#105).
Resolution knobs
A project configures a skill by committing a file under .skills/ instead of
forking it. Many resolve through one lookup — <NAME> env var, then the
file, then a built-in default, as WORKTREE_ROOT / .skills/worktree_root
does. That is a shared shape, not the inventory — the
rest use their own, and reading this section as the list is how
#261 left a repo able to
tailor a gate's watch list but not its advice. Every .skills/ file a
project may commit, any env var that outranks it, what replaces or extends a
default, and what each absence means: docs/KNOBS.md, held complete by
tests/structural/test_skills_knob_inventory.py.
The per-skill defaults and resolver helpers: docs/CONVENTIONS.md.
References convention
Skills may carry supplementary references/*.md files for content exceeding the
SKILL.md body cap, loaded on demand rather than on activation. Two rules are
enforced by the structural suite:
- Every
references/<name>.mdmust be linked from its sibling SKILL.md — orphans fail tests/structural/test_references.py, which lets a doc link what it keeps in a subdirectory (#152). - Relative links resolve from the file that contains them. Every rendered
link in any
skills/**/*.md— SKILL.md and references alike — must point at a real path, or tests/structural/test_relative_links.py fails. Links inside code fences and inline code spans are skipped — they never render, and that is where a consuming repo's illustrative paths live. An illustrative link in prose needs anEXEMPT_LINKSentry naming the file, the target and the reason (#143).
Convention, not enforced: no frontmatter, lowercase-kebab.md names, and
no length cap — escaping that body cap is the point of a reference file.
Conditional-block delimiters and the assets/ equivalents:
docs/CONVENTIONS.md.
Self-budget
Every SKILL.md is held to a 6,000-token ratchet — the figure
curating-context enforces on a consuming repo's AGENTS.md — by
tests/structural/test_skill_self_budget.py,
which also holds every references/*.md to the 10,000-token per-doc budget,
with nothing exempt — #152
retired the one exemption by splitting the append-only log rather than excusing
it. The skills that miss it carry a named exception with its reason beside it,
and every file names its own figure in prose so the gate and the run read the
same number. A ratchet only ever comes down.
Two readings bind it, not one, and only the estimate is always on — which let three ratchets be breached past a green suite. What each reading is, how they are reconciled, anchoring a file before curating it, and the weekly exact gate: docs/BUDGETS.md.
AGENTS.md itself is gated: the context-budget-gate pre-commit hook fails any commit that puts it over .skills/context-budget (#88).
Commit conventions
Conventional Commits style:
<type>: <description>Common types: feat, fix, docs, refactor, chore
Example: feat: add reviewing-architecture-cursor variant
How downstream projects consume this repo
Projects vendor this repo as a git submodule at skills-vendor/<owner>-<repo>/ and
symlink individual skills into their own skills/ directory with relative paths.
Local overrides (committed directories) always win over symlinks, and
skills-vendor/ is read-only from the consuming project's side.
The pattern, the .skills/doctor.sh install and self-sync rules, and this repo's
own .claude/skills self-discovery symlink: docs/SKILLS.md.
The managing-skills skill teaches agents how to perform these operations.
Dev setup
Create a venv, install dependencies, and activate local git hooks (run once after cloning):
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-test.txt
pre-commit install # commit: impacted tests; push: full suiteHooks use .venv/ at the repo root. A worktree has none; the gate links the
main checkout's in and never re-creates it (#156).
Python is gated by ruff, pinned exactly in requirements-test.txt: bash
scripts/python-lint.sh runs check + format --check (--fix applies both),
and test_python_lint.py runs the same checks inside. On a missing or
mismatched ruff the suite skips loudly (RUFF_REQUIRED=1 to fail) and the hook
refuses to run (#246).
scripts/pre-ship.sh is the ship gate — every pre-commit hook in one
command, and what shipping-work Step 1 resolves (#318). The suite runs in
parallel and reuses a pass recorded for the same tree (#537). A commit runs
only the tests its change reaches; pushing needs a full pass (docs/GATE.md):
bash scripts/pre-ship.sh # budget + ruff + suite
pytest tests/integration/ -v -m integration # billed, needs .env; never gatedPut a new structural rule in its own tests/structural/test_<rule>.py, not at
the end of test_context_surface.py. That file is the obvious default home,
which is exactly the problem: when several agents work the backlog in parallel
worktrees, appending to one shared file turns every merge into a conflict, while
a per-rule file merges clean and stays findable by filename. Extend an existing
file only when the new test belongs to the rule that file already owns.
ANTHROPIC_API_KEY lives in the gitignored .env at the repo root. Load it with
set -a && source .env && set +a; run-integration-tests.sh and
measure-context.sh --exact find it themselves.
Adding a new skill
- Create
skills/<skill-name>/SKILL.mdwith valid frontmatter - Add
scripts/andreferences/as needed - Validate:
skills-ref validate skills/<skill-name> - Commit and push
- Update project AGENTS.md files that reference this repo to include the new skill in their
<available_skills>block (if applicable) - If the skill should be listed in this repo's README.md skills table, add it there too
Adding a variant
When an agent-specific or stack-specific divergence is needed (see "Variant strategy"):
- Copy the baseline:
cp -r skills/reviewing-code skills/reviewing-code-<suffix>(e.g.-php,-python,-cursor) - Update
name, rewritedescription:, declare inVARIANT_FAMILIES— why - Tune instructions, scripts, and references for the target stack or agent
- Validate and commit
Detail Docs
- docs/STYLE.md — the per-script resolution template, the gate-script rules and the scripts they bind, the
GIT_DIRscrub, and the refusedextensions.worktreeConfig - docs/CONVENTIONS.md — authoring a project override, the
references/conditional-block delimiters, the env-var knobs' resolver helpers, and claims about another repo - docs/BUDGETS.md — a budget's two readings, anchoring, and the weekly exact gate
- docs/KNOBS.md — every
.skills/file a project may commit: grammar, reader, replaces-or-extends, and what absence means - docs/SKILLS.md — the submodule + symlink vendoring pattern,
.skills/doctor.sh, and self-discovery - docs/GATE.md — what the commit, ship and push gates run, and the test-selection map
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.

