agentleFS
Leo-AtienzaLeo-Atienza/atlas-claude/examples/CLAUDE.md

atlas-claude / examples

CLAUDE.md4 starsChanged 4 months agoMITView on GitHub

Core principle: Act autonomously. Classify the task, route to the right tool/skill/workflow, and execute. Only ask when genuinely ambiguous. Think harder — push beyond surface-level answers, dig deeper into problems, consider edge cases, and deliver thorough, high-quality results every time. For deep guidance on any section below, read the matching playbook file (see Playbook Routing). Six commands cover everything. Slash or plain English, both work. These chain everything automatically. You never need to invoke workflows, reflect, or security scans directly…

The file

Show its rules and text

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

17 rules. About 0 are common, 7 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read session-state.md for fast resume.

    line 24
  2. Very specific:

    React to hook signals: When DREAM NEEDED or AUTO-DREAM TRIGGERED appears → run /dream immediately (NON-NEGOTIABLE).

    line 26
  3. Very specific:

    Every session gets reflected: No exceptions. Run /reflect at end of every session.

    line 30
  4. Very specific:

    Write session-state.md: before ending: { workflow, active_skills, branch, next_action }.

    line 38
  5. Very specific:

    All tasks route through Flow.

    line 54
  6. Distinctive:

    Search online proactively: Context7 (library docs) → WebSearch (general) → MCP registry (tools) → WebFetch (URLs).

    line 71
  7. Very specific:

    When a task matches a domain, look up the matching resource in REGISTRY.md and read its SKILL.md.

    line 75
  8. Very specific:

    Security: Every PR → sharp-edges. Every diff → differential-review.

    line 85
  9. Very specific:

    Prefer MCP over CLI. TOOL_SEARCH active — discover tools on demand.

    line 91
  10. Very specific:

    Use C:/tmp/claude-scratchpad/ for ALL temporary file needs.

    line 95
  11. Distinctive:

    When operating autonomously (auto mode, scheduled tasks, or agent hooks):

    line 99
  12. Distinctive:

    Never claim "done" without verification — tests pass, behavior confirmed

    line 116
  13. Distinctive:

    Never push/deploy without asking — explicit confirmation required

    line 117
  14. Very specific:

    Always security-scan before completion — sharp-edges on changed files

    line 118
  15. Distinctive:

    Always use specialist skills — look up the right ID in REGISTRY.md for domain work

    line 119
  16. Distinctive:

    When a skill, MCP server, or plugin is added/removed: update REGISTRY.md immediately.

    line 131
  17. Distinctive:

    If a skill, hook, or script is missing or fails: continue without it, note the failure in your response, and suggest a fix.

    line 137

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

Global Agent Instructions

Core principle: Act autonomously. Classify the task, route to the right tool/skill/workflow, and execute. Only ask when genuinely ambiguous. Think harder — push beyond surface-level answers, dig deeper into problems, consider edge cases, and deliver thorough, high-quality results every time.

For deep guidance on any section below, read the matching playbook file (see Playbook Routing).

Master Entry Points — Use These First

Six commands cover everything. Slash or plain English, both work.

CommandPlain EnglishWhen to use
/new [description]"build X", "create X", "new project X"Starting anything new
/resume"continue", "pick up where we left off"Returning to existing work
/task [description]"fix X", "add X", "review X", "explain X"One-off task in current session
/done"done", "wrap up", "that's it for today"End of session — reflects + commits
/ship"ship it", "push this", "create a PR"Commit + push + open PR
/dream"consolidate memories", "clean up memories"Deep memory consolidation — orient, merge, prune

These chain everything automatically. You never need to invoke workflows, reflect, or security scans directly — the entry points handle all of it.

Session Start

Read session-state.md for fast resume. Check .flow/ for active workflow. Check workflow.lock in project memory. Check for project-level CLAUDE.md. SessionStart hook handles reflection flags, conflicts, and handoffs automatically.

React to hook signals: When DREAM NEEDED or AUTO-DREAM TRIGGERED appears → run /dream immediately (NON-NEGOTIABLE). When AUTO-ACTIVATE ARCHIVED SKILLS appears → read the listed SKILL.md files and move entries from Archived to Active in REGISTRY.md.

Session End Protocol — MANDATORY

Every session gets reflected. No exceptions. Run /reflect at end of every session. If PreCompact hook fires, reflect IMMEDIATELY.

State File Precedence (when resuming, read in this order):

  1. .flow/state.yaml — Flow workflow state (authoritative for active Flow work)
  2. session-state.md (project root) — Ephemeral session snapshot
  3. ~/.claude/handoffs/<cwd-slug>.md — Git state + todos from Stop hook (per-CWD; slug replaces /, \, : with _)
  4. ~/.claude/sessions/handoff-*.md — Auto-continuation handoff (context limit hit)

Write session-state.md before ending: { workflow, active_skills, branch, next_action }.

Knowledge categories: G-PAT (patterns), G-SOL (solutions), G-ERR (mistakes), G-PREF (preferences), G-FAIL (failed approaches). Stored in INDEX.md → topics/. Rules: never silently overwrite, filter PII, sequential IDs.

Playbook Routing — Smart, Automatic

Playbook FileLoad When
skills/PLAYBOOK-WORKFLOWS.mdPlanning projects, choosing workflows, Flow lifecycle, classifying tasks
skills/PLAYBOOK-QUALITY.mdWriting code, security scans, DevOps generation, quality processes
skills/PLAYBOOK-TOOLS.mdUsing MCP servers, looking up slash commands, checking built-in skills, updating system

Rules: Load ONLY the one you need, never all three. If a task spans two domains, load the primary one first, then the secondary only if needed.

Task Routing — Flow

All tasks route through Flow. /flow:start auto-detects depth.

RouteWhen
/flow:start [desc]Any new work (auto-detects quick/standard/deep/epic)
/flow:plan → /flow:goMedium features (3-10 files)
/flow:quickSmall, well-defined tasks
/flow:debugBugs
/flow:shipCommit + push + PR
/flow:smart-swarm [desc]Complex tasks needing multiple agents (auto-scores complexity)
/continueResume from auto-continuation handoff file
Just do itTrivial (<20 lines, 1 file)

Full commands: skills/flow/SKILL.md. .flow/ exists → /flow:status for context.

Research — Automatic

Search online proactively: Context7 (library docs) → WebSearch (general) → MCP registry (tools) → WebFetch (URLs). Do not guess when you can look up.

Auto-Activation — On-Demand

When a task matches a domain, look up the matching resource in REGISTRY.md and read its SKILL.md. Activation priority: (1) language/framework, (2) security on PR completion, (3) domain specialist, (4) tool specialist. Max 2 specialist skills loaded simultaneously.

Self-Evolution: Capability gap detected → activate self-evolve (SK-038). Ask before adding external MCP servers.

Smart Swarm: TEAM (8-11) or SWARM (12-15) complexity → AUTOMATICALLY deploy agents via /flow:smart-swarm. DUO (5-7) → spawn 2 agents. SOLO (0-4) → execute directly.

Auto-Continuation: At 70% context, write handoff file when instructed. Chain depth limit: 5 sessions.

Security: Every PR → sharp-edges. Every diff → differential-review. Auth/crypto → insecure-defaults. Found vuln → variant-analysis.

Quality: TDD red→green→refactor. Reflexion if complexity>10, nesting>3, fn>50 lines. Context7 before recommending library patterns.

MCP — Lazy via TOOL_SEARCH

Prefer MCP over CLI. TOOL_SEARCH active — discover tools on demand. One Context7 (MCP_DOCKER), one browser stack (Chrome=interactive, Preview=testing). shadcn MCP for components. Full routing: skills/PLAYBOOK-TOOLS.md.

Scratchpad Directory

Use C:/tmp/claude-scratchpad/ for ALL temporary file needs. Create on first use: mkdir -p /c/tmp/claude-scratchpad/.

Auto Mode

When operating autonomously (auto mode, scheduled tasks, or agent hooks):

  1. Execute immediately — make reasonable assumptions, proceed on low-risk work
  2. Minimize interruptions — prefer assumptions over questions for routine decisions
  3. Prefer action over planning — do not enter plan mode unless explicitly asked
  4. No destructive actions — deletions/production changes still need confirmation
  5. No data exfiltration — don't post to external services unless directed

Context Budget

Load only what the task needs: 1 playbook, max 2 skills, INDEX.md scan (deep-read topics only when relevant). /clear at >70% usage. When tight, use inline knowledge over SKILL.md files.

Mistake Learning — Automatic

Hooks capture tool failures to logs/failures.jsonl. When RECURRING FAILURE signal appears → run /learn immediately. After user correction → offer /learn. When MISTAKE LEARNING signal appears → run /analyze-mistakes before other work.

Validation Gates — Non-Negotiable

  1. Never claim "done" without verification — tests pass, behavior confirmed
  2. Never push/deploy without asking — explicit confirmation required
  3. Always security-scan before completion — sharp-edges on changed files
  4. Always use specialist skills — look up the right ID in REGISTRY.md for domain work

When to Ask the User

Ask (with multiple-choice + defaults): ambiguous architecture, genuinely unclear scope, destructive ops, deployments, greenfield tech choices.

Never ask (just do it): tests, security scans, reading skill files, MCP tools, TDD, code validation, online research for context.

Resource Lookup — Central Registry

~/.claude/skills/REGISTRY.md is the single source of truth for all skills, MCP servers, and plugins. Scan the Purpose column to find matching resource by ID, jump to its Path. Never scan skill directories end-to-end.

When a skill, MCP server, or plugin is added/removed: update REGISTRY.md immediately.

After any system infrastructure change (hooks, commands, settings.json, skills): update SYSTEM_CHANGELOG.md and REGISTRY.md. Non-negotiable.

Graceful Degradation

If a skill, hook, or script is missing or fails: continue without it, note the failure in your response, and suggest a fix. Never halt a session over broken infrastructure.

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.