claude-code-skills
AGENTS.md5 starsChanged 2 months agoMITView on GitHub
Shell hooks, skill docs, rules, and setup for Claude Code CLI. Most changes land in hooks/, rules/, skills/*/SKILL.md, scripts/, setup.sh, or settings.json. settings.json matcher accepts only a tool-name regex, not an expression language. Command-level filtering must happen inside the hook script via stdin JSON (tool_input.command, tool_input.file_path). Do not echo the input JSON back on stdout at exit 0. All hooks in this repo follow: filter on stdin → output to stderr → exit 0 or exit 2. - 17 active…
- Commits and pushes
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,774 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 repository25 other files it gives its agents.
- adk-engineerSkill
- agent-orchestratorSkill
- brainstormingSkill
- bugfixSkill
- classify-reviewSkill
- code-reviewerSkill
- codex-reviewSkill
- context7-skillsSkill
- developer-growth-analysisSkill
- file-organizerSkill
- gcp-deploy-guardianSkill
- gws-workspaceSkill
- handoverSkill
- modern-architectureSkill
- planSkill
- repo-cleanSkill
- review-loopSkill
- security-reviewSkill
- skill-creatorSkill
- supabase-nextjs-debuggerSkill
- tdd-workflowSkill
- test-falsifySkill
- ui-design-systemSkill
- ui-skillsSkill
- ux-researcher-designerSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Do not echo the input JSON back on stdout at exit 0.
- Distinctive: line 69
Before creating a PR, inspect the changed paths and write the H5 declarations from evidence already collected.
- Very specific: line 87
Use none only when the change has no real execution environment.
≈ “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
What this repo ships
Shell hooks, skill docs, rules, and setup for Claude Code CLI. Most changes land in hooks/, rules/, skills/*/SKILL.md, scripts/, setup.sh, or settings.json.
Source of truth
settings.jsondefines every hook registration, env var, and plugin toggle. If docs disagree with it, followsettings.json.- API provider routing (Anthropic subscription vs z.ai) is managed by
scripts/claude-provider.shvia~/.claude/settings.local.json+~/.claude/providers/. Never put gateway tokens in reposettings.json. Seedocs/runbooks/provider-switching.md. - Hook wiring is not done until all four are true: script exists in
hooks/→setup.shcopies it to~/.claude/hooks/→settings.jsonregisters the matcher or event → trigger verified to fire.
Hook matcher syntax (critical gotcha)
settings.json matcher accepts only a tool-name regex, not an expression language. Command-level filtering must happen inside the hook script via stdin JSON (tool_input.command, tool_input.file_path).
✓ { "matcher": "Bash" }
✓ { "matcher": "Edit|Write" }
✗ { "matcher": "tool == \"Bash\" && tool_input.command matches \"git push\"" }Exit code convention
| Code | Meaning | PreToolUse behavior |
0 | Allow | Tool call proceeds. JSON on stdout parsed for hookSpecificOutput. |
2 | Block | Tool call blocked. stderr fed back to Claude as error. |
| other | Non-blocking error | stderr shown in verbose mode only. Execution continues. |
Do not echo the input JSON back on stdout at exit 0. All hooks in this repo follow: filter on stdin → output to stderr → exit 0 or exit 2.
Hook architecture
- 17 active hooks in
hooks/*.sh(4 blocking + 13 advisory/infra). See hooks/README.md for the full per-hook table and ADR-006 for why the set is this small — merge safety, review completeness, factchecking, context budgeting, and Codex call cadence are no longer hook-enforced; they are delegated to GitHub branch protection, the PR review workflow, and agent judgement guided byrules/*.md. hooks/_unused/contains 56 retired hooks + the formergate-modes/dispatcher architecture (7 modules, previously sourced by the now-retiredpr-ci-review-gate.sh). Do not copy or register these.- State files live in
<project>/.claude/state/. With the review pipeline retired,review-status.json/pr-review-lock.json/pending-review-comments.jsonare no longer read by any active hook.
Verification commands (matches CI)
CI runs 4 jobs on every PR / push to main or develop. Run the same checks locally:
shellcheck hooks/*.sh # warnings (informational)
shellcheck -S error hooks/*.sh # errors only (must pass)
bash -n hooks/*.sh scripts/*.sh setup.sh # syntax check each file
python3 -m json.tool settings.json # JSON validity
python3 -m json.tool .claude/settings.local.json
bash tests/test-*.sh # run all test suites (10 remain; 47+ retired to tests/_unused/)Delivery quality score: python3 scripts/delivery_score.py (or --json for CI).
Note: some of this script's inputs (e.g. review-pipeline state) describe
a pipeline retired by ADR-006; treat its hook-coverage metric as
referring to the current 17-hook set.
AI-created PR body contract (H5)
Before creating a PR, inspect the changed paths and write the H5 declarations from evidence already collected. Do not wait for the first CI failure to learn the input format, and do not copy claims that were not actually measured.
H5 applies when a change touches any of these structural paths:
hooks/**/*.sh(including direct children such ashooks/foo.sh)scripts/**/*.sh(including direct children such asscripts/foo.sh)settings.json.github/workflows/**- any path matched by a repository-root
.aidd-e2e-pathsdeclaration
For every applicable PR, add exactly one of these execution-boundary forms:
H5-E2E: noneUse none only when the change has no real execution environment. Otherwise
provide both lines; H5-E2E-OUT must contain at least 20 characters of raw
output or a stable log path.
H5-E2E: <command actually run>
H5-E2E-OUT: <raw output summary or log path, 20+ characters>Changes under the four built-in structural paths are also guard/verifier PRs. Their body must contain all of the following machine-readable declarations in addition to substantive template sections:
H5-guard: yes
H5-NEGATIVE: <known-bad input and measured red/exit result>
H5-LEDGER: <how each fire reaches aidd_ledger_append or guard-ledger.jsonl>
H5-RETIRE: <measurable retirement condition>
H5-SUBTRACTION: N/AReplace the final line with H5-RETIRE-PR: <number> only when that retirement
PR is already merged. H5-guard: no can describe a non-structural PR, but it
does not exempt any built-in structural path. These declarations enforce form
and honest visibility; they do not prove that the reported command or output is
truthful.
Skills
- Repo-owned (25):
skills/*/SKILL.md— each has YAML frontmatter + markdown body, following Anthropic progressive-disclosure structure. - Third-party (installed by
setup.sh, not vendored):ctx7@0.3.6,gstack(pinned commit, telemetry off),uipro-cli@2.2.3. These are gitignored and live under~/.claude/skills/after install. - gstack installs ~20 additional skills (browse, qa, ship, retro, etc.) listed in
.gitignoreunderskills/<name>/.
Key directories
| Path | Contents | Editable |
hooks/ | Shell hook scripts + gate-modes/ | Yes |
hooks/_unused/ | Retired hooks | No (reference only) |
rules/ | 7 global rule files (coding-style, git-workflow, quality, testing, delegation, hook-deployment, runbook) | Yes |
skills/*/ | Repo-owned skill definitions | Yes |
scripts/ | Utility scripts (codex orchestration, PR review, delivery scoring) | Yes |
docs/adr/ | Architecture decision records (001–006) | Yes |
.claude/state/ | Hook runtime state files | Only for state/debug tasks |
.opencode/ | Generated OpenCode files | No |
Do not edit
.claude/state/— runtime state, managed by hooks..opencode/— generated files.hooks/_unused/— retired hooks, kept for reference only.- Third-party skill directories (see
.gitignore).
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.

