Anatomy of the .claude/ Folder
4 hours ago
- #AI Configuration
- #Development Workflow
- #Team Collaboration
- The .claude/ folder is essential for configuring Claude's behavior in your project, including instructions, custom commands, permissions, and memory.
- There are two .claude directories: one at the project level for team configuration and another in the home directory for personal preferences.
- CLAUDE.md is the most important file, acting as Claude's instruction manual. It should include build commands, architectural decisions, and conventions, but keep it under 200 lines.
- CLAUDE.local.md allows for personal overrides that are gitignored, ensuring individual preferences don't affect the team.
- The rules/ folder helps modularize instructions, making them easier to maintain as the team grows. Path-scoped rules ensure relevance.
- Custom slash commands can be created in the commands/ folder, with project-level commands shared with the team and personal commands stored globally.
- Skills are workflows that Claude can invoke automatically when relevant, differing from commands which require manual triggering.
- Agents in the agents/ folder allow for specialized subagent personas with tailored system prompts, tools, and model preferences.
- settings.json controls permissions, specifying allowed and denied commands, with settings.local.json for personal overrides.
- The global ~/.claude/ folder stores session transcripts, auto-memory, and personal commands/skills available across all projects.
- A practical setup involves starting with CLAUDE.md and settings.json, then gradually adding commands, rules, and skills as needed.