Agent skill

Memory

by EliasOulkadi in EliasOulkadi/shokunin

Persistent memory across AI sessions using ChromaDB vector database.

MITAuto-check: notesAgent Workflows

Install Memory

skills CLI
$ npx skills add EliasOulkadi/shokunin --skill memory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install EliasOulkadi/shokunin memory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/EliasOulkadi/shokunin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.pack/skills/memory .claude/skills/memory && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
memory
GitHub stars
114
Token cost
~2.3k tokens
SKILL.md length
747 words
Files
1
Skills in repo
49
Repo updated
First seen
Licence
MIT

At a glance

Persistent memory across AI sessions using ChromaDB vector database.

  • Works in 4 steps: Start memory server (if not running) → Save context during session → Search past memory at session start → …
  • User asks to remember something
  • SKILL.md covers How It Works, Workflow, Automatic Session Save and Error Handling, plus 6 more sections
  • Calls pip and python

What it does

Memory is an agent skill from EliasOulkadi/shokunin. Persistent memory across AI sessions using ChromaDB vector database. Stores and retrieves context from past conversations, decisions, and code. Use when user asks to remember something, search past conversations, recall what was done before, save context for later, or find information from previous sessions. Do NOT use for git history or file-based notes.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: opencode

It sits in Agent Workflows, covering Vector databases, Agent memory and Git workflow. It works with Chroma and Model Context Protocol. The repository describes itself as: 職人 Shokunin 62 AI agent skills for OpenCode, Claude Code, Cursor, Windsurf. ChromaDB memory, MCP servers, declarative self-updates. Multi-model, open source, zero cost. The licence is MIT.

When your agent uses it

  • User asks to remember something
  • Search past conversations
  • Recall what was done before
  • Save context for later

Example prompts

  • “/memory”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): opencode
  • Pre-approved tools (allowed-tools): Read, Bash, Write

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Start memory server (if not running)
  2. Save context during session
  3. Search past memory at session start
  4. Get full session summary

What it can do on your machine

Read from SKILL.md and the folder at commit 4c68e5b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Bash
    • Write

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    opencode

    From compatibility in the SKILL.md frontmatter.

Context cost

Memory loads about 2.3k tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 747 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Bash, Write

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from EliasOulkadi/shokunin at commit 4c68e5b, republished under its MIT licence (© EliasOulkadi). 747 words, ~2,255 tokens.

Download SKILL.mdSave it as .claude/skills/memory/SKILL.md (or your agent's skills folder).
name
memory
description
Persistent memory across AI sessions using ChromaDB vector database. Stores and retrieves context from past conversations, decisions, and code. Use when user asks to remember something, search past conversations, recall what was done before, save context for later, or find information from previous sessions. Do NOT use for git history or file-based notes.
allowed-tools
Read, Bash, Write
compatibility
opencode
triggers
remember, search past, recall, what was done, previous session, save context, remember that, memory, ChromaDB, vector memory, persistent memory
negatives
git history, file system, file notes, backup, database, memory admin (use chromadb), backup memory (use chromadb)
license
MIT
metadata.workflow
productivity
metadata.audience
developers
metadata.version
1.0.0
metadata.author
shokunin

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

ErrorCauseFix
ChromaDB not foundNot installedpip install chromadb
Collection not foundFirst runCreates automatically on first store
Slow first queryDownloading ONNX modelFirst run downloads ~79MB. Subsequent runs are instant.
Memory not returning resultsNo data stored yetNormal on first use. Start by saving something.
Embedding model fails to downloadNetwork blocked or proxy requiredSet CHROMADB_EMBEDDING_MODEL env var. Fall back to all-MiniLM-L6-v2 which is smaller (~23MB).
Duplicate or stale entries flooding resultsAuto-save firing too frequently during rapid iterationApply 5-second debounce before storing context. Consolidate entries with memory_consolidate_memories periodically.
Collection corrupted after crashWrite interrupted during power loss or force-quitRestore from latest backup in ~/.shokunin/memory/backups/. Run memory-healthcheck.ps1 to verify integrity.
Search returns irrelevant results for short queriesUnder-2-word queries have poor vector signalUse 3+ word queries. Include project name, topic, and a descriptive verb phrase.
Session ID collision or reuseWrapper failed to generate unique ID, or manual copy-pasteCheck ~/.shokunin/current-session.json. Run python chroma-helper.py session list to verify uniqueness.

Commands

/remember [text]     → Save an important piece of context
/search [query]      → Search past memory
/whatdidwe [topic]   → What did we discuss about X before?
/forget [id]         → Remove a specific memory entry
Show full SKILL.md (405 more words)Show less

Anti-Patterns

PatternProblemFix
Storing secrets or tokens in memory entriesPlaintext memory is readable by any process with filesystem accessNever store API keys, passwords, or tokens. Use environment variables or a dedicated secret manager.
Saving every single message instead of checkpointsFloods the vector DB with near-duplicate embeddings, degrading search qualitySave only decisions, file changes, and commands. Debounce rapid successive saves to 5 seconds.
Using memory as a key-value storeChromaDB is optimized for semantic similarity, not exact-match lookupsUse the file system or a config file for deterministic data. Reserve memory for fuzzy, contextual recall.
Searching with overly broad queries like "what did we do"Returns too many low-relevance results, wasting tokens and attentionNarrow the query: project name + topic + timeframe. Example: "auth refactoring decisions May 2026".
Not consolidating old sessionsVector DB grows unbounded, slowing queries and increasing disk usageRun memory_consolidate_memories weekly. Archive sessions older than 90 days.
Assuming memory entries are immutable truthEntries represent frozen-in-time claims. Code may have changed since then.Always verify file paths and function names before acting. Use verify_file_path or grep to confirm.
Skipping session search at conversation startLoses all context from prior work, forcing the agent to re-discover already-solved problemsMandatory step: always run session list and search before responding to any task.

Advanced ChromaDB Patterns

Collection Management
python
# List collections
collections = client.list_collections()
for c in collections: print(c.name, c.count())

# Create collection with custom embedding function
from chromadb.utils import embedding_functions
ef = embedding_functions.OpenAIEmbeddingFunction(api_key="...", model_name="text-embedding-3-small")
collection = client.create_collection(name="custom", embedding_function=ef)

# Delete by metadata filter
collection.delete(where={"project": "test-project"})

# Peek at stored data
sample = collection.peek(limit=5)
Embedding Model Selection
ModelDimensionsSpeedAccuracy
all-MiniLM-L6-v2 (default/ONNX)384FastestGood for short text
text-embedding-3-small (OpenAI)1536API-dependentExcellent
text-embedding-3-large (OpenAI)3072API-dependentBest (expensive)

Default ONNX model (all-MiniLM-L6-v2) runs locally, no API key needed. Downloads once (~79MB).

Performance Tuning
python
# Batch inserts (100x faster than single inserts)
batch_size = 100
for i in range(0, len(documents), batch_size):
    collection.add(
        documents=documents[i:i+batch_size],
        metadatas=metadatas[i:i+batch_size],
        ids=ids[i:i+batch_size]
    )

# Limit query results
results = collection.query(query_texts=["query"], n_results=10)

# Get with limit (prevents OOM)
all_data = collection.get(limit=500, include=["documents", "metadatas"])
Storage Monitoring
python
import os

db_path = "~/.shokunin/memory/chroma_db"
size = sum(os.path.getsize(os.path.join(root, f)) for root, _, files in os.walk(db_path) for f in files)
print(f"Database size: {size / 1024 / 1024:.1f} MB")
print(f"Collection count: {collection.count()}")
  • ~/.shokunin/scripts/seed-memory.ps1 — Imports session markdown files into ChromaDB for first-time population
  • ~/.shokunin/scripts/memory-healthcheck.ps1 — Verifies ChromaDB collection integrity and reports health status
  • ~/.shokunin/scripts/read-transcript.py — Parses MCP session transcripts and extracts structured decisions and sections

Checklist

  • Session ID is unique before storing (check with session list)
  • Entry text is descriptive: what, why, and result (not just what)
  • Type matches VALID_TYPES in MCP server config
  • Tags align with previous entries for consistent search
  • Session_end saved at end of every session

Sources

  • ChromaDB documentation (docs.trychroma.com) — vector database setup, embedding models, and query best practices
  • OpenAI text-embedding-ada-002 documentation (platform.openai.com/docs/guides/embeddings) — production embedding model benchmarks
  • MCP Protocol specification (modelcontextprotocol.io) — agent-to-tool communication protocol
  • Sentence Transformers all-MiniLM-L6-v2 (sbert.net/docs/pretrained_models.html) — lightweight local embedding alternative
  • ONNX Runtime documentation (onnxruntime.ai) — cross-platform model inference for local embeddings
  • "Designing Data-Intensive Applications" by Martin Kleppmann (O'Reilly, 2017) — durability, replication, and consistency patterns relevant to local DB design

© EliasOulkadi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .pack/skills/memory of EliasOulkadi/shokunin.

Open the folder on GitHubat commit 4c68e5b

Compare with similar skills

Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Memory this skillEliasOulkadi/shokunin114—~2.3kAutomated safety check: NotesMIT
Agent Memory Systemsomer-metin/skills-for-antigravity162—~731Automated safety check: PassApache-2.0
Memoryharperreed/dotfiles334—~484Automated safety check: PassNone
Ogham Recallogham-mcp/ogham-mcp115—~1kAutomated safety check: PassMIT
Save Knowledgeindranilbanerjee/digital-marketing-pro8591 repos~2.2kAutomated safety check: PassMIT
Codebase Managementgiancarloerra/SocratiCode3.3k1 repos~1.8kAutomated safety check: PassAGPL-3.0

Similar skills

  • Agent Memory Systems

    omer-metin/skills-for-antigravity

    Memory is the cornerstone of intelligent agents. An agent skill from omer-metin/skills-for-antigravity.

    162 GitHub stars~731 tokensUpdated 8 mo ago
    Agent WorkflowsAuto-check passed
  • Memory

    harperreed/dotfiles

    Semantic memory and context - store and retrieve information with embeddings for similarity search.

    334 GitHub stars~484 tokensUpdated 7 days ago
    AI & LLM EngineeringAuto-check passed
  • Ogham Recall

    ogham-mcp/ogham-mcp

    Smart retrieval from Ogham shared memory. An agent skill from ogham-mcp/ogham-mcp.

    115 GitHub stars~1k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • Save Knowledge

    indranilbanerjee/digital-marketing-pro

    Save a single piece of brand knowledge — a campaign learning, guideline, competitive finding, performance insight, or approved asset — to the persistent memory layer with SHA-256 deduplication…

    859 GitHub starsUsed in 1 repo~2.2k tokens
    Agent WorkflowsAuto-check passed
  • Codebase Management

    giancarloerra/SocratiCode

    Set up, index, and manage SocratiCode codebase indexing. An agent skill from giancarloerra/SocratiCode.

    3.3k GitHub starsUsed in 1 repo~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Agent Recall

    Goldentrii/AgentRecall-X

    Persistent compounding memory for AI agents. An agent skill from Goldentrii/AgentRecall-X.

    371 GitHub stars~5.2k tokensUpdated 12 days ago
    Agent WorkflowsAuto-check: notes

More from EliasOulkadi/shokunin

All 49 skills in this repo
  • CI CD

    EliasOulkadi/shokunin

    Design CI/CD pipelines for GitHub Actions, GitLab CI, and CircleCI with matrix builds, test sharding, caching, Docker layer caching, OIDC auth, deployment strategies (rolling, blue-green, canary)…

    114 GitHub stars~3.4k tokensUpdated 5 days ago
    Auto-check: notes
  • Component Forge

    EliasOulkadi/shokunin

    Build production-grade components for React, Vue 3, and Svelte 5 with all states (loading, empty, error, success, idle), TypeScript strict, WCAG 2.2 accessibility, server components (RSC), and…

    114 GitHub stars~3.6k tokensUpdated 5 days ago
    Auto-check: notes
  • DB Admin

    EliasOulkadi/shokunin

    PostgreSQL database administration — backup/restore (pgdump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication…

    114 GitHub stars~2k tokensUpdated 5 days ago
    Auto-check: notes
  • DB Sculptor

    EliasOulkadi/shokunin

    Design database schemas with Prisma/Drizzle, PostgreSQL index strategy (B-tree, GIN, GiST, BRIN, Hash), query optimization (EXPLAIN ANALYZE), migration safety (expand/contract, zero-downtime), and…

    114 GitHub stars~3.1k tokensUpdated 5 days ago
    Auto-check: notes
  • Docker

    EliasOulkadi/shokunin

    Optimize Docker images with multi-stage builds, distroless bases, BuildKit cache mounts, multi-arch builds, compose watch, security hardening (non-root, seccomp, capabilities drop), and…

    114 GitHub stars~3.8k tokensUpdated 5 days ago
    Auto-check: notes
  • Error Handler

    EliasOulkadi/shokunin

    Design error handling, structured logging, and observability with OpenTelemetry (traces, metrics, logs), error classification, recovery patterns (retry with jitter, circuit breaker, bulkhead…

    114 GitHub stars~3.6k tokensUpdated 5 days ago
    Auto-check: notes

Questions about Memory

What does Memory do?

Persistent memory across AI sessions using ChromaDB vector database. Memory is an agent skill from EliasOulkadi/shokunin. Persistent memory across AI sessions using ChromaDB vector database.

When should I use Memory?

Memory fits situations like: user asks to remember something; search past conversations; recall what was done before; save context for later.

How do I install Memory in Claude Code?

Run `npx skills add EliasOulkadi/shokunin --skill memory -a claude-code`. Or copy the skill folder (.pack/skills/memory in EliasOulkadi/shokunin) into .claude/skills/memory in your project. Claude Code loads it when a task matches its description.

How do I install Memory in Codex?

Run `npx skills add EliasOulkadi/shokunin --skill memory -a codex`. Or copy the skill folder (.pack/skills/memory in EliasOulkadi/shokunin) into .agents/skills/memory in your project. Codex loads it when a task matches its description.

Can I use Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add EliasOulkadi/shokunin --skill memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory, .gemini/skills/memory, .github/skills/memory and .opencode/skills/memory in your project.

What does Memory need to run?

Going by SKILL.md and its folder, Memory needs the command-line tools its instructions call (pip and python). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Bash, Write. Compatibility (from SKILL.md): opencode.

Does Memory access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Memory safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Memory use?

Memory is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Memory use?

About 2.3k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Memory?

Skills that share tags, products or a category with Memory: Agent Memory Systems (omer-metin/skills-for-antigravity, 162 stars), Memory (harperreed/dotfiles, 334 stars), Ogham Recall (ogham-mcp/ogham-mcp, 115 stars) and Save Knowledge (indranilbanerjee/digital-marketing-pro, 859 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Memory?

EliasOulkadi (a GitHub user) maintains it in EliasOulkadi/shokunin, which has 114 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 5, 2026.

Source: EliasOulkadi/shokunin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.