claude-code-starter
CLAUDE.md2 starsChanged 4 months agoMITView on GitHub
This file guides Claude Code when working inside this repo. For user-facing documentation, see README.md. Portable Claude Code configuration — agents, commands, rules, hooks, skills, and tooling. Fork it, customize it, run the setup script to bring any machine's Claude Code environment up to speed. The setup.sh output reports actual counts at install time.
- Commits and pushes
In this repository4 other files it gives its agents.
- config/CLAUDE.mdCLAUDE.md
- dev/CLAUDE.mdCLAUDE.md
- harness-setupSkill
- security-scanSkill
The file
Files
CLAUDE.md
This file guides Claude Code when working inside this repo. For user-facing documentation, see README.md.
What this repo is
Portable Claude Code configuration — agents, commands, rules, hooks, skills, and tooling. Fork it, customize it, run the setup script to bring any machine's Claude Code environment up to speed.
Where things live
config/CLAUDE.md— Global behavioral rules that get installed to~/.claude/CLAUDE.md(symlinked at install). Edit there to change rules that apply to all of Claude's sessions on a machine.config/rules/— Global project-instruction rule files (security, git workflow, agents, performance, verification). Installed to~/.claude/rules/. Code-specific rules (style, testing, patterns) live indev/rules/instead, path-scoped viapaths:frontmatter.config/commands/— Slash command definitions. Installed to~/.claude/commands/. Filename becomes command name.config/scripts/hooks/— Lifecycle hooks (session start/end, pre/post tool use, the MCP tool-poisoning warn hook, and the indirect-injection taint gate). Installed to~/.claude/scripts/hooks/.config/scripts/lib/— Shared utilities (utils.js,obsidian.js,package-manager.js,mcp-scan.js,taint.js).config/scripts/(top level) — Standalone CLIs:check-mcp-health.js,scan-mcp-tools.js(MCP tool-poisoning scanner),audit-tool-responses.js(retrospective indirect-injection audit). Installed to~/.claude/scripts/.config/data/— Static data files:security-regex-patterns.json(secret/vuln patterns),mcp-poisoning-patterns.json(tool-poisoning signature pack). Installed to~/.claude/data/.config/settings.hooks.json— Canonical hooks + statusLine block, surgically merged into the user's~/.claude/settings.jsonbymerge-hooks-settings.js.agents/— Sub-agent prompts. Installed to~/.claude/agents/.skills/— Static skills.security-scanandharness-setupare the generic skills shipped;config/skills/learned/accumulates patterns from/learn.dev/— Optional dev-layer files installed to$DEV_ROOT(parent of this repo) when present. Provides$DEV_ROOT/CLAUDE.mdplus everydev/rules/*.mdat$DEV_ROOT/.claude/rules/for multi-project folders. Setup symlinks the whole glob, so a new rule file needs no script edit.setup.sh/setup.ps1— Installers. Re-run after editing any of the above.
Working in this repo
- Edit config here, not in
~/.claude/— setup scripts copy this repo onto~/.claude/(and symlink CLAUDE.md / learned/), so edits to installed files get overwritten. - Re-run setup after edits —
./setup.sh(mac/linux) or.\setup.ps1(Windows). Or./setup.sh --dry-runto preview. config/skills/learned/is symlinked from~/.claude/skills/learned/— so/learnwrites here directly, andgit pushsyncs learned skills across machines.- No build step, linter, or test suite. Scripts are Node.js (builtins only, no npm install).
- MCP servers register per-machine. Their registrations live in
~/.claude.json, which is not tracked here. Seeexamples/mcp-server-example.mdfor the pattern.
Counts (for quick reference)
| Component | Count |
| Agents | 14 |
| Commands | 10 |
| Hooks (lifecycle scripts) | 15 |
| Rules | 5 global (config/rules/) + 4 dev-layer (dev/rules/) |
| Contexts | 3 |
| Skills (bundled) | 2 (security-scan, harness-setup) |
The setup.sh output reports actual counts at install time.
Setup-script flags
| Flag | sh | ps1 | What it does |
| Dry run | --dry-run or DRY_RUN=1 | -DryRun | Preview all writes/links without applying |
| Force overwrite | FORCE=1 | -Force | Copy files regardless of timestamps |
| Keep stale files | NO_PRUNE=1 | -NoPrune | Don't delete ~/.claude/ files that aren't in this repo |
| Override DEV_ROOT | DEV_ROOT=path | $env:DEV_ROOT = "path" | Point dev-layer symlinks somewhere other than the parent of this repo |
References
- Claude Code: Session Management and 1M Context — Anthropic's guide to context rot, compaction, rewind, and subagents
- Andrej Karpathy's Claude Code setup — Inspiration for session persistence hooks
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.

