Anatomy of the .claude/ Folder

Anatomy of the .claude/ Folder

The .claude folder is the control center for how Claude behaves in your project — it holds your instructions, your custom commands, your permission rules, and Claude's memory across sessions.

#claude-code #ai #tooling

Apr 10 • 8 read time • From Thuc Pham

Two folders, not one

Before diving in, one thing worth knowing upfront: there are actually two .claude directories, not one. The project-level folder holds team configuration. The global ~/.claude/ folder holds personal preferences and machine-local state.

Code editor showing .claude directory tree
The anatomy of a well-configured .claude folder.

CLAUDE.md: Claude's instruction manual

Whatever you write in CLAUDE.md, Claude will follow. Keep it under 200 lines — past that, instruction adherence drops.

1
# Development
2
- Use pnpm, not npm
3
- Run tests with `pnpm test`
4
- TypeScript strict mode is on
5
 
6
# Architecture
7
- Monorepo (Turborepo), packages under /packages
8
- API lives in /apps/api (Fastify)
9
- Web lives in /apps/web (Next.js 15)
Back to Blog