agentic-grimoire / guidelines
CLAUDE.md2 starsChanged 10 days agoMITView on GitHub
Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed. Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment. Before finishing coding work, run the validation commands that match the changed scope (project scripts first, else the installed tool directly): Do not finish with known safe-to-fix issues in the changed scope. Do not weaken rules or hide failures. End every commit message with Claude Code's classic attribution, exactly: This replaces the model-named…
The file
Show its rules and text
We split this claude.md into the rules it gives an agent
14 rules. About 0 are common, 12 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
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 9
Before finishing coding work, run the validation commands that match the changed scope (project scripts first, else the installed tool …
- Distinctive: line 15
Do not finish with known safe-to-fix issues in the changed scope.
- Distinctive: line 35
Keep planning and final review on the top model and let Sonnet handle mechanical execution.
- Distinctive: line 36
Do not downgrade further (e.g.
- Distinctive: line 46
Keep planning and review on the main thread.
- Distinctive: line 59
If multiple interpretations exist, present them — don't pick silently.
- Distinctive: line 60
If a simpler approach exists, say so.
- Distinctive: line 61
If something is unclear, stop.
- Distinctive: line 67
No features beyond what was asked.
- Distinctive: line 69
If you write 200 lines and it could be 50, rewrite it.
- Distinctive: line 75
Don't "improve" adjacent code, comments, or formatting.
- Distinctive: line 77
Remove only the imports/variables YOUR changes made unused.
- Very specific: line 93
Use the context7 tool for library/framework/API documentation, setup, and configuration steps.
- Very specific: line 98
Prefer fd over find and rg over grep.
≈ “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.md — agentic-grimoire guidelines
Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.
Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment.
Validation
Before finishing coding work, run the validation commands that match the changed scope (project scripts first, else the installed tool directly):
- JS/TS:
lint,typecheck,format:check,testscripts — ornpx eslint .,npx tsc --noEmit,npx prettier --check . - Python:
uv run ruff check .,uv run ruff format --check .,uv run pyright,uv run pytest
Do not finish with known safe-to-fix issues in the changed scope. Do not weaken rules or hide failures.
Commits
End every commit message with Claude Code's classic attribution, exactly:
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>This replaces the model-named Co-Authored-By line and the Claude-Session session-id/URL
trailer the harness suggests — add neither.
(Codex has no default co-author trailer, so it attaches nothing — that is expected.)
Model Selection
For cost efficiency without quality loss, use the opusplan alias (/model opusplan):
Opus plans and reviews, then auto-switches to Sonnet for execution within the same session.
Keep planning and final review on the top model and let Sonnet handle mechanical execution.
Do not downgrade further (e.g. Haiku) for non-trivial work — failed loops cost more than they save.
Route subagents by difficulty — each agent's own model sets its cost, whatever model the
main session runs:
- research and hard analysis →
researcher(Opus) - implementing an already-decided plan →
executor(Sonnet) - codebase search →
Explore(Haiku), rather than reading widely inline, so the orchestrator's context stays clean
Keep planning and review on the main thread.
Keystone
Invoke the keystone skill before implementing non-trivial logic, structuring a module,
or judging whether existing code reads well — it carries the reading standard all code is
written to. React components, pages, and features take keystone-react on top of it.
1. Think Before Coding
Don't assume. Don't hide confusion. Surface tradeoffs.
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them — don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.
2. Simplicity First
Minimum code that solves the problem. Nothing speculative.
- No features beyond what was asked; no abstractions for single-use code.
- No "flexibility" that wasn't requested; no error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
3. Surgical Changes
Touch only what you must. Clean up only your own mess.
- Don't "improve" adjacent code, comments, or formatting; don't refactor what isn't broken.
- Match existing style. If you notice unrelated dead code, mention it — don't delete it.
- Remove only the imports/variables YOUR changes made unused.
- The test: every changed line traces directly to the request.
4. Goal-Driven Execution
Define success criteria. Loop until verified. Transform tasks into verifiable goals ("fix the bug" → "write a failing test that reproduces it, then make it pass"). For multi-step work, state a brief plan with a verify step per step.
5. Design Patterns
Reach for an established Gang-of-Four / architectural pattern before inventing structure — don't build a bespoke solution a reviewer must reverse-engineer.
Context7
Use the context7 tool for library/framework/API documentation, setup, and configuration
steps. Do not rely on memory for library versions or APIs when verification is possible.
Shell Tool Preferences
Prefer fd over find and rg over grep. If either is missing, say so and ask before installing.
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.

