Article
llminfrastructuredevopscontext-engineeringcli
Anatomy of the .claude/ Folder
Explore the `.claude/` folder, where Anthropic's Claude AI stores local data, configurations, and context. Understanding its structure is key to debugging, managing, and optimizing your local Claude AI setup.
beginner5 min4 steps
The play
- Confirm .claude/ Folder PresenceNavigate to your home directory and check if the hidden `.claude/` folder exists. This confirms a local Claude AI setup.
- List Top-Level ContentsExamine the immediate contents of the `.claude/` directory to see its main subfolders like `config/`, `cache/`, or `logs/`. The `-F` flag helps identify directories with a trailing slash.
- Explore Key SubdirectoriesDive into common subdirectories like `config/` and `cache/` to understand what files they contain. These often hold crucial settings and temporary data.
- Inspect a Configuration FileView the contents of a typical configuration file, such as `config.json` (the exact filename may vary). This file often defines API keys, model preferences, or other settings. If `jq` is installed, use it to pretty-print JSON for readability.
Starter code
if [ -d "$HOME/.claude" ]; then echo ".claude/ folder found at: $HOME/.claude/" echo "Top-level contents:" ls -F $HOME/.claude/ else echo ".claude/ folder not found. Claude AI might not be installed or configured locally." fi