mempenny: Command for Claude Code

.opencode/commands/mempenny-memory-auto-split.md

mempenny-memory-auto-split is a command for Claude Code, OpenCode from marcelopaniza/mempenny. It costs 41 tokens per session (530 once invoked), scanned A, original, MIT.

A fallback command that splits an oversized memory topic file into an index and linked pages while preserving its content. An index is a main page that points to related pages.

In plain words
What is it for?
Use it to back up an eligible topic file, split it deterministically, and update the new index with links to its pages.
Why use it?
It reduces the size of a memory file when other cleanup methods cannot do so without losing content.

Command for Claude CodeOpenCode

Written for Claude Code and OpenCode: ${CLAUDE_PLUGIN_ROOT} variable, but also installed under .opencode/. Also seen: agent in frontmatter; reads .claude/ paths; mentions subagents.

This is marcelopaniza/mempenny's own configuration. It tells Claude Code and OpenCode how to work on mempenny itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mempenny configures →

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the mempenny plugin — 2 skills, 18 commands, 1 agent, 1 hook shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to marcelopaniza/mempenny. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/marcelopaniza/mempenny/main/.opencode/commands/mempenny-memory-auto-split.md
Clone the repo
git clone --depth 1 https://github.com/marcelopaniza/mempenny

Made for: Claude Code, OpenCode.

Or install mempenny, the plugin that ships this one along with the rest of its 2 skills, 18 commands, 1 agent, 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 mempenny-memory-auto-split

README.md
[![agentmods](https://agentmods.dev/badge/commands/marcelopaniza/mempenny/mempenny-memory-auto-split.svg)](https://agentmods.dev/commands/marcelopaniza/mempenny/mempenny-memory-auto-split)
Your own site
<a href="https://agentmods.dev/commands/marcelopaniza/mempenny/mempenny-memory-auto-split"><img src="https://agentmods.dev/badge/commands/marcelopaniza/mempenny/mempenny-memory-auto-split.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 530 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00041 $0.00530
Opus 5 $0.00020 $0.00265
Sonnet 5 $0.00008 $0.00106
Haiku 4.5 $0.00004 $0.00053

Measured 7d ago against content hash 06ba902ad653, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

mempenny-memory-auto-split 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 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.

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.

.opencode/commands/mempenny-memory-auto-split.md · 38 lines

What it actually says

MemPenny memory-auto-split — opencode host adapter

The user invoked this command with: $ARGUMENTS

Execute the MemPenny memory-auto-split flow. The canonical procedure lives in:

${MEMPENNY_ROOT}/commands/memory-auto-split.md

Read it first with the Read tool — it is the single source of truth for the eligibility check (the 5 auto-split-eligible basenames), the backup, the deterministic hooks/auto-split.sh invocation, and the index-update step. This file only describes the opencode host differences.

Apply these opencode host adaptations (override the source wherever they conflict):

A. Paths & environment

The env shim sets MEMPENNY_HOST=opencode, MEMPENNY_ROOT, MEMPENNY_DATA_DIR. Substitute:

  • ${CLAUDE_PLUGIN_ROOT}${MEMPENNY_ROOT}
  • ${CLAUDE_PLUGIN_DATA}${MEMPENNY_DATA_DIR}
  • ${CLAUDE_PROJECT_DIR} → the current working directory

B. Config path (shared with Claude Code)

  1. ${MEMPENNY_CONFIG_PATH} if set.
  2. Else ~/.claude/mempenny.config.json if ~/.claude/ exists.
  3. Else ~/.config/opencode/mempenny.config.json.

C. Command namespace

Sibling commands use the hyphen namespace.

auto-split-specific notes

  • The first positional arg is the absolute path to a topic file (required); --lang parses from $ARGUMENTS. There is no --yes flag and no confirmation gate — same as the source (see its "Why no confirmation gate").
  • Step 5 runs bash "${MEMPENNY_ROOT}/hooks/auto-split.sh" … directly via Bash in this context — do NOT spawn a subagent for it; the source explains why (deterministic script, no judgment call, content never flows through the prompt).
  • Relay the script's SPLIT OK / SPLIT FAILED / SCRIPT_OK output verbatim, per the source's Step 5/7.
  • Backup-first behavior is unchanged; /mempenny-restore reverses any pass.
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 First seen · 38 lines · 41 tokens per session scan A 06ba902ad653

Subscribe to this mod's changes

mempenny-memory-auto-split is a command published in the GitHub repository marcelopaniza/mempenny (2 stars, last pushed 18d ago), licensed MIT. It adds 41 tokens to every session and 530 once invoked, about $0.0002 per session on Opus 5. 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-08-31.

Related

Other commands, from other repositories

remember

Stores decisions, patterns, and outcomes in the MCP memory knowledge graph as entities with typed observations and relations. Supports recording architectural decisions, anti-patterns, tool preferences, workflow outcomes, and project conventions that persist across sessions. Use when saving patterns, remembering…

yonatangross/orchestkit · 62 tokens

memory

Unified read-side memory operations including knowledge graph search, session context loading, decision timeline viewing, and Mermaid graph visualization. Subcommands: search, load, history, viz, status. Complements /ork:remember (write-side). Use when searching past decisions, loading context, or visualizing the…

yonatangross/orchestkit · 64 tokens

mempalace-init

Set up MemPalace — install the package, initialize a palace, register the MCP server with Cursor, and verify everything works.

MemPalace/mempalace · 26 tokens

mempalace-status

Show the current state of your memory palace — wings, rooms, drawer counts, and suggestions.

MemPalace/mempalace · 19 tokens

ingest

Ingest source material into an active wiki. Accepts URLs, file paths, PDFs, freeform text, or processes the inbox. Supports tweets via Grok MCP.

nvk/llm-wiki · 34 tokens

design-import

Scaffolds React components from a Claude Design handoff bundle and stops at files on disk: no stories, no tests, no pull request. Use when handed a claude.ai/design URL or a local bundle file; when that same scaffold should carry on through test generation, browser verification and an opened PR, run /ork:design-ship…

yonatangross/orchestkit · 74 tokens