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.
npx agentmods add commands/rand/mnemosyne/icsgit clone --depth 1 https://github.com/rand/mnemosyneWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00019 | $0.01237 |
| Opus 5 | $0.00010 | $0.00619 |
| Sonnet 5 | $0.00004 | $0.00247 |
| Haiku 4.5 | $0.00002 | $0.00124 |
Grade B, and why
ics 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 3d 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.
RESULT=$(cat .claude/sessions/edit-result.json) How it starts
The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.
I will launch the Integrated Context Studio (ICS) for you to interactively edit a context file.
Parse arguments:
- First positional arg: file path (optional, creates temp file if not provided)
--template <T>: Use template (api|architecture|bugfix|feature|refactor)--readonly: Open in read-only mode (view only, no editing)--panel <P>: Start with panel visible (memory|diagnostics|proposals|holes)
Examples:
/ics context.md
/ics --template api new-api-spec.md
/ics --readonly docs/architecture.md
/ics --panel memory context.md
Steps:
-
Parse command arguments:
- Extract file path from first positional argument
- Extract flags: --template, --readonly, --panel
- If no file provided: create
.claude/context-temp-{timestamp}.md
-
Prepare file:
- If file doesn't exist and template requested: note template will be applied by ICS
- If file doesn't exist and no template: ICS will create empty file
- If file exists: ICS will load it
-
Create session directory:
mkdir -p .claude/sessions -
Build mnemosyne edit command:
# Base command CMD="mnemosyne edit" # Add file path CMD="$CMD <file_path>" # Add options if [[ -n "$template" ]]; then CMD="$CMD --template $template" fi if [[ "$readonly" == "true" ]]; then CMD="$CMD --readonly" fi if [[ -n "$panel" ]]; then CMD="$CMD --panel $panel" fi # Add session context for handoff (hidden flag) CMD="$CMD --session-context .claude/sessions/edit-intent.json" -
Show launch message:
🎨 Launching Integrated Context Studio... File: <file_path> Template: <template or "none"> Mode: <"read-only" or "edit"> Panel: <panel or "none"> ICS will now take over your terminal. Edit your context with full features: • Vim mode (if enabled) • Syntax highlighting • Semantic analysis • Memory panel (Ctrl+M) • Diagnostics (Ctrl+D) • Typed holes (Ctrl+H) Save (Ctrl+S) and quit (Ctrl+Q) when done. -
Execute command (this takes over terminal):
$CMDNote: The terminal is now controlled by ICS. Wait for user to exit.
-
After ICS exits, read result:
# Check if result file exists if [ -f .claude/sessions/edit-result.json ]; then # Read and parse result RESULT=$(cat .claude/sessions/edit-result.json) # Extract key fields with jq STATUS=$(echo "$RESULT" | jq -r '.status') CHANGES=$(echo "$RESULT" | jq -r '.changes_made') EXIT_REASON=$(echo "$RESULT" | jq -r '.exit_reason') # Read the edited file content CONTENT=$(cat <file_path>) else # No result file - user may have force-quit STATUS="unknown" CHANGES="false" EXIT_REASON="unknown" CONTENT=$(cat <file_path> 2>/dev/null || echo "") fi -
Display result summary:
✓ ICS session complete Status: <status> Changes made: <yes/no> Exit: <user_saved/user_cancelled/error>If
changes_made == trueand result has analysis:Semantic Analysis: • Filled <N> typed holes • Referenced <N> memories • Resolved <N> diagnostics • Extracted entities: <list> -
Display edited content (if not readonly):
Here's your edited context: <CONTENT> Shall I proceed with this context? -
Cleanup:
# Remove coordination files rm -f .claude/sessions/edit-intent.json rm -f .claude/sessions/edit-result.json -
Wait for user response:
- If user says "yes" or "proceed": continue with the context
- If user says "edit again" or "refine": Re-run steps 3-11
- If user says "discard" or "cancel": Discard changes
Error handling:
- If
mnemosyne editcommand fails: "Error launching ICS. Please check mnemosyne installation." - If user force-quits (Ctrl+C): "ICS session interrupted. File may be partially edited."
- If timeout (5 min): "ICS session timed out. File saved to {path}."
- If file is readonly and user tries to edit: ICS will prevent saves automatically
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.
- 3d ago First seen · 168 lines · 19 tokens per session scan B 1444fd50d57a
ics is a command published in the GitHub repository rand/mnemosyne (84 stars, last pushed 9mo ago), licensed MIT. It adds 19 tokens to every session and 1,237 once invoked, about $0.0001 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.
Other commands, from other repositories
hatch3r-bug-plan
Diagnose a complex incident -- reproduce the symptom, rank root-cause hypotheses, design the fix path, and emit regression coverage items as a board-ready investigation.
hatch3r-debug
Standalone debug-and-fix workflow — add strategic debug logging, collect runtime logs from the user, perform root cause analysis, implement the fix, and clean up all debug artifacts.
hatch3r-feature-plan
Design a new capability -- draft user stories, acceptance criteria, data model, API surface, and sub-issue breakdown as an epic-shaped todo.md for greenfield features.
story-6.1.4
Story ID: 6.1.4 Epic: Epic-6.1 - Agent Identity System Wave: Wave 1 (Foundation) Status: 📋 Ready to Start Priority: 🔴 Critical Owner: Dev (Dex) Created: 2025-01-14 Updated: 2025-01-17 (v4 - Unified System Integration) Duration: 2.5 days (20 hours) Investment: $250.00.
hatch3r-bug-pipeline
Run a known-cause bug fix through a 3-phase test-first pipeline -- reproduce + root-cause, regression-test + fix together, then root-cause-depth review -- with full sub-agent delegation.
hatch3r-incident-response
Drive a live production incident through a structured lifecycle -- triage + topology, bounded-autonomy mitigation, stakeholder communication, then a blameless post-mortem with runbook -- via delegated sub-agents.