Help us improve
Share bugs, ideas, or general feedback.
From antigravity-awesome-skills
Sets up hierarchical CLAUDE.md memory system with directory-scoped contexts, routing, savings dashboard, and audits to cut token costs in large projects.
npx claudepluginhub sickn33/antigravity-awesome-skills --plugin antigravity-awesome-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/antigravity-awesome-skills:hierarchical-agent-memoryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
Manages directory-scoped CLAUDE.md files to reduce token spend. Routes agents to correct sub-context and provides a dashboard for token savings, session history, and memory health.
Provides stable principles, keyword registry, and navigation for Claude Code memory system (CLAUDE.md, static memory, hierarchy, imports). Delegates details to docs-management skill.
Guides efficient use of context-mem MCP tools: compress large outputs, search before re-reading files, persist knowledge across sessions, and manage token budget.
Share bugs, ideas, or general feedback.
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.
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 # Audit history
└── src/
├── api/CLAUDE.md # Scoped context for api/
├── components/CLAUDE.md
└── lib/CLAUDE.md
The root CLAUDE.md includes a routing section that tells the agent exactly which sub-context to load:
## Context Routing
→ api: src/api/CLAUDE.md
→ components: src/components/CLAUDE.md
→ lib: src/lib/CLAUDE.md
The agent reads root, then immediately loads the relevant subdirectory context — no guessing.
Launches a web dashboard at localhost:7777 that visualizes:
| Trigger | What it does |
|---|---|
go ham | Set up HAM — auto-detect platform, generate CLAUDE.md files |
ham savings | Show token and cost savings report |
ham dashboard | Launch the interactive web dashboard |
ham audit | Health check on memory files |
ham insights | Generate actionable insights from session data |
ham route | Add/update Context Routing section in root CLAUDE.md |
ham carbon | Show energy and carbon efficiency data |
User: go ham
Agent: HAM setup complete. Created 8 files.
- CLAUDE.md (root)
- .memory/decisions.md
- .memory/patterns.md
- .memory/inbox.md
- src/api/CLAUDE.md
- src/components/CLAUDE.md
- src/lib/CLAUDE.md
- src/utils/CLAUDE.md
Baseline captured in .memory/baseline.json
Run "HAM savings" to see your token and cost savings.
User: ham savings
Agent:
Before HAM: ~7,500 tokens/prompt
After HAM: ~450 tokens/prompt
Savings: 7,050 tokens (94%)
Monthly projection (1,500 prompts):
Sonnet: ~$31.73 saved
Opus: ~$158.63 saved
ham audit every 2 weeks to catch stale or missing context filesham route after adding new directories to keep routing current.memory/inbox.md periodically — confirm or reject inferred items~/.claude/projects/ham auditagent-memory-systems — general agent memory architecture patternsagent-memory-mcp — MCP-based memory integration