hierarchical-agent-memory
Scoped CLAUDE.md memory system that reduces context token spend. Creates directory-level context files, tracks savings via dashboard, and routes agents to the right sub-context.
npx skills add majiayu000/claude-skill-registry --skill hierarchical-agent-memory --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Hierarchical Agent Memory (HAM) Scoped memory system that gives AI coding agents a cheat sheet for each directory instead of re-reading your entire project every prompt. Root CLAUDE.md holds global context (~200 tokens), subdirectory CLAUDE.md files hold scoped context (~250 tokens each), and a `.memory/` layer stores decisions, patterns, and an inbox for unconfirmed inferences. ## When to Use This Skill - Use when you want to reduce input token costs across Claude Code sessions - Use when your project has 3+ directories and the agent keeps re-reading the same files - Use when you want directory-scoped context instead of one monolithic CLAUDE.md - Use when you want a dashboard to visualize token savings, session history, and context health - Use when setting up a new project and want structured agent memory from day one ## How It Works ### Step 1: Setup ("go ham") Auto-detects your project platform and maturity, then generates the memory structure: ``` project/ ├── CLAUDE.md # Root context (~200 tokens) ├── .memory/ │ ├── decisions.md # Architecture Decision Records │ ├── patterns.md # Reusable patterns │ ├── inbox.md # Inferred items awaiting confirmation │ └── audit-log.md # Au
- When to Use This Skill
- How It Works
- Step 1: Setup ("go ham")
- Step 2: Context Routing
- Step 3: Dashboard ("ham dashboard")
- Commands
- Examples
- Example 1: First-time setup
- Example 2: Checking savings
- Best Practices
- Limitations
- Related Skills
What does the hierarchical-agent-memory skill do?
Scoped CLAUDE.md memory system that reduces context token spend. Creates directory-level context files, tracks savings via dashboard, and routes agents to the right sub-context.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill hierarchical-agent-memory --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
