ham
(HAM) Memory system for AI coding agents. Cut token usage by 80% by scoping context to directories.
Install
git clone https://github.com/kromahlusenii-ops/hamInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →HAM — Hierarchical Agent Memory
Fewer tokens. Greener AI.
HAM is a memory system for AI coding agents that reduces token consumption by up to 80%. Instead of loading your entire project context on every request, HAM scopes memory to the directory you're actually working in.
Less tokens. Faster agents. Lower costs. Greener AI.
Claude Code only — HAM is a skill for Claude Code and only works with Claude coding agents. It is not compatible with Cursor, Copilot, Windsurf, or other AI coding tools.
The Problem
Every time your AI agent starts a session, it re-reads everything. Your full project structure. Conventions it already learned. Decisions you already made. Context that has nothing to do with the current task.
A single bloated CLAUDE.md can eat 47% of your context window before the agent writes a single line of code.
That's wasted tokens. Wasted money. Wasted energy.
The Solution
HAM replaces one massive context file with small, scoped memory files at each directory level. Your agent reads only what it needs for the directory it's touching.
project-root/
├── CLAUDE.md # Global: stack, conventions (under 250 tokens)
├── src/
│ ├── CLAUDE.md # Shared src patterns
│ ├── api/
│ │ └── CLAUDE.md # API auth, rate limits, endpoint patterns
│ ├── components/
│ │ └── CLAUDE.md # Component conventions, styling rules
│ └── db/
│ └── CLAUDE.md # Schema context, query patterns
└── .memory/
├── decisions.md # Architecture decisions with rationale
└── patterns.md # Implementation patterns
The agent reads 2-3 small files instead of one massive context dump. Your starting context drops from thousands of tokens to hundreds.
Before & After
| Before HAM | After HAM | |
|---|---|---|
| Context per prompt | 4,000 - 12,000 tokens | 800 - 2,400 tokens |
| 50-prompt session | 200K - 600K tokens | 40K - 120K tokens |
| Context window used at start | Up to 47% | Under 10% |
| Token reduction | — | Up to 80% |
Why This Matters
For Your Wallet
Fewer tokens = lower API bills. Teams running agents at scale see the savings immediately.
For Your Speed
Smaller context = faster responses. Your agent spends less time processing irrelevant information and more time writing code.
For The Planet
AI inference accounts for over 80% of AI electricity consumption. Every token generated requires compute, energy, and cooling. Reducing token waste isn't just efficient — it's a sustainability decision.
Data centers are projected to consume 945 TWh of electricity by 2030 — more than Japan's total consumption. AI is the primary driver of this growth. — International Energy Agency
HAM makes your AI usage greener by eliminating the tokens that never needed to exist.
Installation
git clone https://github.com/kromahlusenii-ops/ham.git ~/.claude/skills/ham
This installs HAM globally — it's available in every project you open with Claude Code.
Add to a specific project only
If you prefer to scope HAM to a single project instead of installing it globally:
cd your-project
mkdir -p .claude/skills
git clone https://github.com/kromahlusenii-ops/ham.git .claude/skills/ham
Project-level skills live in .claude/skills/ and are only active in that project.
Quick Start
Similar plugs
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…
Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
Production-grade engineering skills for AI coding agents.
The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…