★ Open source · github.com/yizhiyanhua-ai/fireworks-ai-tools-memory
Open-source · Codex & Claude Code

Stop relearning the same tool twice.

Persistent, tool-keyed experience memory for your AI tools, CLI workflows, and scripts. The auth callbacks, argument order, and path quirks your AI re-diagnoses every session — captured once, reused forever.

~ install in Claude Code / Codex
npx skills add yizhiyanhua-ai/fireworks-ai-tools-memory
tool-keyedMEMORY UNIT
3-filePER-TOOL STORE
[HIT:N]RANKED RECALL
2RUNTIMES
Why it exists

Most AI failures aren't model failures. They're tool-reality failures.

Auth callbacks die halfway. CLI argument order is picky. A script fixed it once but nobody can find it. Without durable memory, the same pain gets re-diagnosed from scratch every session.

🔧

Tool-keyed, not skill-keyed

The memory unit is the actual runtime object that fails — ncm-cli, yt-dlp+mpv, lark-cli. Lessons transfer across skills instead of getting trapped inside one.

📁

Three-file structured storage

Each tool gets KNOWLEDGE.md (reusable lessons), CHECKPOINTS.md (raw field notes), and SCRIPTS.md + scripts/ (working assets).

🔁

Closed-loop lifecycle

inject → checkpoint → flush → register-script. Reload lessons before a task, capture friction mid-flight, distill after, promote a working script to a durable asset.

📊

Hit-count ranking

Lessons accumulate a [HIT:N] tag each time they re-occur. inject returns the most-validated entries first — pain self-ranks to the top.

📦

Reusable script registry

register-script copies a working script into tool memory, marks it executable, and indexes it. Scripts are first-class assets, not side notes.

🌐

Cross-tool, cross-session, runtime-agnostic

Designed for Codex and Claude Code. Resolves memory home via AI_TOOLS_MEMORY_HOMECODEX_HOME~/.ai-tools-memory. Companion to fireworks-skill-memory.

The memory loop

inject · checkpoint · flush · register-script

Session memory loop: inject, checkpoint, flush, register-script
1

inject — before the task

inject --tool yt-dlp+mpv prints the tool's prior lessons + script index into context.

2

checkpoint — when something breaks

checkpoint --tool ncm-cli --note "Search works but playback fails on source availability" writes a timestamped raw note.

3

flush — after the session

flush --tool spotify-cli --summary-file ./session-summary.md extracts lessons (parses ## lessons / ## 避坑 / ## best practices, bilingual) and merges into KNOWLEDGE.md.

4

register-script — when a fix deserves to survive

register-script --tool yt-dlp+mpv --source ./scripts/play_mix.sh --name play-mix copies it into tool memory for later export-script retrieval.

FAQ

Questions, answered.

How is this different from fireworks-skill-memory?
Skill-memory remembers how to use a skill better. Tool-memory remembers how to operate a tool without crashing. The unit is different: a tool key (yt-dlp+mpv) is the stable runtime object, so lessons transfer across skills instead of being trapped inside one. They're complements, not replacements.
Does it work with both Codex and Claude Code?
Yes. It resolves the memory home via AI_TOOLS_MEMORY_HOMECODEX_HOME/memories/...~/.ai-tools-memory, so the same store works across both runtimes. Install via npx skills add yizhiyanhua-ai/fireworks-ai-tools-memory or ./install-codex.sh.
Can I just talk to the agent instead of running CLI commands?
Yes — natural language works too: "先注入 yt-dlp+mpv 的经验再干活", "把这次 ncm-cli 的问题沉淀下来", "以后遇到 Spotify CLI 认证先提醒我". The skill maps these to inject / flush / checkpoint.
How are duplicate lessons handled?
On flush, lessons matching an existing entry's first 32 characters increment that entry's [HIT:N] counter instead of duplicating. Repeated pain self-ranks to the top of inject.
Does it support Chinese session summaries?
Yes — flush recognizes both ## lessons / ## best practices / ## pitfalls and ## 经验 / ## 避坑 / ## 最佳实践 headers when extracting lessons.
Is it free?
MIT, open source, runs locally — nothing leaves your machine. If it saves you re-debugging, consider sponsoring.