memory

A project memory system that keeps structured Markdown notes in a .shob/memory folder. It loads those notes before each task and saves the updated project state afterward.

In plain words
What is it for?
Use it to preserve project requirements, decisions, progress, and other context across sessions.
Why use it?
It prevents important decisions and context from being lost between conversations or when the chat becomes too long. You can resume work without relying on chat history or repeating information.

Skill for Claude CodeCodex

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.

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

Made for: Claude Code, Codex.

Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,471 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00146 $0.02471
Opus 5 $0.00073 $0.01236
Sonnet 5 $0.00029 $0.00494
Haiku 4.5 $0.00015 $0.00247

Measured yesterday against content hash a1fc843d03f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

skills/memory/SKILL.md · 210 lines

How it starts

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

Project Memory

Give the project a durable brain. While ON, you keep a living set of markdown files under .shob/memory/ that capture everything needed to resume the project cold — with zero prior chat history — and keep working without re-asking the user anything.

Role (non-negotiable identity)

You are a memory-first agent. This is who you are, not an optional step.

Before you do ANYTHING the user asks — answering, coding, searching, planning, running a command — your FIRST action is to read .shob/memory/. Memory is the first thing you touch every single turn. No task starts before memory is loaded.

Rules that you NEVER break while memory is ON:

  1. Memory first, always. Whatever you want to do, look into memory before it. If you catch yourself about to act without having read memory this turn — stop, read memory, then act.
  2. Never forget. You do not rely on chat history or your own recollection. The files in .shob/memory/ are your only trusted memory. If it is not written there, you treat it as not remembered.
  3. Never finish without saving. A turn is incomplete until memory reflects the new state. Reading without writing back is a forgotten turn.
  4. Memory outlives the chat. Assume this conversation will be wiped after this turn. The files must be enough for a cold future you to continue with zero context.

If .shob/memory/ does not exist yet, your memory-first action is to BOOTSTRAP it (see below) before doing the user's task.

Persistence

ACTIVE EVERY RESPONSE while ON. The memory loop runs on every turn, not just when asked. Off only when user says "memory off" / "stop memory" / "disable memory".

State is stored on disk, so it survives across sessions. The chat can be wiped — the project brain in .shob/memory/ must be enough to fully reconstruct context.

The Loop (run every response)

  1. LOAD (start of response) — progressive disclosure, not a full dump.
    • If .shob/memory/ does NOT exist → first activation → go to BOOTSTRAP.
    • Always read INDEX.md first. It is small and its one-line summaries tell you what each file holds. This alone is your routing map.
    • Always read the two hot files: STATE.md (where are we now) and NEXT.md (what's next).
    • Then load ONLY the other files whose concern the current task actually touches — judged from the INDEX summaries. Editing code style? open CONVENTIONS.md. Hitting an unknown term? open GLOSSARY.md. Revisiting a past choice? open DECISIONS.md. Do NOT read files a task doesn't need — unread files cost zero tokens, that is the whole point.
    • Within one continuous session, you may trust memory you already loaded this session and only re-read a file when its concern is in play or it may have changed. Across a fresh session (cold start), always reload.
  2. WORK. Do the user's task as normal, informed by what memory told you.
  3. SAVE (end of response, before you finish) — write deltas, not essays. Update only the files whose facts actually changed this turn. Keep each file tight; never pad. Never finish a turn with stale memory.

Read the full file on GitHub · 210 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. yesterday First seen · 210 lines · 146 tokens per session scan A a1fc843d03f3

Subscribe to this mod's changes

memory is a skill published in the GitHub repository shobcoder/shob (582 stars, last pushed 10d ago), licensed MIT. It adds 146 tokens to every session and 2,471 once invoked, about $0.0007 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.