← Reddit

I kept re-reading the docs every time I set up a project, so I mapped the whole .claude/ folder

Reddit · Queasy_Speaker7227 · August 16, 2026
A developer created a comprehensive reference map of the .claude/ folder structure and configuration system after repeatedly consulting documentation during project setup. The map clarified misconceptions including that commands and skills function identically, hooks are configured in settings.json rather than in the .claude/hooks/ directory, and path-scoped rules effectively reduce context requirements. The guide additionally distinguished between CLAUDE.md as a request document and hooks as enforcement mechanisms.

Detailed Analysis

A Reddit user's practical breakdown of Claude Code's `.claude/` configuration folder has surfaced a set of details about how Anthropic's coding agent handles project setup, memory, and automation — details that, by the poster's own account, are easy to get wrong even for regular users. The post catalogs the folder's structure (settings precedence, MCP server scopes, commands, skills, rules, and hooks) and corrects several common misconceptions, most notably that colon-namespaced slash commands like `/project:review` are deprecated in favor of plain markdown files in `.claude/commands/`, with colon namespacing now reserved for plugins. The author also clarifies that "commands" and "skills" are functionally the same underlying mechanism, with skills simply adding a folder structure for supporting files and the option for Claude to invoke them autonomously rather than only on explicit user command.

The more consequential findings involve how Claude Code manages context and enforcement. The poster highlights that `.claude/rules/*.md` files with `paths:` frontmatter load conditionally — only when Claude opens a matching file — which allows developers to keep `CLAUDE.md` lean rather than cramming every language-specific convention into a single always-loaded file. This distinction matters because context window management is a persistent bottleneck in agentic coding workflows; every token spent on instructions is a token unavailable for actual code reasoning. Related to this, the post debunks the assumption that `@-imports` save context, noting that imported files load at launch regardless, meaning path-scoped rules and on-demand skills are the actual levers for context efficiency. The `disable-model-invocation: true` flag is flagged as a useful default for skills with side effects (deploy, commit, send), since it keeps those skills' context cost at zero until a user explicitly invokes them — a small but meaningful safeguard against unintended autonomous actions.

Perhaps the most operationally important clarification is the distinction between `CLAUDE.md` as context versus hooks as enforcement. The author notes that writing "never touch .env" in `CLAUDE.md` is merely a request the model may or may not honor, whereas a `PreToolUse` hook configured in `settings.json` that blocks the write is actual enforcement. This distinction reflects a broader maturation in how developers think about AI coding agents: natural-language instructions embedded in memory files function as soft guidance subject to model interpretation, while hooks and permission systems function as hard guardrails independent of model behavior. The confusion the poster reports — believing hooks lived in `.claude/hooks/` rather than being configured in `settings.json` (with that directory merely storing the scripts) — underscores how quickly Claude Code's feature set has evolved and how documentation lag or scattered docs can leave even engaged users working from outdated mental models.

More broadly, this kind of community-driven reference material reflects the growing complexity of agentic coding tools as they add layers of configurability — memory files, conditional rules, hooks, permissions, MCP integrations, and skills — to give developers finer-grained control over autonomous coding agents. As tools like Claude Code move from simple chat-based coding assistants toward more autonomous, project-aware systems capable of taking actions with real side effects, the need for precise, well-understood configuration mechanisms (and clear distinctions between suggestion and enforcement) becomes increasingly important for safety and reliability. The fact that experienced users are still building their own reference maps to avoid "tab-hunting" through official documentation also suggests an opportunity, and ongoing challenge, for Anthropic in consolidating and simplifying how these configuration primitives are presented as the product surface continues to expand.

Read original article →