agentleFS
RajeshKalidandiRajeshKalidandi/dotclaude/CLAUDE.md

dotclaude

CLAUDE.md1 starsChanged 7 months agoMITView on GitHub

On EVERY new session, before doing any work: This is non-negotiable. A 30-second scan upfront saves hours of wrong assumptions. Before committing to any new feature or significant change: 1. Does this move a key metric? (users, revenue, retention, SEO) 2. Real pain or "nice to have"? If nice-to-have, deprioritize. 3. Can this be solved simpler or avoided entirely? 4. What happens if we don't build this? If the answer is "nothing much" — skip it. Before writing a new…

  • Reads credentials

The file

Show its rules and text

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

45 rules. About 0 are common, 36 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈36

    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
  1. Very specific:

    If missing: scan the project (package.json, README, tech stack, folder structure) and create a lean CLAUDE.md with: project purpose, tech …

    line 8
  2. Distinctive:

    If exists: read it and follow it

    line 9
  3. Very specific:

    If missing: create MEMORY.md index + initial memory files based on what you learn from the codebase (project overview, architecture …

    line 12
  4. Distinctive:

    If exists: read it for context before starting work

    line 13
  5. Distinctive:

    Use the full toolkit: parallel agents, worktrees, MCP servers, skills, plugins — whatever gets the best result fastest.

    line 21
  6. Distinctive:

    When a task has 2+ truly independent subtasks, use parallel agents (3-5) — don't serialize unnecessarily.

    line 22
  7. Distinctive:

    Default to direct tools (Grep, Read, Glob) for simple lookups — agents are for multi-step work.

    line 24
  8. Distinctive:

    Every output should be production-grade.

    line 25
  9. Distinctive:

    When uncertain between two approaches, prototype both quickly rather than debating.

    line 26
  10. Distinctive:

    Default to action — don't ask permission for routine decisions.

    line 30
  11. Distinctive:

    Keep responses terse during implementation.

    line 32
  12. Distinctive:

    If something is ambiguous, state your assumption and proceed.

    line 33
  13. Distinctive:

    Before committing to any new feature or significant change:

    line 37
  14. Distinctive:

    Test names describe behavior, not implementation: "rejects expired tokens" not "test validateToken"

    line 57
  15. Distinctive:

    Before writing a new utility, helper, or abstraction:

    line 68
  16. Very specific:

    Search the current repo first (grep/glob)

    line 69
  17. Very specific:

    Check npm/pip/crates.io for battle-tested packages

    line 71
  18. Distinctive:

    Use Context7 MCP for library docs before implementing against any API

    line 72
  19. Distinctive:

    Check if an MCP server, skill, plugin, or subagent handles it

    line 73
  20. Distinctive:

    Look for open-source projects solving 80%+ of the problem

    line 74
  21. Distinctive:

    Only build custom if nothing suitable found

    line 75
  22. Distinctive:

    When evaluating packages: check weekly downloads, last publish date, open issues, bundle size (bundlephobia.com), and transitive dependency …

    line 77
  23. Very specific:

    Use text not varchar(255), bigint not int for IDs, timestamptz not timestamp

    line 81
  24. Very specific:

    Use FOR UPDATE SKIP LOCKED for queue/worker patterns

    line 86
  25. Very specific:

    Run EXPLAIN ANALYZE on complex queries before shipping

    line 87
  26. Distinctive:

    Never assume API shapes or library interfaces — verify against docs, Context7, or existing code

    line 91
  27. Distinctive:

    If uncertain about a return type or behavior, say "unknown" and suggest validation

    line 92
  28. Distinctive:

    Never invent env var names or config keys — check the source

    line 93
  29. Distinctive:

    When using a library for the first time, read its actual usage in the codebase first

    line 94
  30. Distinctive:

    Run the actual tests/build before claiming something works

    line 102
  31. Distinctive:

    Every new public API/route gets a one-line JSDoc + example

    line 106
  32. Distinctive:

    Measure first: Never optimize without evidence (Lighthouse, Web Vitals, profiling).

    line 113
  33. Distinctive:

    All endpoints: <300ms at p95 (measure in staging.

    line 115
  34. Distinctive:

    Never do heavy work in the request path if it can be async/background

    line 117
  35. Distinctive:

    Keep database transactions short — never hold locks during API calls

    line 118
  36. Very specific:

    Before starting work on any project, read the memory/ directory for project context

    line 122
  37. Distinctive:

    After any architecture decision, update relevant project memory

    line 123
  38. Distinctive:

    After fixing a non-trivial bug, save the pattern to project memory

    line 124
  39. Distinctive:

    After learning a user preference or team convention, save to user/feedback memory

    line 125
  40. Very specific:

    Run /compact proactively at ~60% context

    line 126
  41. Distinctive:

    When encountering an error, check project memory for known patterns before investigating

    line 130
  42. Distinctive:

    Never guess at fixes — use systematic-debugging skill for anything non-obvious

    line 131
  43. Distinctive:

    Prefer deletion over addition

    line 136
  44. Distinctive:

    If naming is hard, understanding is weak

    line 137
  45. Distinctive:

    Every abstraction must justify its existence

    line 138

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

User-Level Rules (All Projects)

Project Onboarding (Auto-Scaffold)

On EVERY new session, before doing any work:

  1. Check for project-level CLAUDE.md at {project_root}/CLAUDE.md
    • If missing: scan the project (package.json, README, tech stack, folder structure) and create a lean CLAUDE.md with: project purpose, tech stack, key conventions, build/test/deploy commands, and architecture notes
    • If exists: read it and follow it
  2. Check for project memory at ~/.claude/projects/{project-path}/memory/MEMORY.md
    • If missing: create MEMORY.md index + initial memory files based on what you learn from the codebase (project overview, architecture decisions, key patterns)
    • If exists: read it for context before starting work
  3. Check for .env.example — understand required env vars before touching config

This is non-negotiable. A 30-second scan upfront saves hours of wrong assumptions.

Execution Quality

  • Use the full toolkit: parallel agents, worktrees, MCP servers, skills, plugins — whatever gets the best result fastest.
  • When a task has 2+ truly independent subtasks, use parallel agents (3-5) — don't serialize unnecessarily.
  • For large implementation plans, use subagent-driven-development to parallelize independent steps.
  • Default to direct tools (Grep, Read, Glob) for simple lookups — agents are for multi-step work.
  • Every output should be production-grade. No placeholders, no TODOs left behind, no "you'll need to add X later."
  • When uncertain between two approaches, prototype both quickly rather than debating.

Communication Style

  • Default to action — don't ask permission for routine decisions.
  • For architectural choices or irreversible changes, present 2-3 options with a recommendation.
  • Keep responses terse during implementation. Explain only when something is surprising or non-obvious.
  • If something is ambiguous, state your assumption and proceed.

Worth Building? (Build Filter)

Before committing to any new feature or significant change:

  1. Does this move a key metric? (users, revenue, retention, SEO)
  2. Real pain or "nice to have"? If nice-to-have, deprioritize.
  3. Can this be solved simpler or avoided entirely?
  4. What happens if we don't build this? If the answer is "nothing much" — skip it.

Code Conventions

  • Files: 200-400 lines typical, ~800 soft max. Prefer many small focused files unless the cohesion cost is high
  • Functions: under 50 lines preferred. Max 4 levels of nesting (use early returns)
  • No any types in TypeScript — always proper types
  • APIs return consistent shape: { data, error, meta }
  • Version APIs on breaking changes

Testing

  • Unit tests for pure logic (utils, transformers, validators)
  • Integration tests for API routes and database queries — hit real services, no mocks for data layer
  • E2E tests for critical user flows (auth, payments, core features)
  • Edge cases always tested: null, empty, max length, concurrent access, unauthorized
  • Test names describe behavior, not implementation: "rejects expired tokens" not "test validateToken"

Git Discipline

  • Conventional commits: feat:, fix:, refactor:, docs:, test:, chore:, perf:, ci:
  • Branch naming: feat/short-description, fix/short-description, refactor/short-description
  • PRs: aim for <400 lines changed. Split larger work into stacked PRs
  • Squash commits locally before opening PR

Search Before Building

Before writing a new utility, helper, or abstraction:

  1. Search the current repo first (grep/glob)
  2. GitHub code search: gh search code "pattern" for existing implementations
  3. Check npm/pip/crates.io for battle-tested packages
  4. Use Context7 MCP for library docs before implementing against any API
  5. Check if an MCP server, skill, plugin, or subagent handles it
  6. Look for open-source projects solving 80%+ of the problem
  7. Only build custom if nothing suitable found

When evaluating packages: check weekly downloads, last publish date, open issues, bundle size (bundlephobia.com), and transitive dependency weight.

Database Patterns (PostgreSQL/Supabase)

  • Use text not varchar(255), bigint not int for IDs, timestamptz not timestamp
  • Composite indexes: equality columns first, then range columns
  • Partial indexes for soft deletes: WHERE deleted_at IS NULL
  • Cursor pagination (WHERE id > $last) not OFFSET
  • RLS policies: always wrap in (SELECT auth.uid()) pattern
  • Use FOR UPDATE SKIP LOCKED for queue/worker patterns
  • Run EXPLAIN ANALYZE on complex queries before shipping

No Hallucinating APIs

  • Never assume API shapes or library interfaces — verify against docs, Context7, or existing code
  • If uncertain about a return type or behavior, say "unknown" and suggest validation
  • Never invent env var names or config keys — check the source
  • When using a library for the first time, read its actual usage in the codebase first

Verification

  • Edge cases tested for auth, payments, data mutations (null, empty, max length, concurrent)
  • Loading + error states handled in UI components
  • API failure paths handled (timeouts, 4xx, 5xx)
  • New API endpoints get structured logging (start, success, failure)
  • Run the actual tests/build before claiming something works

Documentation Discipline

  • Every new public API/route gets a one-line JSDoc + example
  • Non-obvious business rules get a comment in the nearest model/service
  • New env vars go in .env.example with a clear comment
  • Deletions/renames get a migration note in the project's changelog (if one exists)

Performance

Measure first. Never optimize without evidence (Lighthouse, Web Vitals, profiling).

  • All endpoints: <300ms at p95 (measure in staging; document exceptions)
  • Flag new dependencies over 50KB gzipped
  • Never do heavy work in the request path if it can be async/background
  • Keep database transactions short — never hold locks during API calls

Memory & Context

  • Before starting work on any project, read the memory/ directory for project context
  • After any architecture decision, update relevant project memory
  • After fixing a non-trivial bug, save the pattern to project memory
  • After learning a user preference or team convention, save to user/feedback memory
  • Run /compact proactively at ~60% context

Debugging

  • When encountering an error, check project memory for known patterns before investigating
  • Never guess at fixes — use systematic-debugging skill for anything non-obvious
  • Log the root cause and fix pattern after resolution so it's not repeated

Mental Models

  • Prefer deletion over addition
  • If naming is hard, understanding is weak
  • Every abstraction must justify its existence

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.