Skip to content

Where Claude Code stores skills, agents, rules, and MCP servers

Claude Code reads its context from a mix of a global dotfolder, per-project dotfolders, and two easy-to-miss files that live outside both. This page maps all of it. ~ is your home directory (C:\Users\<you> on Windows, /Users/<you> on macOS, /home/<you> on Linux); paths starting with .claude/ are relative to a project root.

ArtifactGlobalPer-projectFormat
Skills~/.claude/skills/<name>/SKILL.md.claude/skills/<name>/SKILL.mdMarkdown + YAML frontmatter
Subagents~/.claude/agents/*.md.claude/agents/*.mdMarkdown + YAML frontmatter
Rules / memory file~/.claude/CLAUDE.mdCLAUDE.md, CLAUDE.local.md (project root, also nested dirs)Markdown
Output styles~/.claude/output-styles/*.md.claude/output-styles/*.mdMarkdown + frontmatter
Auto memory~/.claude/projects/<project-slug>/memory/*.mdMarkdown (MEMORY.md is the index)
Slash commands~/.claude/commands/**/*.md.claude/commands/**/*.mdMarkdown + frontmatter
MCP servers~/.claude.json (a file, not inside ~/.claude/).mcp.json (project root)JSON
Settings~/.claude/settings.json.claude/settings.json, .claude/settings.local.jsonJSON
Hooksinside settings.json"hooks"inside project settings.json"hooks"JSON (event → matcher → command)
Plugins~/.claude/plugins/ (cache + marketplaces)bundled skills/agents/commands

A skill is a folder containing a SKILL.md with YAML frontmatter (name, description) — the folder name is the skill name. Global skills live in ~/.claude/skills/, project skills in .claude/skills/. Skills bundled by plugins are unpacked under the plugin cache (see Plugins) rather than either of those directories, which is why they’re easy to lose track of.

Custom subagents are single Markdown files with frontmatter (name, description, tools, optional model) in ~/.claude/agents/ (all projects) or .claude/agents/ (one project). Project agents win on name collisions.

Claude Code auto-loads CLAUDE.md from the project root, plus any CLAUDE.md in parent directories and in subdirectories it works in. CLAUDE.local.md is the git-ignored personal variant. ~/.claude/CLAUDE.md applies to every session. Output styles — reusable system-prompt modifiers — are separate files under output-styles/.

Claude Code also reads AGENTS.md, the cross-tool convention shared with Codex, Cursor, and others.

Session-persistent memory is plain Markdown under ~/.claude/projects/<project-slug>/memory/ — one file per fact, with MEMORY.md as the index that gets loaded into context. The project slug is the project path with separators dashed (e.g. C--Users-you-code-myapp).

Each .md file under a commands/ directory is a slash command; subdirectories become namespaces (commands/git/commit.md/git:commit). Commands can embed shell execution (! prefix), which is why they deserve the same review as scripts.

Project-scoped servers (--scope project) go in .mcp.json at the repo root — the only one of the three meant to be committed. Server entries carry command / args / env (stdio) or url / headers (HTTP), and the env and headers values are where API keys end up — treat both files as secret-adjacent.

settings.json (global ~/.claude/, project .claude/, personal .claude/settings.local.json) holds permissions, environment variables, and hooks — shell commands keyed by lifecycle event and matcher. Precedence is local over project over global. Hooks execute arbitrary commands, so they’re part of your security surface, not just configuration.

Installed plugins unpack under ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/ with their own skills/, agents/, and commands/ folders inside; marketplace clones live in ~/.claude/plugins/marketplaces/. These bundled artifacts behave exactly like your own, but live where no one looks.

Quartermaster’s scanner walks every location on this page (including the ~/.claude.json gotcha and plugin caches), indexes the artifacts into one searchable registry alongside Cursor, Codex, and 8 more tools, and can convert or install them anywhere — secrets are never indexed (env/header key names kept, values dropped). See the full discovery map or the quickstart.