compound-memory

A session-review tool that extracts reusable patterns from the current conversation into memory files. It is intended for meaningful debugging lessons, workarounds, architecture decisions, and integration patterns.

In plain words
What is it for?
Use it at the end of a substantial coding session to review the transcript and save confirmed, reusable lessons as separate memory entries.
Why use it?
It preserves useful knowledge from a completed session without saving trivial or one-time details. It also requires confirmation before writing and avoids overwriting existing memory entries.

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/qgolem/orc/compound-memory
Any agent
npx skills add qGolem/orc --skill compound-memory
Clone the repo
git clone --depth 1 https://github.com/qGolem/orc

Made for: Claude Code, Codex.

Per session 9 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,081 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.00009 $0.02081
Opus 5 $0.00005 $0.01040
Sonnet 5 $0.00002 $0.00416
Haiku 4.5 $0.00001 $0.00208

Measured 2d ago against content hash 7af31b12c4ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compound-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 2d 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.

skills/compound-memory/SKILL.md · 247 lines

How it starts

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

Compound Memory

Extract patterns from the current session's JSONL transcript and save as individual memory files.

Not your role:

  • Saving trivial fixes or language basics
  • Writing without user confirmation
  • Overwriting existing memory entries

When to use:

  • End of session with non-trivial debugging, workarounds, architecture decisions, or integration patterns

What NOT to extract:

  • Trivial fixes, one-time issues, language basics, things already in CLAUDE.md

Process

Step 1: Extract Current Session Transcript

Write the jq filter to a file first (avoids zsh != history expansion and nested quoting issues), then run it:

# Write jq filter to file to avoid shell quoting issues
cat > /tmp/memory-palace-filter.jq << 'JQEOF'
if .type == "user" then
  .message.content |
  if type == "string" then
    "USER: " + .
  elif type == "array" then
    [ .[] |
      if .type == "text" then .text
      elif .type == "tool_result" then
        (.content |
          if type == "string" then .[0:100]
          elif type == "array" then
            [.[] | select(.type == "text") | .text[0:100]] | join(" ")
          else "" end
        ) | if . != "" then "RESULT: " + . else empty end
      else empty end
    ] | map(select(. != "")) | join("\n") |
    if . != "" then "USER:\n" + . else empty end
  else empty end
elif .type == "assistant" then
  [ .message.content // [] | .[] |
    if .type == "text" then .text
    elif .type == "tool_use" then
      "TOOL: " + .name + "(" + (.input | tostring | .[0:100]) + ")"
    else empty end
  ] | map(select(. != "")) | join("\n") |
  if . != "" then "ASSISTANT:\n" + . else empty end
else empty end
JQEOF

Read the full file on GitHub · 247 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. 2d ago First seen · 247 lines · 9 tokens per session scan A 7af31b12c4ae

Subscribe to this mod's changes

compound-memory is a skill published in the GitHub repository qGolem/orc (5 stars, last pushed 5mo ago), licensed MIT. It adds 9 tokens to every session and 2,081 once invoked, about $0.0000 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-31.

Related

Other skills, from other repositories

llmtornado-tutorial-generator

Generates comprehensive code tutorials on LlmTornado API formatted for Medium publication with examples, explanations, and best practices.

lofcz/LLMTornado · 31 tokens

skill-creator

Generates Anthropic Skills with complete workflow including GitHub PR creation and local download verification.

lofcz/LLMTornado · 22 tokens

maestro-improve

Turn filed lessons into the smallest doctrine edit - group pending lessons by target, make one commit per target carrying their evidence ids, mark each lesson processed by that commit or answered with the reason it was rejected, and hand back for the challenge lane.

ReinaMacCredy/maestro · 54 tokens

maestro-verify

Verify and close - cross-check coverage, run the VERIFY table, deliver the verdict, harvest durable lessons into decisions, close the bundle, and never claim remote state from local evidence.

ReinaMacCredy/maestro · 41 tokens

ring:dispatching-workflows

Executing a phased plan in rolling waves where each phase runs as one multi-agent workflow harness: the supervisor elaborates the phase into tasks against the real landed code, launches a workflow that implements with TDD and runs mandatory in-harness review plus an adversarial contrarian pass (and researchers when…

LerianStudio/ring · 142 tokens

skill-creator

Create, edit, improve, or audit skills for SwarmClaw agents. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory. Triggers on phrases like "create a skill", "author a…

swarmclawai/swarmclaw · 107 tokens