claude-bootstrap
CLAUDE.md1 starsChanged 7 months agoApache-2.0View on GitHub
Context for Claude (and humans) working inside this repository. If you're an end user who ran the installer in your own project, this file isn't yours — your generated CLAUDE.md is. CI (.github/workflows/ci.yml) runs the suite on Linux + macOS for every push and PR.
- Pipes a download into a shell
In this repository14 other files it gives its agents.
- analyze-repoSkill
- augmentSkill
- code-reviewSkill
- context-guardSkill
- dep-checkSkill
- doctorSkill
- forgeSkill
- git-workflowSkill
- learnSkill
- onboardingSkill
- security-scanSkill
- self-updateSkill
- test-runnerSkill
- tipsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Never gate PreCompact logic on a tool name.
- Very specific: line 32
Write paths differ: Write→content, Edit→new_string, MultiEdit→edits[].new_string.
- Very specific: line 36
Every skill directory has a SKILL.md with name + description.
- Distinctive: line 40
Prefer a hook over a CLAUDE.md "NEVER" rule — hooks are 100% reliable, prose ~70%.
≈ “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
claude-bootstrap — Repo Guide
Context for Claude (and humans) working inside this repository. If you're an end user who
ran the installer in your own project, this file isn't yours — your generated CLAUDE.md is.
What this project is
A tool that installs a professional Claude Code setup into any project. Philosophy:
deterministic core, AI for judgment. A real installer does the reliable work; the LLM is
only used for optional, interactive tailoring (the /bootstrap command).
Architecture
install.sh— the entry point. Detects stack, resolves tier, backs up, copies components, rendersCLAUDE.md, writesSESSION_STATE.md+.claude/.bootstrap.json, validates. Runs viacurl | bash(self-downloads the library) or from a clone. Zero LLM calls.scripts/render.py— pure substitution: tier template + detected facts → finalCLAUDE.md.scripts/validate.sh— verifies a setup (agents/skills/commands/hooks/JSON);--quiet/--json.scripts/format.sh— manual multi-language formatter.scripts/bootstrap.sh— shim →install.sh..claude/is the component library that gets copied into user projects:agents/one job each, read-only unless they must write.skills/every dir MUST containSKILL.md(a skill without it does not load).commands/slash commands (/plan,/review,/ship, …).hooks/shell guardrails (see contracts below).settings.jsonwires hooks to events.
docs/stacks/*per-stack reference;docs/templates/<tier>/tier templates;docs/FORMATS.mdspecs.
Hook contracts (get these exactly right — past bugs lived here)
- Hooks receive JSON on stdin, never positional args.
PreToolUseblocks with exit 2 and the reason on stderr (Claude reads stderr on block).PreCompactpayloads containtrigger/custom_instructions— notool_name/tool_input. Never gate PreCompact logic on a tool name.SessionStartinjects context via JSONhookSpecificOutput.additionalContext.- Write paths differ: Write→
content, Edit→new_string, MultiEdit→edits[].new_string.
Hard rules
- One agent = one job; scope its
tools; route read-only work to Haiku. - Every skill directory has a
SKILL.mdwithname+description. CLAUDE.md(this one and generated ones) stays ≤150 lines.- Single source of truth for the repo URL:
REPO_OWNER/REPO_NAMEininstall.sh(owner is shivae372 — a wrong owner is what made the old installer 404). - Prefer a hook over a CLAUDE.md "NEVER" rule — hooks are 100% reliable, prose ~70%.
Testing (always before committing)
bash tests/run.sh # full suite: syntax, hooks, detection, install e2e, regressions
bash scripts/validate.sh # validate this repo's own .claude/CI (.github/workflows/ci.yml) runs the suite on Linux + macOS for every push and PR.
Conventions
- Bash:
#!/usr/bin/env bash,set -uo pipefail, GNU/BSD-portablesed, no/dev/fdprocess substitution (some sandboxes lack it — use temp files). - Commits: conventional (
feat:,fix:,docs:…). KeepVERSIONandCHANGELOG.mdin sync on release.
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.

