agentleFS
grantkeegrantkee/claude-extensions/CLAUDE.md

claude-extensions

CLAUDE.md2 starsChanged 8 months agoMITView on GitHub

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

22 rules. About 0 are common, 20 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈20

    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
  1. Distinctive:

    If something goes sideways, STOP and re-plan immediately - don't keep pushing

    line 4
  2. Distinctive:

    Use plan mode for verification steps, not just building

    line 5
  3. Distinctive:

    Write detailed specs upfront to reduce ambiguity

    line 6
  4. Distinctive:

    Use subagents liberally to keep main context window clean

    line 8
  5. Distinctive:

    Always use opus subagents for execution and implementation tasks - not fable

    line 11
  6. Distinctive:

    Never use fable agent tokens for basic subagent tasks like file searching

    line 12
  7. Distinctive:

    Every agent returns a summary, not file dumps.

    line 17
  8. Very specific:

    Every subagent prompt names a checkpoint file (prefer the worktree's own tasks/ path) and requires a status: header plus a list of …

    line 19
  9. Distinctive:

    Every subagent prompt says: "on start, read your own checkpoint and continue from the first unfinished section."

    line 20
  10. Distinctive:

    If Write is refused, do not work around it — return the complete text in the final answer and let the orchestrator save it.

    line 21
  11. Very specific:

    After a 429 / session limit: read the checkpoint files on disk BEFORE assuming work was lost (the failure notice under-reports what …

    line 22
  12. Distinctive:

    After ANY correction from the user: update 'tasks/lessons.md" with the pattern

    line 24
  13. Distinctive:

    Write rules for yourself that prevent the same mistake

    line 25
  14. Distinctive:

    Never mark a task complete without proving it works

    line 29
  15. Distinctive:

    Ask yourself: "Would a staff engineer approve this?"

    line 31
  16. Distinctive:

    Run tests, check logs, demonstrate correctness

    line 32
  17. Distinctive:

    If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"

    line 35
  18. Distinctive:

    When given a bug report: identify the root of the problem before suggesting fixes

    line 39
  19. Distinctive:

    Plan First: Write plan to "tasks/plan.md" with checkable items

    line 43
  20. Distinctive:

    Verify Plan: Check in before starting implementation

    line 44
  21. Distinctive:

    Document Results: Add review section to 'tasks/todo.md"

    line 47
  22. Distinctive:

    Capture Lessons: Update 'tasks/lessons.md" after corrections

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Workflow Orchestration

1. Plan Mode Default

  • Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
  • If something goes sideways, STOP and re-plan immediately - don't keep pushing
  • Use plan mode for verification steps, not just building
  • Write detailed specs upfront to reduce ambiguity

2. Subagent Strategy

  • Use subagents liberally to keep main context window clean
  • Offload research, exploration, and parallel analysis to subagents
  • For complex problems, throw more compute at it via subagents
  • Always use opus subagents for execution and implementation tasks - not fable
  • Never use fable agent tokens for basic subagent tasks like file searching

2a. Scope, don't count (no fixed concurrency cap)

  • There is NO maximum number of concurrent subagents. Fan-out width follows from how independent the work is.
  • What IS capped is each agent's context. One narrow deliverable, an explicit list of paths it may read, and an instruction to hand back rather than explore past them.
  • Budget each agent well under ~250k tokens. An agent trending past that was scoped wrong: it checkpoints, hands back what it has, and the orchestrator respawns a fresh agent for the remainder. Never let one agent balloon to 300k+.
  • Every agent returns a summary, not file dumps.

2b. Checkpoint to disk so any session survives a rate limit

  • Every subagent prompt names a checkpoint file (prefer the worktree's own tasks/ path) and requires a status: header plus a list of completed sections, rewritten after EACH section — not once at the end.
  • Every subagent prompt says: "on start, read your own checkpoint and continue from the first unfinished section."
  • If Write is refused, do not work around it — return the complete text in the final answer and let the orchestrator save it.
  • After a 429 / session limit: read the checkpoint files on disk BEFORE assuming work was lost (the failure notice under-reports what landed), then resume with SendMessage naming the sections that already exist.

3. Self-Improvement Loop

  • After ANY correction from the user: update 'tasks/lessons.md" with the pattern
  • Write rules for yourself that prevent the same mistake
  • Ruthlessly iterate on these lessons until mistake rate drops
  • Review lessons at session start for relevant project

4. Verification Before Done

  • Never mark a task complete without proving it works
  • Diff behavior between main and your changes when relevant
  • Ask yourself: "Would a staff engineer approve this?"
  • Run tests, check logs, demonstrate correctness

5. Demand Elegance (Balanced)

  • For non-trivial changes: pause and ask "is there a more elegant way?"
  • If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
  • Skip this for simple, obvious fixes - don't over-engineer
  • Challenge your own work before presenting it

6. Autonomous Bug Fixes

  • When given a bug report: identify the root of the problem before suggesting fixes
  • Point at logs, errors, failing tests - then identify what caused them
  • Fix failing tests without being told how

Task Management

  1. Plan First: Write plan to "tasks/plan.md" with checkable items
  2. Verify Plan: Check in before starting implementation
  3. Track Progress: Mark items complete as you go
  4. Explain Changes: High-level summary at each step
  5. Document Results: Add review section to 'tasks/todo.md"
  6. Capture Lessons: Update 'tasks/lessons.md" after corrections

Core Principles

  • Simplicity First: Make every change as simple as possible. Impact minimal code.
  • No Laziness: Find root causes. No temporary fixes. Senior developer standards.
  • Minimat Impact: Changes should only touch what's necessary. Avoid introducing bugs.

Agent Triggering Manifest

Agents must be spawned proactively based on detected conditions, not reactively after the user asks. Claude's agent-spawning decisions should be driven by the agent's description frontmatter.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.