agentleFS
SirCharanSirCharan/claude-code-harness/CLAUDE.md

claude-code-harness

CLAUDE.md0 starsChanged 5 months agoMITView on GitHub

A generic, reusable CLAUDE.md skeleton for Claude Code. Fill the About / projects / infra blanks with your own context, delete what you don't need, and keep it short — a bloated CLAUDE.md gets ignored (Anthropic's own guidance). The real power lives in the skills/ (loaded on demand), so this file stays lean and points at them.

  • Deletes or force-pushes

The file

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

11 rules. About 0 are common, 2 are distinctive, and 9 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.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Interview me first — get a full download before building: Use AskUserQuestion (2–4 options, multiSelect when relevant) before assuming …

    line 14
  2. Very specific:

    Sync first: before editing a repo: git status && git log --oneline -5 && git log --oneline -5 origin/main.

    line 21
  3. Very specific:

    Explore → Plan → Code → Commit: Read the relevant code first.

    line 26
  4. Very specific:

    Always hand work a verification check (test/typecheck/build/live URL) so it self-checks.

    line 27
  5. Very specific:

    Context is the bottleneck: Use subagents for investigation (they return tight summaries).

    line 28
  6. Very specific:

    Pre-commit gate: run lint + types + tests BEFORE every commit (the block-no-verify hook enforces it).

    line 47
  7. Distinctive:

    Commit + push promptly; push-then-tag, never tag-then-push.

    line 48
  8. Distinctive:

    Before marking a task complete: confirm tests pass AND the live surface reflects the change.

    line 49
  9. Very specific:

    Before building/restyling any web UI, load the design-system skill first — it routes to the matching per-type design skill and supplies …

    line 52
  10. Very specific:

    Never paste secret values in chat (the secret-scan hook warns if you do).

    line 56
  11. Very specific:

    Don't weaken lint/type/CI configs silently (the config-protection hook asks first).

    line 58

≈ “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.

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

Standing instructions (CLAUDE.md template)

A generic, reusable CLAUDE.md skeleton for Claude Code. Fill the About / projects / infra blanks with your own context, delete what you don't need, and keep it short — a bloated CLAUDE.md gets ignored (Anthropic's own guidance). The real power lives in the skills/ (loaded on demand), so this file stays lean and points at them.

About me / my projects

  • <Who you are, your role, the stack you work in.>
  • <Your main repos + where they live + how they deploy.>
  • <Any persistent context an assistant should read at session start.>

At the start of every non-trivial prompt

  1. Interview me first — get a full download before building. Use AskUserQuestion (2–4 options, multiSelect when relevant) before assuming requirements. Surface the ambiguities I might not have spelled out across: scope (in/out), target environment, output shape, tradeoffs (speed vs thoroughness / cost), done-criteria. Recommend a default per question so it's a confirmation, not a blank. (Anthropic's own "interview-first spec" recommendation — see the working-with-claude skill.)
    • Skip only for one-line lookups, single trivial commands, or when I answered the same question this turn.
  2. Plan with a task list for any task with 3+ distinct steps; execute step-by-step, mark each done inline.
  3. Sync first before editing a repo: git status && git log --oneline -5 && git log --oneline -5 origin/main; rebase if behind. (Repos with auto-writers drift constantly.)

Working with Claude (operating principles)

Load the working-with-claude skill for the full playbook; the always-on rules:

  • Explore → Plan → Code → Commit. Read the relevant code first; for 3+ step work, plan before coding. Always hand work a verification check (test/typecheck/build/live URL) so it self-checks.
  • Context is the bottleneck. Use subagents for investigation (they return tight summaries); /clear between unrelated tasks; keep this file lean.
  • Match the machinery to the task. An agent ≈ 4× a chat turn's tokens; multi-agent ≈ 15×. Fan out / run a workflow only when the task value justifies it. Don't multi-agent a trivial task.
  • Research locally first: inspect local code/logs/config before the web; browse only for external facts.
  • Cost/speed defaults: stable prompt prefix first (cache reads ≈ 0.1× base); cheap model for noisy/bulk, mid for default, top tier for reasoning/agentic; cap output, ask concise; parallel tool calls in one message.

How to communicate with me

  • Be terse; no trailing "summary of what I did". Preserve raw tool output when it matters. Match response length to task complexity. No emojis unless asked.

How to delegate to subagents

  • Brief them like a colleague who just walked in (no session context). Structure prompts with XML tags (<task>, <context>, <constraints>, <output_format>). Cap response length. Pick model by task (top tier for synthesis/review, mid for implementation, cheap for noisy work). Run independent subagents in parallel (multiple tool calls in one message).

How to ship code

  • Pre-commit gate: run lint + types + tests BEFORE every commit (the block-no-verify hook enforces it).
  • Commit + push promptly; push-then-tag, never tag-then-push. For UI/web changes, verify the live deploy.
  • Before marking a task complete: confirm tests pass AND the live surface reflects the change.

Design (load before any web/UI work)

  • Before building/restyling any web UI, load the design-system skill first — it routes to the matching per-type design skill and supplies tokens, fonts, a11y, components, motion, and a premium-feel checklist.

Safety

  • Never paste secret values in chat (the secret-scan hook warns if you do). Use env files.
  • Confirm before destructive actions (rm -rf, force-push, hard reset, dropping data, killing prod).
  • Don't weaken lint/type/CI configs silently (the config-protection hook asks first).

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.