memory

memory is a skill for Claude Code from EliasOulkadi/shokunin. It costs 68 tokens per session (2,111 once invoked), scanned A, original, MIT.

A persistent memory system that saves conversation context in a local ChromaDB database and retrieves it in later AI sessions. ChromaDB is a tool for storing and searching text by meaning.

In plain words
What is it for?
Use it to remember information, save summaries for later, search earlier conversations, and recall previous work for a project.
Why use it?
It avoids repeating past decisions, code details, and project context whenever a new session starts.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions OpenCode.

Good fit Use it to remember information, save summaries for later, search earlier conversations, and recall previous work for a project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eliasoulkadi/shokunin/memory
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add EliasOulkadi/shokunin --skill memory
Clone the repo
git clone --depth 1 https://github.com/EliasOulkadi/shokunin

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/eliasoulkadi/shokunin/memory.svg)](https://agentmods.dev/skills/eliasoulkadi/shokunin/memory)
Your own site
<a href="https://agentmods.dev/skills/eliasoulkadi/shokunin/memory"><img src="https://agentmods.dev/badge/skills/eliasoulkadi/shokunin/memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,111 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 31
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.02111
Opus 5 $0.00034 $0.01056
Sonnet 5 $0.00014 $0.00422
Haiku 4.5 $0.00007 $0.00211

Measured 8d ago against content hash 9b14c64bc372, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.pack/skills/memory/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memory

Persistent memory across sessions using ChromaDB vector search. Every conversation is stored and retrievable.

How It Works

The memory system uses ChromaDB (local vector database, no server needed) to store conversation context as embeddings. When you start a new session, the agent searches past memory for relevant context.

  • Storage: ~/.shokunin/memory/chroma_db/ (ChromaDB persistent files)
  • Sessions: ~/.shokunin/memory/sessions/ (markdown summaries per session)
  • MCP Server: ~/.shokunin/memory/mcp-server.py

Workflow

Step 1: Start memory server (if not running)

The memory MCP server is configured in opencode.json. It starts automatically when OpenCode connects to it.

Step 2: Save context during session

At the end of each significant task, save context:

store_context with:
  text: "Summary of what was done, key decisions, code patterns"
  tags: ["project-name", "feature", "language"]
  project: "project-name"
  session_id: "current-session-id"

Step 3: Search past memory at session start

When starting a new session, search for relevant context:

search_context with:
  query: "what we discussed about auth"
  project: "current-project"

Step 4: Get full session summary

get_session_summary with:
  session_id: "session-id"

Automatic Session Save

The agent should automatically:

  1. At the end of the session, save a summary of key decisions and context
  2. At the start of a new session, search for relevant past context
  3. Present relevant past context to the user naturally

Error Handling

Error Cause Fix
ChromaDB not found Not installed pip install chromadb
Collection not found First run Creates automatically on first store
Slow first query Downloading ONNX model First run downloads ~79MB. Subsequent runs are instant.
Memory not returning results No data stored yet Normal on first use. Start by saving something.
Embedding model fails to download Network blocked or proxy required Set CHROMADB_EMBEDDING_MODEL env var. Fall back to all-MiniLM-L6-v2 which is smaller (~23MB).
Duplicate or stale entries flooding results Auto-save firing too frequently during rapid iteration Apply 5-second debounce before storing context. Consolidate entries with memory_consolidate_memories periodically.
Collection corrupted after crash Write interrupted during power loss or force-quit Restore from latest backup in ~/.shokunin/memory/backups/. Run memory-healthcheck.ps1 to verify integrity.
Search returns irrelevant results for short queries Under-2-word queries have poor vector signal Use 3+ word queries. Include project name, topic, and a descriptive verb phrase.
Session ID collision or reuse Wrapper failed to generate unique ID, or manual copy-paste Check ~/.shokunin/current-session.json. Run python chroma-helper.py session list to verify uniqueness.

Read the full file on GitHub · 205 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 205 lines · 68 tokens per session scan A 9b14c64bc372

Subscribe to this mod's changes

memory is a skill published in the GitHub repository EliasOulkadi/shokunin (113 stars, last pushed 1mo ago), licensed MIT. It adds 68 tokens to every session and 2,111 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

memcord

Privacy-first, self-hosted chat memory for OpenClaw — save and recall conversation history across sessions without any cloud dependency.

ukkit/memcord · 28 tokens

distill-habits

Review recent Claude Code conversations, distill the user's stable habits and preferences, persist them into a long-term habit ledger, and maintain a "My Habits" block in the global CLAUDE.md within a character budget. The more you use Claude Code, the more it knows you. Trigger manually with /distill-habits, or on a…

betayyang/claude-habit-distiller · 87 tokens

apply

Use when a staged proposal has been reviewed and signed off — REVIEW.md Step 3 ticked reviewed or provisional — and is ready to promote into the live contextualizer.

nick-railsback/skill-engine · 36 tokens

engram-memory

Persistent cross-session memory via Engram's MCP tools (engramrecall, engramremember, engramcontext, engramfeedback, engramforget, engramstatus). Use this skill at the START of any session on a known project or with a known user — recall before acting. Also use it whenever the user states a preference, makes a…

HBarefoot/engram · 152 tokens

mnema

Use the Mnema MCP server to give the AI long-term, searchable memory. Use it whenever the user shares durable facts, preferences, decisions, or context worth recalling in future sessions. Mnema stores memories in a vector database and recalls them with semantic + hybrid search, with decay scoring and summarization so…

mienetic/mnema · 130 tokens

lithium-kb

Generates, maintains, and visualizes a structured Markdown knowledge base (.lithium-kb/{architecture,debug,tasks,features}) with an interactive Neural Network graph, auto-watch mode, custom agent directives (.agentrules), and MCP server integration for Pi, Claude, Codex, Cursor, and other coding agents. Triggers…

liulinnuha/lithium-kb · 115 tokens