managing-claude-memory

Automate management of hierarchical CLAUDE.md memory files with Markdown structure and imports.

Updated Jul 1, 2025
One-click install
npx skills add https://github.com/agdev/claude-code --skill managing-claude-memory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-claude-memory
Source: https://github.com/agdev/claude-code/tree/main/skills/managing-claude-memory
Command: npx skills add https://github.com/agdev/claude-code --skill managing-claude-memory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Claude's memory (CLAUDE.md files) is crucial for consistent behavior, but managing it effectively across projects and teams can be complex, leading to context loss or inefficient AI interactions. This Skill provides clear guidelines for memory management, ensuring Claude always has the right context.

Core Features & Use Cases

  • Hierarchical Memory System: Understand how Claude prioritizes memory files (Enterprise, Project, User, Local) for effective context loading.
  • Structure & Content Guidelines: Best practices for organizing CLAUDE.md with logical sections, emphasis, and token efficiency.
  • Import Syntax: Leverage @path/to/import for modular and scalable memory management, breaking down large memory files.
  • Use Case: Update your project's CLAUDE.md file to include new code style guidelines and common pitfalls, ensuring all team members (and Claude) follow consistent patterns without redundant explanations.

Quick Start

Update the project's CLAUDE.md file to add a new section on "Critical Rules" emphasizing that all database migrations must be reviewed by two senior engineers.

Frequently Asked Questions about managing-claude-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize Claude's memory across my team using CLAUDE.md files?

CLAUDE.md files use a four-level hierarchy: Enterprise Policy, Project Memory, User Memory, and Project Memory (Local). Claude prioritizes memory files in this order, so organize context at the appropriate level—enterprise-wide guidelines at the top, project-specific rules in the middle, and local overrides at the bottom. Use Markdown headings and the @path import syntax to structure modular, scalable memory without duplication.

What's the best way to structure critical rules in my project's CLAUDE.md?

Structure CLAUDE.md with logical Markdown sections, use emphasis markers (bold/italics) for critical rules, and keep content concise and actionable. For example, add a "Critical Rules" section stating that all database migrations must be reviewed by two senior engineers. Avoid sensitive data and large code blocks; focus on guidelines that guide Claude's behavior consistently.

Can I reuse memory content across multiple projects using imports?

Yes, use the @path/to/import syntax to reference memory files across your hierarchy, supporting up to five recursive imports. This lets you maintain shared guidelines in a central Enterprise Policy file and import them into Project Memory files, eliminating redundant explanations and ensuring consistent context across teams.

Why does context loss happen when managing Claude memory across teams?

Without structured CLAUDE.md management, teams duplicate context, lose track of which memory files apply, and fail to cascade guidelines through the hierarchy. A hierarchical system with clear import rules and organized sections ensures Claude always receives the right context, preventing inconsistent behavior and wasted tokens on repeated explanations.

What should I avoid putting in CLAUDE.md files?

Avoid storing sensitive data (passwords, API keys, PII), large code blocks, and unstructured notes in CLAUDE.md. Keep content token-efficient and actionable; CLAUDE.md is for behavioral guidelines and context, not a code repository or secrets vault. Use emphasis markers sparingly to highlight only the most critical rules.