a claude code skill · mit licensed · fully local

claude code keeps forgetting everything.
this fixes it.

the way it works is pretty simple — when you close the terminal, a hook writes down what just happened in memory/sessions/. qmd indexes that locally. next time you open claude code, it pulls the most relevant past memories into context before you even type anything. so claude just knows what you worked on last week instead of asking.

~/your-project
# install the skill
$ /plugin marketplace add qb-harshit/fix-claude-mem

# run the setup
$ fix-claude-mem setup

# that's it. every future session has memory now.
$ claude

you explain your codebase to claude, and an hour later it's gone.

you walk claude through your architecture, point at the files that matter, work through a nasty bug, land on a good pattern. then you close the terminal and it's gone. next session you're explaining it all over again.

so you start pasting the same context into every new session. your claude.md grows from 100 lines to 1000. eventually you stop bothering with long sessions because most of it evaporates anyway.

the actual bug isn't that claude forgets. it's that there's no memory layer sitting between you and claude. each session literally starts at zero, and three months in you're still re-explaining the same things you explained on day one.

× context vanishes when the terminal closes
× claude.md becomes a 2000-line dumping ground
× you re-derive decisions you already made
× pasting the same context into every new session
× three months of work doesn't compound into anything

three hooks, one local index, memory that compounds.

01

session ends

a stop hook fires when you close the terminal. it writes a short digest to memory/sessions/ — what you built, what you decided, what's still open. plain markdown with frontmatter so qmd can index it.

# memory/sessions/2026-04-14-oom-fix.md
---
date: 2026-04-14T15:30+05:30
project: ai-trader
tags: [railway, memory]
summary: fixed the oom on streaming
---

## decisions
- stream ohlcv instead of full load
- raise railway mem to 1gb

## open
- watch memory for 48h
02

qmd indexes everything

qmd by @tobi runs locally and indexes everything in your memory directory. it does hybrid search — keyword, vectors, reranking — using three small models that live on your machine. nothing leaves your laptop.

$ qmd collection add ./memory
$ qmd context add ./memory \
    "session digests, decisions"
$ qmd update && qmd embed

✓ embedded 507 chunks
  from 87 documents in 1m 5s
03

session starts

next time you open claude code, a hook reads your first message, queries qmd for the most relevant past memories, and injects them as context. so claude wakes up already knowing what you worked on.

> fix-claude-mem: recalled

qmd://my-project/sessions/
  2026-04-14-oom-fix.md
Score: 82%
Snippet: stream ohlcv
  instead of full load...

# now ask about the oom fix.
# claude already knows.

one command if you use claude code.

if you use claude code's plugin marketplace:

/plugin marketplace add qb-harshit/fix-claude-mem

then run setup in your project:

fix-claude-mem setup

or clone the repo manually:

git clone https://github.com/qb-harshit/fix-claude-mem ~/.claude/skills/fix-claude-mem

setup makes the memory directories at your project root, wires the three hooks into .claude/settings.json without touching what's already there, and installs qmd if you don't have it yet.

the whole thing takes about 30 seconds. first run also pulls qmd's models down which is around 2gb and another couple of minutes. after that it just runs in the background and you forget about it.

if you're a pmm using claude code, you have a memory problem bigger than engineers do.

engineering has git to remember everything. pmm work doesn't have that. your research, your objection patterns, your voice rules, your competitive intel — it's all in your head or scattered across notion and slack threads nobody can find. so every claude session starts from scratch.

competitive intel

before

you ran a scrape last week, noticed a positioning shift, flagged a pricing change. close the terminal and it's basically gone. next session you're re-explaining what the competitor looks like from scratch.

after

it all stays searchable. next session you just ask "what changed with competitor x last month" and claude has the answer without you pasting anything.

buyer research

before

call summaries, quotes, objection patterns — you paste the same ones into every positioning session. none of it compounds into anything useful.

after

call notes pile up in memory/decisions/ over months. your next positioning exercise starts with three months of real objection data already loaded.

positioning docs

before

your messaging framework gets rewritten every month because nobody remembers the decisions behind the current one. the reasoning lives in a slack thread nobody can find.

after

every positioning decision gets captured with the reasoning attached. the framework evolves across quarters instead of resetting every time the market shifts.

content pipeline

before

claude writes generic ai-slop because it has no idea about your voice rules, your banned words, or the specific phrases you actually use.

after

voice rules live in memory/decisions/. every content session starts with those already in context. drafts actually sound like you instead of like a template.

the pattern that works in practice: one memory directory per area — intel/, research/, positioning/, content/ — with a short claude.md at each root explaining what that area is about. point fix-claude-mem at them and let it do the rest.

other ways to give claude memory.

fix-claude-mem manual claude.md cursor chat history mcp-memory
survives session restart
compounds over time partial
hybrid search (keyword + vector + rerank) keyword only
works fully offline depends
auto-generated digests partial
cross-project search
runs on laptop n/a
zero lock-in (plain markdown)