Agent skill · software engineering · sickn33
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.
Why this skill is useful
Adds executable scripts for setting up a hierarchical memory system that optimizes context usage and reduces token costs, which the AI cannot generate on its own.
What it needs
Requires docker installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.
What this skill does
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: Step 2: Context Routing The root CLAUDE.md includes a routing section that tells the agent exactly which sub-context to load: The agent reads root, then immediately loads the relevant subdirectory context — no guessing. Step 3: Dashboard ("ham dashboard") Launches a web dashboard at localhost:7777 that visualizes: Token savings (HAM-on vs HAM-off sessions) Daily token and cost trends Per-directory session breakdown Context file health (missing/stale/inherited CLAUDE.md coverage) Routing compliance (how often the agent follows the routing map) Carbon/energy estimates Commands 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 Examples Example 1: First-time setup Example 2: Checking savings Best P …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sickn33/hierarchical-agent-memory--75559e