š TOPIC: How to configure the .claude folder in Claude Code to save tokens and maintain project context across sessions.
š·ļø CATEGORY: Tech Tutorial
āāāāāāāāāā
ā ā FACT CHECK:
⢠"Claude starts fresh every session and has no memory or context by default."
ā ā ļø PARTIALLY TRUE. While Claude Code does start fresh sessions, it actually has a built-in "auto-memory" feature that saves learnings across sessions. However, without a CLAUDE.md file, it lacks explicit project rules and architecture context.
⢠"You need a claude.md file to store project context, folder structure, and memory."
ā ā
CORRECT. CLAUDE.md (usually capitalized) is the primary file Claude Code reads at the start of every session to understand your codebase, tech stack, and rules.
⢠"Use settings.json to set guardrails and deny dangerous commands like git push or file removals."
ā ā
CORRECT. The .claude/settings.json file allows you to explicitly allow or deny specific bash commands and tools at the system level.
⢠"Create a context folder to act as shared memory for sub-agents."
ā ā ļø PARTIALLY TRUE. While you can create a context folder for agents to read/write files to share information, this is a custom workflow pattern created by the video author. It is not a native, auto-managed feature of Claude Code.
⢠"Create custom commands by making a commands folder to reuse workflows."
ā ā
CORRECT. Any markdown file placed in the .claude/commands/ directory automatically becomes a reusable slash command (e.g., a review.md file becomes /project:review).
š Overall Verdict: ā
Trustworthy
The reel provides excellent, advanced advice for using Anthropic's Claude Code CLI. While some folder names (like context) are custom patterns rather than strict built-in features, the overall architecture and advice are highly accurate and will significantly improve AI coding efficiency.
āāāāāāāāāā
š COMPLETE STEP-BY-STEP GUIDE:
Here is how to actually implement the setup discussed in the video using Anthropic's official Claude Code CLI:
Step 1: Install Claude Code CLI by running npm install -g @anthropic-ai/claude-code in your terminal and authenticate with your Anthropic account.
Step 2: Navigate to your project root and run claude /init. This will automatically scan your project and generate a starter CLAUDE.md file.
Step 3: Edit the CLAUDE.md file to include your project's specific tech stack, folder structure, coding conventions, and common commands. Keep it under 300 lines to save tokens.
Step 4: Create a .claude folder in your project root (if it doesn't exist).
Step 5: Inside .claude, create a settings.json file. Add your guardrails:
{
"permissions": {
"allow": ["npm test", "git status"],
"deny": ["git push", "rm -rf", "terraform destroy"]
}
}
Step 6: Create a .claude/commands/ directory. Add markdown files for repeatable tasks (e.g., pr-review.md). You can now run /project:pr-review in the Claude CLI.
Step 7: (Optional) Create a .claude/agents/ directory to define specialized sub-agents (like a dedicated UI reviewer or security checker) with their own isolated contexts.
Step 8: Commit the .claude folder and CLAUDE.md to your Git repository so your entire team shares the same AI configuration.
āāāāāāāāāā
š” WHAT THE REEL DIDN'T TELL YOU:
⢠Global vs. Project Settings: You can also have a global ~/.claude/ folder on your machine for personal preferences that apply to all projects, which overrides project-level settings.
⢠Token Costs: Claude Code uses your Anthropic API account, which bills per token. Setting up a CLAUDE.md file actually increases the input token count for every prompt (since the file is always loaded into context). However, it saves money overall by drastically reducing AI hallucinations, mistakes, and rework.
⢠Tool Specificity: This specific folder structure applies to Anthropic's official Claude Code CLI tool. If you are using VS Code extensions like Cline or Roo Code, they use similar concepts but different file names (like .clinerules).
⢠Auto-Memory: You don't have to write everything manually. Claude Code has a built-in auto-memory feature that saves insights in .claude/projects/ as it works.
āāāāāāāāāā
š USEFUL LINKS: ⢠Search for "Explore the .claude directory Claude Code" on Google to find Anthropic's official interactive documentation for this folder structure. ⢠Search for "Claude Code CLI" to find the official installation guide.
āāāāāāāāāā
ā° FRESHNESS CHECK:
This information is highly current as of early 2026. Claude Code and its .claude configuration system are actively used and officially documented by Anthropic. Live web search verification was used to confirm the exact folder structures, file names, and JSON schemas mentioned in the video.
āāāāāāāāāā
š LIVE SOURCES CHECKED: ⢠Queries: claude code cli ".claude" folder | ".claude" folder "claude.md" "settings.json" ⢠Live web search verification was used, but no clean public source URLs were available to display.