claude-code-toolkit / user-level-reference
CLAUDE.md4 starsChanged 7 months agoMITView on GitHub
This machine runs Windows 11 with Git Bash as the shell. Worktrees for repos under G:/git/ go in G:/git/.worktrees/<repo-name>/<worktree-name> (e.g. G:/git/.worktrees/mcp-dev-servers/fix-parser), never inside the repo. This is the "declared worktree directory preference" that superpowers:using-git-worktrees looks for first, so it overrides that skill's .worktrees/-at-project-root default without prompting. It also applies to any manual git worktree add — pass this path explicitly. - The parent dir is outside every repo, so no .gitignore entry is needed or checked; if the skill's "verify…
- Commits and pushes
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- challengeSkill
- commitSkill
- contribute-upstreamSkill
- jevSkill
- karpathy-guidelinesSkill
- mcp-usageSkill
- retro-reviewSkill
- sprintSkill
- sync-templateSkill
The file
We split this CLAUDE.md into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Use Unix commands (ls, cp, rm, mkdir -p) — Git Bash supports them
- Distinctive: line 8
Avoid Windows-only commands (dir, type, copy, del) — they fail in bash
- Very specific: line 10
Avoid cat in Bash commands — fails on Windows paths with spaces.
- Very specific: line 11
Avoid grep -r in Bash — pick the search tool from the Read & Search Tool Selection table below
- Distinctive: line 43
Do NOT delegate file writes to sub-agents for files with complex escaping (regex, nested quotes, template literals, TOML/YAML with special …
- Distinctive: line 46
When a sub-agent write fails with escaping issues, rewrite the file directly
- Distinctive: line 72
After creating a CLI tool or installable package, always include setup/install instructions in the output and README before considering the …
- Very specific: line 84
BEFORE responding to a new feature or design idea → invoke superpowers:brainstorming.
- Very specific: line 85
BEFORE responding to a bug report, test failure, or unexpected behavior → invoke superpowers:systematic-debugging.
- Very specific: line 86
BEFORE claiming work complete or opening a PR → invoke superpowers:verification-before-completion.
≈ “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
User-Level Rules (All Projects)
Platform: Windows + Git Bash
This machine runs Windows 11 with Git Bash as the shell.
- Use Unix commands (ls, cp, rm, mkdir -p) — Git Bash supports them
- Avoid Windows-only commands (dir, type, copy, del) — they fail in bash
- Path separators: forward slashes work everywhere in bash
- Avoid
catin Bash commands — fails on Windows paths with spaces. Use the Read tool for file reading - Avoid
grep -rin Bash — pick the search tool from the Read & Search Tool Selection table below - PO / main thread only (subagents do not have MCP servers — never route these to a spawn): read release notes via the MCP GitHub tools, and cut GitHub releases with them rather than
gh release create - PowerShell 5.1 reads BOM-less UTF-8 as ANSI — never rewrite files containing non-ASCII via PS
Get-Content/WriteAllText(mojibakes—into—). Use Bash/the Edit tool, or read with[IO.File]::ReadAllText($path, [Text.Encoding]::UTF8) - Multi-line/compound Bash commands can be conservatively blocked by guard hooks (unparseable → fail-closed). Write the logic to a script file -- with the Write tool, never a heredoc -- and run
bash <path>— the guard hooks read the script's first 16 KB, so agit commit/merge/pushinside it is gated exactly as if typed (a script that calls another script is not followed) - context-mode sandbox
/tmppaths are invisible to nativegit -C("cannot change to ..."). Run git-dependent scripts and fixtures via the Bash tool (real Git Bash), notctx_execute
Git Worktrees — declared location
Worktrees for repos under G:/git/ go in G:/git/.worktrees/<repo-name>/<worktree-name>
(e.g. G:/git/.worktrees/mcp-dev-servers/fix-parser), never inside the repo.
This is the "declared worktree directory preference" that superpowers:using-git-worktrees looks
for first, so it overrides that skill's .worktrees/-at-project-root default without prompting.
It also applies to any manual git worktree add — pass this path explicitly.
- The parent dir is outside every repo, so no
.gitignoreentry is needed or checked; if the skill's "verify the directory is ignored" step objects, that check assumes a project-local directory and does not apply here. - Exception, not configurable: Claude Code's own
EnterWorktreetool always creates under<repo>/.claude/worktrees/. There is no setting for its location (worktree.baseRefis the onlyworktree.*setting, and it selects the base ref, not the path). To keep worktrees in the declared location, usegit worktree addrather thanEnterWorktree. - Clean up stale registrations with
git worktree pruneafter removing a worktree directory.
Sub-Agent Model Choice
- Every Agent spawn names its
modelexplicitly — unless Jev routing is on in this repo (/cct:jev on; a session-start line announces it), then omitmodeland Jev picks one per launch. A type without its own model (general-purpose, other built-ins,model: inherit) otherwise inherits the orchestrator's — the most expensive one (measured: 31 such spawns ran on Opus/Fable). - The orchestrator picks per task: reading, searching, summarising, extracting →
haiku; implementing, testing, fixing from a clear brief →sonnet; reviewing safety-critical code, architecture, debugging an unclear cause →opus;fableonly whenopusis not enough. Raiseeffortfor many-step work or verification that is easy to skip; lower it for lookups. - A typed agent's own
model:is the default when the task fits it; a decider model (Jev) may later route within these bounds.
Sub-Agent File Write Discipline
- Do NOT delegate file writes to sub-agents for files with complex escaping (regex, nested quotes, template literals, TOML/YAML with special chars)
- Sub-agents are excellent for: read-only exploration, code review, test execution
- When a sub-agent write fails with escaping issues, rewrite the file directly
- For multi-file batches: prefer writing files sequentially over delegating to one agent
Read & Search Tool Selection
Read loads file contents directly into the main context window (measured at 22% of total context across recent claude-code-toolkit sessions — the largest actionable bucket after bulk assistant_tool_use and assistant_thinking). hooks/read-size-gate.sh now enforces the limit mechanically: it caps a Read at 500 lines, rewrites the call, and tells you the next offset. Use Read only for files you will immediately Edit or Write. Route everything else by this table — it supersedes any other search/read guidance:
| Need | Tool |
| Find where X is defined/used (needle search) | Grep tool |
| Read a file you will Edit/Write | Read |
| Analyze/summarize one file (no edit) | Read with limit/offset, or a cct:Explore subagent if the file is large |
| Multi-file research/gathering | cct:Explore subagent (haiku, effort: low) — returns ranked path:line findings, not file contents |
| Open-ended codebase exploration | cct:Explore subagent |
| Browse directory contents | Glob |
Auto-Memory
Auto-memory MEMORY.md loads only its first 200 lines / 25 KB — keep it an index; move detail into topic files.
cct plugin
Agents, skills, the report style and the toolkit hooks come from the cct@dagonet plugin. The style is selected as "outputStyle": "cct:pm-report" (a plugin style loads only under its prefix).
New Project Setup
After creating a CLI tool or installable package, always include setup/install instructions in the output and README before considering the task complete.
When the user asks to "set up a new project" or "bootstrap a project" from the claude-code-toolkit repo, read AGENTS.md at the toolkit repo root and follow it — it drives variant selection + Q&A + setup-project.sh/.ps1 invocation. Do not attempt to derive build/test commands yourself; pass the user's answers as flags.
Superpowers Skills — MUST Invoke Before Responding
Requires the superpowers plugin. Invoke via the Skill tool.
Hard triggers (MUST)
These are not optional. If the trigger fires, invoke the named skill BEFORE generating any other response:
- BEFORE responding to a new feature or design idea → invoke
superpowers:brainstorming. - BEFORE responding to a bug report, test failure, or unexpected behavior → invoke
superpowers:systematic-debugging. - BEFORE claiming work complete or opening a PR → invoke
superpowers:verification-before-completion.
Strong triggers (SHOULD)
Apply unless another skill already covers the same ground:
- Multi-step implementation about to start → invoke
superpowers:writing-plans, thensuperpowers:executing-plansonce the plan is approved. - Writing production code → invoke
superpowers:test-driven-developmenttogether withkarpathy-guidelines. - Requesting / digesting code review →
superpowers:requesting-code-review/superpowers:receiving-code-review.
Meta skills (no explicit trigger)
superpowers:using-superpowers— auto-loaded at session start; establishes skill-use protocol.superpowers:writing-skills— invoke only when creating or editing a skill.
context-mode plugin
context-mode is optional and, since v3.1.5, not recommended: its guidance arrives three times per turn through its own hooks, and its MCP launcher appends a routing block to every project CLAUDE.md on every server spawn (mcp-servers/HOWTO.md has the measurements). If installed, its SessionStart hook injects its own guidance; do not duplicate it here.
Subagents do not have ctx_* tools — never instruct them to use ctx_*.
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.

