From claude-ecosystem
Provides stable principles, keyword registry, and navigation for Claude Code memory system (CLAUDE.md, static memory, hierarchy, imports). Delegates details to docs-management skill.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-ecosystem:memory-managementThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **STOP - Before providing ANY response about Claude Code memory (CLAUDE.md):**
STOP - Before providing ANY response about Claude Code memory (CLAUDE.md):
- INVOKE
docs-managementskill- QUERY using keywords: CLAUDE.md, static memory, memory hierarchy, import syntax, or related topics
- BASE all responses EXCLUSIVELY on official documentation loaded
Skipping this step results in outdated or incorrect information.
Before responding, verify:
If ANY checkbox is unchecked, STOP and invoke docs-management first.
Zero Duplication Policy
This skill contains ZERO duplicated content from official documentation. ALL implementation details delegate to the
docs-managementskill using natural language queries. This skill provides stable principles and navigation that won't change, while docs-management provides current official guidance.
This meta-skill provides stable principles, keyword registries, and patterns for working with Claude Code's memory system (CLAUDE.md files, static memory). It does NOT duplicate official documentation - instead, it teaches you how to efficiently query the docs-management skill for any memory-related information you need.
What this skill provides:
What this skill delegates to docs-management:
This skill should be used when:
These principles are fundamental to how LLMs and memory systems work. They won't change even as Claude Code's implementation evolves.
Principle: Load context on-demand, not everything upfront.
Why stable: Context windows are finite resources. This is a fundamental LLM constraint that won't change.
Application:
Principle: Use emphasis keywords (CRITICAL, NEVER, MUST, IMPORTANT) strategically for must-follow rules.
Why stable: Human communication patterns for priority signaling are universal.
Application:
Principle: "Use 2-space indent" beats "format code properly"
Why stable: Specific instructions are universally more actionable than vague ones.
Application:
Principle: Bullets, headings, and clear organization improve comprehension.
Why stable: Both humans and LLMs process structured content more effectively.
Application:
Principle: Configuration layers override each other (enterprise → project → user → local).
Why stable: Standard configuration pattern used across all software systems.
Application:
Principle: Context is finite - be efficient with tokens.
Why stable: LLM context windows have limits. Even as they grow, efficiency matters.
Application:
Detailed explanations: See Stable Principles Reference
What do you want to do?
Create a new CLAUDE.md file → Query docs-management: "Find documentation about creating CLAUDE.md files and /init command"
Organize memory for a project → See Common Patterns
Understand import syntax → Query docs-management: "Find documentation about CLAUDE.md import syntax and @ references"
Set up memory hierarchy → Query docs-management: "Find documentation about memory hierarchy enterprise project user"
Optimize token usage → See Stable Principles + Common Patterns
Fix memory not loading → See Troubleshooting
Find official best practices → See Keyword Registry for efficient queries
Use these keywords when querying the docs-management skill for memory-related documentation:
Keywords: CLAUDE.md, static memory, memory hierarchy, memory system
Example query:
Find documentation about CLAUDE.md static memory system and memory hierarchy
Keywords: import syntax, @ references, recursive lookup, file imports
Example query:
Find documentation about CLAUDE.md import syntax and @ file references
Keywords: /init command, /memory command, # shortcut, memory commands
Example query:
Find documentation about /init and /memory commands for CLAUDE.md
Keywords: memory best practices, CLAUDE.md tuning, memory organization
Example query:
Find documentation about CLAUDE.md best practices and memory tuning
Keywords: settingSources, memory API, Agent SDK memory
Example query:
Find documentation about Agent SDK settingSources and memory integration
Complete keyword registry: See Keyword Registry Reference
Pattern: Central hub file (CLAUDE.md) links to detailed reference files.
CLAUDE.md (hub)
├─ Quick Reference (essential, always loaded)
├─ Core principles (brief)
└─ Links to detailed docs
├─→ .claude/memory/architecture.md
├─→ .claude/memory/workflows.md
└─→ .claude/memory/testing.md
Benefits:
Pattern: Separate critical content from detailed content.
Always-loaded (@-prefixed imports):
Context-dependent (loaded on-demand):
Pattern: Allocate tokens intentionally across memory tiers.
| Tier | Target Budget | Content Type |
|---|---|---|
| Always-loaded | ~10-15k tokens | Core principles, critical rules |
| On-demand | ~30-50k tokens | Detailed guides, references |
| External (skills) | Unlimited | Delegated documentation |
Detailed patterns: See Common Patterns Reference
Symptoms: CLAUDE.md content doesn't appear in context
Diagnostic steps:
Check file location:
./CLAUDE.md at repo root~/.claude/CLAUDE.mdCheck import syntax:
@path/to/file.md@path/to/file (missing extension)Check file exists:
Query docs-management for current troubleshooting:
Find documentation about CLAUDE.md troubleshooting and memory loading issues
Common mistakes:
@ prefix for always-loaded importsQuery docs-management for syntax specification:
Find documentation about CLAUDE.md import syntax requirements and limitations
Symptoms: Unexpected behavior due to conflicting instructions
Resolution:
Query docs-management for hierarchy details:
Find documentation about memory hierarchy precedence and conflict resolution
All references in this skill are conditional load - they are loaded only when needed.
docs-management skill (always current)Skills that work well with memory-management:
DO:
docs-management for all official documentationDON'T:
This skill provides the validation criteria used by the memory-component-auditor agent for formal audits.
| Resource | Location | Purpose |
|---|---|---|
| Audit Framework | references/audit-framework.md | Query guides and scoring criteria |
| Category | Points | Key Criteria |
|---|---|---|
| Structure | 25 | Valid markdown, proper sections |
| Import Syntax | 25 | Correct @path syntax, files exist |
| Hierarchy Compliance | 20 | Correct level (enterprise/project/user) |
| Content Organization | 20 | Progressive disclosure, appropriate size |
| No Anti-Patterns | 10 | No circular imports, excessive nesting |
Thresholds: 85+ = PASS, 70-84 = PASS WITH WARNINGS, <70 = FAIL
The memory-component-auditor agent (Haiku model) performs formal audits using this skill:
skills: memory-management/audit-memory commandWhen auditing memory files that reference external technologies (scripts, packages, runtimes), the auditor MUST validate claims using MCP servers before flagging findings.
Technologies Requiring MCP Validation:
Validation Rule:
Never flag a technology usage as incorrect without first:
Stale Data Warning:
Reference files:
npx claudepluginhub melodic-software/claude-code-plugins --plugin claude-ecosystemManages Claude Code persistent memory: CLAUDE.md hierarchy, rules in .claude/rules/, auto memory files, imports, bootstrap setup, debugging, and best practices.
Organizes, extracts, prunes, and verifies Claude Code persistent memory files to keep MEMORY.md under the 200-line truncation limit and topic files up to date with project state.
Explains how claude-mem captures observations, injects context, and where data is stored locally.