exosuit / hooks
CLAUDE.md9 starsChanged 3 months agoMITView on GitHub
POSIX shell hook scripts with text-based rule configuration. No Python or other runtime required. See README.md for full hook documentation including profiles, runtime disabling, and pattern severity. All hooks call lib/hook-guard.sh to check: - EXOSUIT_PROJECT_PROFILE (lean/standard/strict) — project complexity profile; controls skill behavior and derives default hook profile. Read from env var, then CLAUDE.md **Profile:** line, then defaults to standard. - EXOSUIT_HOOK_PROFILE (minimal/standard/strict) — explicit hook profile override; if not set, derived from project profile (lean→minimal, standard→standard, strict→strict) - EXOSUIT_DISABLED_HOOKS…
In this repository56 other files it gives its agents.
- .claude/agents/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/prompts/CLAUDE.mdCLAUDE.md
- .claude/rules/CLAUDE.mdCLAUDE.md
- .claude/skills/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- vision/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- scaffold/llms.txtllms.txt
- architecture-checkSkill
- backlog-reviewSkill
- bootstrapSkill
- brainstormSkill
- buildSkill
- claude-sense-checkSkill
- code-qualitySkill
- commitSkill
- continueSkill
- custom-hooksSkill
- dashboardSkill
- debug-sessionSkill
- deploySkill
- discoverSkill
- doctorSkill
- fix-issueSkill
- framework-upgradeSkill
- handoffSkill
- help-meSkill
- ideateSkill
- lanesSkill
- manual-testSkill
- merge-downSkill
- merge-upSkill
- optimizeSkill
- parallel-workSkill
- performance-checkSkill
- phase-reviewSkill
- pr-statusSkill
- quality-checkSkill
- quickstartSkill
- refine-loopSkill
- researchSkill
- retrospectiveSkill
- security-auditSkill
- skill-createSkill
- skill-evalSkill
- sprint-endSkill
- sprint-startSkill
- story-cycleSkill
- testing-cycleSkill
- test-validatorSkill
- UAT-cycleSkill
- undo-workSkill
- uninstallSkill
- weekly-maintenanceSkill
- wrap-upSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Create <event-name>.sh (POSIX sh) that reads JSON from stdin
- Very specific: line 13
Add "$HOOKS_DIR/lib/hook-guard.sh" "<hook-id>" "<min-profile>" || exit 0 near the top
- Very specific: line 14
Add rules in rules/<name>.patterns if needed
- Very specific: line 22
All hooks call lib/hook-guard.sh to check:
- Distinctive: line 31
Use staged-only file checks, not full repo scans
- Distinctive: line 33
If a hook consistently exceeds 5s, split into fast (local hook) and comprehensive (CI) checks
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.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
Hooks Directory
POSIX shell hook scripts with text-based rule configuration. No Python or other runtime required.
- Each hook event has its own
.shscript (self-contained) - Rules in
rules/*.patterns(@@-delimited) andrules/*.conf(key=value) - State in
state/directory (plain text files: counters, timestamps) - JSON extraction: tries
jq, falls back tosed(no hard dependency on jq) - Profile gating via
lib/hook-guard.shandEXOSUIT_HOOK_PROFILEenv var
Adding a new hook:
- Create
<event-name>.sh(POSIX sh) that reads JSON from stdin - Add
"$HOOKS_DIR/lib/hook-guard.sh" "<hook-id>" "<min-profile>" || exit 0near the top - Add rules in
rules/<name>.patternsif needed - Register the event in
.claude/settings.json - Document in README.md
See README.md for full hook documentation including profiles, runtime disabling, and pattern severity.
Hook Guard
All hooks call lib/hook-guard.sh to check:
EXOSUIT_PROJECT_PROFILE(lean/standard/strict) — project complexity profile; controls skill behavior and derives default hook profile. Read from env var, then CLAUDE.md**Profile:**line, then defaults to standard.EXOSUIT_HOOK_PROFILE(minimal/standard/strict) — explicit hook profile override; if not set, derived from project profile (lean→minimal, standard→standard, strict→strict)EXOSUIT_DISABLED_HOOKS(comma-separated IDs) — skips individually disabled hooksEXOSUIT_EXPLAIN_MODE(off/brief/verbose) — controls message verbosity (brief = default)EXOSUIT_STOP_MAX_ITERATIONS— overrides stop hook safety valve (default 5, strict profile defaults to 10, ≤0 = no limit)
Performance
- Pre-edit and post-edit hooks MUST complete in <5 seconds — slow hooks get disabled
- Use staged-only file checks, not full repo scans
- Format only the edited file, not the entire project
- If a hook consistently exceeds 5s, split into fast (local hook) and comprehensive (CI) checks
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.

