setup

setup is a command for Claude Code from modeled-information-format/mnemonic. It costs 8 tokens per session (2,311 once invoked), scanned B, original, MIT.

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 for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Part of the mnemonic plugin — 10 skills, 14 commands, 4 agents, 1 hook shipped together

Good fit It helps initialize a project memory directory, migrate existing memories, version them with Git, and create initial project context.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/modeled-information-format/mnemonic/setup
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.

Clone the repo
git clone --depth 1 https://github.com/modeled-information-format/mnemonic

Made for: Claude Code.

Or install mnemonic, the plugin that ships this one along with the rest of its 10 skills, 14 commands, 4 agents, 1 hook.

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 setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/modeled-information-format/mnemonic/setup/github.svg)](https://agentmods.dev/commands/modeled-information-format/mnemonic/setup)
Your own site
<a href="https://agentmods.dev/commands/modeled-information-format/mnemonic/setup"><img src="https://agentmods.dev/badge/commands/modeled-information-format/mnemonic/setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for setup

Your own site · 80×15
<a href="https://agentmods.dev/commands/modeled-information-format/mnemonic/setup"><img src="https://agentmods.dev/badge/commands/modeled-information-format/mnemonic/setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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,311 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00008 $0.02311
Opus 5.5 $0.00003 $0.00924
Sonnet 5.5 $0.00002 $0.00462
Haiku 4.5 $0.00001 $0.00231

Measured 7d ago against content hash 91677f55e5c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 7d 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.

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. 7d ago Changed 91677f55e5c4
  2. 1mo ago 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 (23 stars, last pushed 3d ago), licensed MIT. It adds 8 tokens to every session and 2,311 once invoked, about $0.0000 per session on Opus 5.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.