Borrowing it
Nothing to install: this file belongs to rand/mnemosyne. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/rand/mnemosyne/main/.claude/commands/ics.mdgit clone --depth 1 https://github.com/rand/mnemosyneWrote 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.
[](https://agentmods.dev/commands/rand/mnemosyne/ics)<a href="https://agentmods.dev/commands/rand/mnemosyne/ics"><img src="https://agentmods.dev/badge/commands/rand/mnemosyne/ics/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.
<a href="https://agentmods.dev/commands/rand/mnemosyne/ics"><img src="https://agentmods.dev/badge/commands/rand/mnemosyne/ics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00019 | $0.01237 |
| Opus 5.5 | $0.00008 | $0.00495 |
| Sonnet 5.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 1mo 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.
- 1mo ago First seen · 168 lines · 19 tokens per session scan B 1444fd50d57a
ics is a command published in the GitHub repository rand/mnemosyne (101 stars, last pushed 11mo ago), licensed MIT. It adds 19 tokens to every session and 1,237 once invoked, about $0.0001 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.
Other commands, from other repositories
diagnose-synapse
Run a comprehensive diagnostic of the SYNAPSE context engine, comparing expected vs. actual pipeline state, including session performance analysis with exact timing data.
memory
Read-side memory operations on the knowledge graph: search past decisions and patterns, load session context, view decision timelines, render Mermaid graph visualizations. Subcommands: search, load, history, viz, status. Use when finding or reviewing what memory already holds. For storing new knowledge instead, invoke…
compact-prep
Ask the agent to prepare for conversation compaction by updating any relevant state and providing guidance for the compaction agent and to kick off the session there after.
greet
Generate contextual agent greeting using GreetingBuilder infrastructure.
add-rule
Adds a new rule to an existing SYNAPSE domain file.
toggle-domain
Toggles a SYNAPSE domain between active and inactive in the manifest.