setup

A setup command for mnemonic, a memory system that stores project notes and instructions for later use. It configures where memories are kept and adds guidance for using them proactively.

In plain words
What is it for?
It helps initialize a project memory directory, migrate existing memories, version them with Git, and create initial project context.
Why use it?
It removes the repeated manual work of configuring memory storage, project identity, and startup instructions.

Command

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/modeled-information-format/mnemonic/setup
Clone the repo
git clone --depth 1 https://github.com/modeled-information-format/mnemonic
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,310 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00008 $0.02310
Opus 5 $0.00004 $0.01155
Sonnet 5 $0.00002 $0.00462
Haiku 4.5 $0.00001 $0.00231

Measured yesterday against content hash 1c7db8504108, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

setup scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

if ! grep -q "## Mnemonic Memory System" ~/.claude/CLAUDE.md 2>/dev/null; then
commands/setup.md · 301 lines

How it starts

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

Memory

Search first: /mnemonic:search {relevant_keywords} Capture after: /mnemonic:capture {namespace} "{title}"

Run /mnemonic:list --namespaces to see available namespaces from loaded ontologies.

/mnemonic:setup

Configure Claude to proactively use mnemonic memory without user intervention.

What This Command Does

  1. Prompts user for memory store path (default: ~/.claude/mnemonic)
  2. Creates ~/.config/mnemonic/config.json with user's choice
  3. Detects organization from git remote
  4. Detects project name from git root
  5. Creates unified mnemonic directory structure under ${MNEMONIC_ROOT}/{org}/{project}/
  6. Initializes git repository for versioning
  7. Appends proactive behavior instructions to ~/.claude/CLAUDE.md (global only)
  8. Creates initial project context memory
  9. If memories exist at old path and user chose different path, auto-migrates

Arguments

  • --force - Overwrite existing mnemonic configuration sections

Procedure

Step 0: Configure Memory Store Path

Ask the user where to store memories. Create the config file at the fixed XDG location.

# Check for existing config
if [ -f ~/.config/mnemonic/config.json ]; then
    STORE_PATH=$(python3 -c "import json; print(json.load(open('$HOME/.config/mnemonic/config.json'))['memory_store_path'])")
    echo "Existing config found. Memory store path: $STORE_PATH"
else
    STORE_PATH="~/.claude/mnemonic"
fi

Ask the user: "Where should mnemonic store memories? (default: ~/.claude/mnemonic)"

After the user responds (or accepts default):

# Create config directory and file
mkdir -p ~/.config/mnemonic
cat > ~/.config/mnemonic/config.json << EOF
{
  "version": "1.0",
  "memory_store_path": "$STORE_PATH"
}
EOF
echo "Config saved to ~/.config/mnemonic/config.json"

# Expand for use in subsequent steps
STORE_PATH_EXPANDED="${STORE_PATH/#\~/$HOME}"

Step 1: Detect Context

# Organization from git remote
ORG=$(git remote get-url origin 2>/dev/null | sed -E 's|.*[:/]([^/]+)/[^/]+\.git$|\1|' | sed 's|\.git$||')
[ -z "$ORG" ] && ORG="default"

# Project from git root
PROJECT=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null)
[ -z "$PROJECT" ] && PROJECT=$(basename "$PWD")

echo "Organization: $ORG"
echo "Project: $PROJECT"

Read the full file on GitHub · 301 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 · 301 lines · 8 tokens per session scan B 1c7db8504108

Subscribe to this mod's changes

setup is a command published in the GitHub repository modeled-information-format/mnemonic (22 stars, last pushed 1mo ago), licensed MIT. It adds 8 tokens to every session and 2,310 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.