Ham banner
kromahlusenii-ops kromahlusenii-ops

Ham

AI community

Description

(HAM) Memory system for AI coding agents. Cut token usage by 80% by scoping context to directories.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

HAM — Hierarchical Agent Memory

HAM

**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](https://docs.anthropic.com/en/docs/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