CLAUDE.md
references/repos-referencia/claude-code-best-practice/CLAUDE.mdCLAUDE.md
Quality
69/100
Scores the file, not the repository.Length
887 words
16 headings · 1 code blocksRepository
35
— · pushed 145 days agoLast changed
3 days ago
First indexed 3 days ago.1# CLAUDE.md23This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.45## Repository Overview67This is a best practices repository for Claude Code configuration, demonstrating patterns for skills, subagents, hooks, and commands. It serves as a reference implementation rather than an application codebase.89## Key Components1011### Weather System (Example Workflow)12A demonstration of two distinct skill patterns via the **Command → Agent → Skill** architecture:13- `/weather-orchestrator` command (`.claude/commands/weather-orchestrator.md`): Entry point — asks user for C/F, invokes agent, then invokes SVG skill14- `weather-agent` agent (`.claude/agents/weather-agent.md`): Fetches temperature using its preloaded `weather-fetcher` skill (agent skill pattern)15- `weather-fetcher` skill (`.claude/skills/weather-fetcher/SKILL.md`): Preloaded into agent — instructions for fetching temperature from wttr.in API16- `weather-svg-creator` skill (`.claude/skills/weather-svg-creator/SKILL.md`): Skill — creates SVG weather card, writes `orchestration-workflow/weather.svg` and `orchestration-workflow/output.md`1718Two skill patterns: agent skills (preloaded via `skills:` field) vs skills (invoked via `Skill` tool). See `orchestration-workflow/orchestration-workflow.md` for the complete flow diagram.1920### Skill Definition Structure21Skills in `.claude/skills/<name>/SKILL.md` use YAML frontmatter:22- `name`: Display name and `/slash-command` (defaults to directory name)23- `description`: When to invoke (recommended for auto-discovery)24- `argument-hint`: Autocomplete hint (e.g., `[issue-number]`)25- `disable-model-invocation`: Set `true` to prevent automatic invocation26- `user-invocable`: Set `false` to hide from `/` menu (background knowledge only)27- `allowed-tools`: Tools allowed without permission prompts when skill is active28- `model`: Model to use when skill is active29- `context`: Set to `fork` to run in isolated subagent context30- `agent`: Subagent type for `context: fork` (default: `general-purpose`)31- `hooks`: Lifecycle hooks scoped to this skill3233### Presentation System34Any request to update, modify, or fix the presentation (`presentation/index.html`) must be handled by the `presentation-curator` agent (`.claude/agents/presentation-curator.md`). Always delegate presentation work to this agent via the Task tool — never edit the presentation directly.3536The agent is **self-evolving**: after every execution, it updates its own skills to stay in sync with the presentation. It has three preloaded skills:37- `vibe-to-agentic-framework`: The conceptual framework ("Vibe Coding → Agentic Engineering"), weight rationale, and journey narrative. Updated after every slide change.38- `presentation-structure`: Slide format, weight system, navigation, section ranges. Updated when slides are added/removed/reordered.39- `presentation-styling`: CSS classes, component patterns, syntax highlighting. Updated when new styling patterns are introduced.4041### Hooks System42Cross-platform sound notification system in `.claude/hooks/`:43- `scripts/hooks.py`: Main handler for Claude Code hook events44- `config/hooks-config.json`: Shared team configuration45- `config/hooks-config.local.json`: Personal overrides (git-ignored)46- `sounds/`: Audio files organized by hook event (generated via ElevenLabs TTS)4748Hook events configured in `.claude/settings.json`: PreToolUse, PostToolUse, UserPromptSubmit, Notification, Stop, SubagentStart, SubagentStop, PreCompact, SessionStart, SessionEnd, Setup, PermissionRequest, TeammateIdle, TaskCompleted, ConfigChange.4950Special handling: git commits trigger `pretooluse-git-committing` sound.5152## Critical Patterns5354### Subagent Orchestration55Subagents **cannot** invoke other subagents via bash commands. Use the Task tool:56```57Task(subagent_type="agent-name", description="...", prompt="...", model="haiku")58```5960Be explicit about tool usage in subagent definitions. Avoid vague terms like "launch" that could be misinterpreted as bash commands.6162### Subagent Definition Structure63Subagents in `.claude/agents/*.md` use YAML frontmatter:64- `name`: Subagent identifier65- `description`: When to invoke (use "PROACTIVELY" for auto-invocation)66- `tools`: Comma-separated allowlist of tools (inherits all if omitted). Supports `Task(agent_type)` syntax67- `disallowedTools`: Tools to deny, removed from inherited or specified list68- `model`: Model alias: `haiku`, `sonnet`, `opus`, or `inherit` (default: `inherit`)69- `permissionMode`: Permission mode (e.g., `"acceptEdits"`, `"plan"`, `"bypassPermissions"`)70- `maxTurns`: Maximum agentic turns before the subagent stops71- `skills`: List of skill names to preload into agent context72- `mcpServers`: MCP servers for this subagent (server names or inline configs)73- `hooks`: Lifecycle hooks scoped to this subagent (`PreToolUse`, `PostToolUse`, `Stop`)74- `memory`: Persistent memory scope — `user`, `project`, or `local` (see `reports/claude-agent-memory.md`)75- `background`: Set to `true` to always run as a background task76- `isolation`: Set to `"worktree"` to run in a temporary git worktree77- `color`: CLI output color for visual distinction7879### Configuration Hierarchy801. `.claude/settings.local.json`: Personal settings (git-ignored)812. `.claude/settings.json`: Team-shared settings823. `hooks-config.local.json` overrides `hooks-config.json`8384### Disable Hooks85Set `"disableAllHooks": true` in `.claude/settings.local.json`, or disable individual hooks in `hooks-config.json`.8687## Workflow Best Practices8889From experience with this repository:9091- Keep CLAUDE.md under 200 lines per file for reliable adherence92- Use commands for workflows instead of standalone agents93- Create feature-specific subagents with skills (progressive disclosure) rather than general-purpose agents94- Perform manual `/compact` at ~50% context usage95- Start with plan mode for complex tasks96- Use human-gated task list workflow for multi-step tasks97- Break subtasks small enough to complete in under 50% context9899### Debugging Tips100101- Use `/doctor` for diagnostics102- Run long-running terminal commands as background tasks for better log visibility103- Use browser automation MCPs (Claude in Chrome, Playwright, Chrome DevTools) for Claude to inspect console logs104- Provide screenshots when reporting visual issues105106## Documentation107108- `docs/AGENTS.md`: Subagent orchestration troubleshooting109- `orchestration-workflow/orchestration-workflow.md`: Weather system flow diagram110- `docs/COMPARISION.md`: Commands vs Agents vs Skills invocation patterns111112## Reports113114- `reports/claude-in-chrome-v-chrome-devtools-mcp.md`: Browser automation MCP comparison (Playwright vs Chrome DevTools vs Claude in Chrome)115- `best-practice/claude-memory.md`: CLAUDE.md loading behavior in monorepos (ancestor vs descendant loading)116- `reports/claude-skills-for-larger-mono-repos.md`: Skills discovery and loading behavior in monorepos (static vs dynamic discovery)117- `reports/claude-agent-memory.md`: Agent memory frontmatter — persistent memory scopes (user, project, local) for subagents118- `reports/claude-advanced-tool-use.md`: Advanced tool use patterns — Programmatic Tool Calling (PTC), Tool Search, Tool Use Examples119- `reports/claude-usage-and-rate-limits.md`: Usage commands (`/usage`, `/extra-usage`, `/cost`), rate limits, and pay-as-you-go overflow billing120
Also in Zidong-LLC/BIBLIOTECA
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Zidong-LLC/BIBLIOTECAagents.md/AGENTS.md · 35 | AGENTS.md | buildtestlint-formatstyle+1 | 79/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/skills/context-claude/loki-mode/CLAUDE.md · 35 | CLAUDE.md | testlint-formatstylearch+5 | 77/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/skills/databases/postgres-best-practices/AGENTS.md · 35 | AGENTS.md | styletypessecuritydatabase+3 | 45/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/skills/programming-languages/python-expert/AGENTS.md · 35 | AGENTS.md | lint-formatstyletypesgit+3 | 69/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/skills/web-backend/dbos-golang/AGENTS.md · 35 | AGENTS.md | arch | 54/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/skills/web-backend/dbos-python/AGENTS.md · 35 | AGENTS.md | arch | 54/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/skills/web-backend/dbos-typescript/AGENTS.md · 35 | AGENTS.md | archtypes | 54/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/skills/web-frontend/react-best-practices/AGENTS.md · 35 | AGENTS.md | buildlint-formatstyledependencies+4 | 61/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/skills/web-frontend/ux-designer/AGENTS.md · 35 | AGENTS.md | uido-notagent-behaviour | 55/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/web-app/public/skills/dbos-golang/AGENTS.md · 35 | AGENTS.md | arch | 54/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/web-app/public/skills/dbos-python/AGENTS.md · 35 | AGENTS.md | arch | 54/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/web-app/public/skills/dbos-typescript/AGENTS.md · 35 | AGENTS.md | archtypes | 54/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/web-app/public/skills/loki-mode/CLAUDE.md · 35 | CLAUDE.md | testlint-formatstylearch+5 | 77/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/web-app/public/skills/postgres-best-practices/AGENTS.md · 35 | AGENTS.md | styletypessecuritydatabase+3 | 45/100 | 3 days ago | |
| Zidong-LLC/BIBLIOTECAskills/web-app/public/skills/react-best-practices/AGENTS.md · 35 | AGENTS.md | buildlint-formatstyledependencies+4 | 61/100 | 3 days ago |
Diff against agents.md/AGENTS.md Diff against skills/skills/context-claude/loki-mode/CLAUDE.md Diff against skills/skills/databases/postgres-best-practices/AGENTS.md Diff against skills/skills/programming-languages/python-expert/AGENTS.md Diff against skills/skills/web-backend/dbos-golang/AGENTS.md Diff against skills/skills/web-backend/dbos-python/AGENTS.md Diff against skills/skills/web-backend/dbos-typescript/AGENTS.md Diff against skills/skills/web-frontend/react-best-practices/AGENTS.md Diff against skills/skills/web-frontend/ux-designer/AGENTS.md Diff against skills/web-app/public/skills/dbos-golang/AGENTS.md Diff against skills/web-app/public/skills/dbos-python/AGENTS.md Diff against skills/web-app/public/skills/dbos-typescript/AGENTS.md Diff against skills/web-app/public/skills/loki-mode/CLAUDE.md Diff against skills/web-app/public/skills/postgres-best-practices/AGENTS.md Diff against skills/web-app/public/skills/react-best-practices/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| lollipopkit/flutter_server_boxCLAUDE.md · 8.3k | CLAUDE.md | buildteststylearch+2 | 98/100 | 3 days ago | |
| khrnchn/sedekah-jeCLAUDE.md · 89 | CLAUDE.md | testlint-formatstylearch+6 | 97/100 | 3 days ago | |
| luongnv89/claude-howtovi/CLAUDE.md · 41k | CLAUDE.md | setupbuildtestlint-format+8 | 97/100 | 3 days ago |
