Skip to main content
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
  1. Confirm .claude/ Folder Presence
    Navigate to your home directory and check if the hidden `.claude/` folder exists. This confirms a local Claude AI setup.
  2. List Top-Level Contents
    Examine 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.
  3. Explore Key Subdirectories
    Dive into common subdirectories like `config/` and `cache/` to understand what files they contain. These often hold crucial settings and temporary data.
  4. Inspect a Configuration File
    View 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
Anatomy of the .claude/ Folder — Action Pack