memory

memory is a command for Claude Code from tatargabor/set-copilot. It costs 0 tokens per session (1,459 once invoked), scanned A, original, MIT.

A command for working with a project's stored memories through shodh-memory, a system for saving and searching project context. It supports recalling, saving, listing, inspecting, and deleting memories.

In plain words
What is it for?
It is for searching related memories, recording new facts or failures, reviewing memory health, and removing stale or unwanted entries.
Why use it?
It helps an agent retain useful project information and find it later instead of relying only on the current conversation.

Command for Claude Code

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 commands/tatargabor/set-copilot/memory
Clone the repo
git clone --depth 1 https://github.com/tatargabor/set-copilot

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/commands/tatargabor/set-copilot/memory.svg)](https://agentmods.dev/commands/tatargabor/set-copilot/memory)
Your own site
<a href="https://agentmods.dev/commands/tatargabor/set-copilot/memory"><img src="https://agentmods.dev/badge/commands/tatargabor/set-copilot/memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,459 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.00000 $0.01459
Opus 5 $0.00000 $0.00730
Sonnet 5 $0.00000 $0.00292
Haiku 4.5 $0.00000 $0.00146

Measured today against content hash 0587a189a3c6, 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 today.

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.

.claude/commands/set/memory.md · 165 lines

How it starts

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

Interact with the project's cognitive memory system (shodh-memory).

Usage: /set:memory [subcommand] [args]

Subcommands:

Core:

  • status [--json] — Show config, health, and memory count
  • recall <query> [--limit N] [--mode MODE] [--tags t1,t2] [--tags-only] [--min-importance F] — Semantic search
  • proactive <context> [--limit N] — Context-aware retrieval with relevance scores
  • remember --type TYPE [--tags t1,t2] [--metadata JSON] [--failure] [--anomaly] — Save a new memory (stdin)
  • list [--type TYPE] [--limit N] — List all memories (JSON)
  • browse (default) — Show summary grouped by type
  • projects — List all projects with memory counts

Forget / Cleanup:

  • forget <id> — Delete a single memory by ID
  • forget --all --confirm — Delete ALL memories
  • forget --older-than <days> — Delete memories older than N days
  • forget --tags <t1,t2> — Delete memories matching tags
  • forget --pattern <regex> — Delete memories matching regex

Diagnostics:

  • stats [--json] — Memory quality diagnostics (types, tags, importance)
  • cleanup [--threshold F] [--dry-run] — Remove low-value memories (default threshold 0.2)
  • audit [--threshold F] [--json] — Duplicate detection report (default threshold 0.75)
  • dedup [--threshold F] [--dry-run] [--interactive] — Remove duplicate memories

Introspection:

  • get <id> — Get a single memory by ID (JSON)
  • context [topic] — Condensed summary by category
  • brain — 3-tier memory visualization

Export / Import:

  • export [--output FILE] — Export all memories to JSON
  • import FILE [--dry-run] — Import memories from JSON (skip duplicates)

Sync (team sharing via git):

  • sync — Push + pull in one step
  • sync push — Export and push to git remote
  • sync pull [--from user/machine] — Pull and import from git remote
  • sync status — Show sync state and remote sources

Maintenance:

  • health — Check if shodh-memory is available
  • health --index — Check index health (JSON)
  • repair — Repair index integrity
  • migrate — Run pending memory migrations
  • migrate --status — Show migration history

What to do:

  1. Parse $ARGUMENTS to determine the subcommand (first word). If no arguments, default to browse. If unrecognized subcommand, pass through to set-memory directly.

  2. Check health first:

    set-memory health
    

    If this fails (exit code non-zero), display:

    "Memory system not available — shodh-memory is not running. Check with set-memory health." Then STOP.

  3. Execute the subcommand:

    status:

    set-memory status $REMAINING_ARGS
    

    Display the output directly.

    recall (rest of arguments is the query and flags):

    Recall modes (--mode): semantic (default), temporal, hybrid, causal, associative. Parse the JSON output. For each memory, display:

    • Type and tags
    • Content (truncated to 200 chars if long)
    • Creation date If no results, say "No matching memories found."

    proactive (rest of arguments is context string):

    set-memory proactive "<context>" --limit 5
    

    Parse JSON and display results like recall.

    remember (rest of arguments is the content):

    • Use the AskUserQuestion tool to ask which memory type to use:
      • Options: Decision, Learning, Context
    • Optionally ask for comma-separated tags (or skip)
    • Then run:
    • Confirm: "Memory saved."

    list:

    set-memory list $REMAINING_ARGS
    

    Parse JSON and display in a readable table format.

    browse (default):

    set-memory status
    set-memory list
    

    Display status summary, then group memories by type (Decision, Learning, Context) and show counts + recent entries.

    forget (pass all remaining args through):

    set-memory forget $REMAINING_ARGS
    

    DESTRUCTIVE — warn user before running without --dry-run. Display output directly.

    stats / cleanup / audit / dedup (pass all remaining args through):

    set-memory <subcommand> $REMAINING_ARGS
    

    Display the output directly. For dedup without --dry-run or --interactive, warn about destructive operation.

Read the full file on GitHub · 165 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. today First seen · 165 lines · 0 tokens per session scan A 0587a189a3c6

Subscribe to this mod's changes

memory is a command published in the GitHub repository tatargabor/set-copilot (2 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,459 tokens. 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-09-04.