Claude Code Directory: Settings, Files & Folder Structure

Where are Claude settings stored? A plain tour of the .claude directory files: CLAUDE.md, settings.json, skills, memory — and what is safe to touch.

claude-codeclaude-directorysettingsclaude-mdconfiguration
↻ Updated 2026-06-12EAEvgenii ArsentevEvgenii Arsentev · PhD

Reviewed for accuracy by Evgenii Arsentev, PhD · 2026-06-12

The .claude directory in your project and ~/.claude directory in your home folder contain all of Claude’s configuration and data. After you find out where these directories are located, the “magical hidden folder” fear disappears.

My name is Evgeny, and I recall the day when I saw that there was a .claude directory in my project, and I started wondering whether it was ok to open it. It is ok! The quickest way to learn how Claude Code understands your project is to open it and look around. So let’s go on a little tour of the house!

Where are Claude settings stored?

For layered configuration files, there is a clear hierarchy. Managed policies take precedence over CLI options which take precedence over your local settings file (.claude/settings.local.json) which takes precedence over the shared settings file (.claude/settings.json) which takes precedence over your global settings file (~/.claude/settings.json). Higher level settings override lower level settings. In plain English, your local settings file trumps the team’s settings file, and the team’s settings file trumps your global settings file.

The two territories at a glance
your-project/
CLAUDE.md <- project instructions, read every session
.claude/ settings.json <- shared team settings (committed) settings.local.json <- your personal overrides (gitignored) rules/ skills/ agents/
~/
.claude/
CLAUDE.md <- your preferences, every project settings.json <- your global defaults projects/ <- sessions + auto memory live here

How do I find the Claude directory?

They’re called hidden folders because they begin with a . — not because we’re trying to hide things from you! Your project folder is located in the root directory of each of your Claude Code projects, while your personal folder is always stored in ~/.claude in your home directory.

Reveal the hidden folder
ls -a ~/.claude

The -a flag shows dot-files. Run `ls -a` inside a project to spot its local .claude/ too. On Windows, check your user folder for the same names.

Where does Claude store my files and memory?

Claude stores conversations and memories in ~/.claude/projects/. Each project has its own directory of memories. Within a project’s memories directory, Claude has a single file called MEMORY.md. This is where Claude records its own memories (e.g., when you tell it what you like/dislike). The first 200 lines of MEMORY.md are automatically loaded each time Claude starts, so Claude “remembers” that you don’t like emojis. MEMORY.md is the counterpart to CLAUDE.md; while CLAUDE.md is where you tell Claude things, MEMORY.md is where Claude tells you things.

What are all those other folders — rules, skills, agents?

Every subdirectory is a plugin point. Each one appears in both domains (project/, ~/.claude). rules/ contains domain-specific rules that may be dynamically loaded based on which files you edit. skills/ contains general purpose skills that can be run with /name. agents/ contains subagents that have their own isolated state.

What about the commands folder?

The commands/ directory is where the old, single-file skills live. It’s still supported, but you should be using the new skills/ directory for new skills. You don’t need either of these directories, and it’s fine to have an empty .claude directory!

How do I change the directory for Claude?

There’s no config — just start Claude in a directory and it automatically binds to that location. If you want Claude in another project, simply change directories (cd) to that project’s location and type claude. It’s that simple! This is also why using Claude in your home directory is problematic — it has access to all your files.

Lab: leave your first note for Claude

0/5
!What's safe to touch and what isn't

Safe to edit: CLAUDE.md, anything in rules/ and skills/, and settings.local.json — it's yours alone. Be careful with the team's settings.json (others rely on it), and never put passwords or API keys in any committed file — settings.json travels with the project, settings.local.json stays on your machine. That split exists precisely so secrets and personal quirks don't leak into shared code.

For homework tonight, go into ~/.claude/projects/ and look at your MEMORY.md files. This is where Claude stores its memory of how YOU prefer to work. Once you understand that it’s just plain old text files organized in directories, you will never be scared of configuration again. The secret is out!

Free course

Stop reading about AI — start building with it

The free Claude Code course: your first site, tool or game — no coding. No upsells, no cross-sells — nothing to buy here.

Start free →

References

Selected peer-reviewed papers and preprints on the AI research behind this topic.

  1. [1]Shrivastava et al. (2022). Repository-Level Prompt Generation for Large Language Models of Code. arXiv:2206.12839
  2. [2]Wu et al. (2024). Repoformer: Selective Retrieval for Repository-Level Code Completion. arXiv:2403.10059
  3. [3]Liu et al. (2024). STALL+: Boosting LLM-based Repository-level Code Completion with Static Analysis. arXiv:2406.10018
  4. [4]Deng et al. (2024). R2C2-Coder: Enhancing and Benchmarking Real-world Repository-level Code Completion Abilities of Code Large Language Models. arXiv:2406.01359
  5. [5]Liu et al. (2024). M2rc-Eval: Massively Multilingual Repository-level Code Completion Evaluation. arXiv:2410.21157
  6. [6]Zhang et al. (2025). CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion. arXiv:2509.16112
  7. [7]Khan et al. (2025). Kodezi Chronos: A Debugging-First Language Model for Repository-Scale Code Understanding. arXiv:2507.12482
EAEvgenii Arsentev

Author

Evgenii Arsentev

PhD · Founder & CEO, Dad4Kids

Reading is a good start

Want to actually build this?

Guides explain. The free course transforms — personalized, gamified, and built to get you shipping fast.

Start the free course →