memory-shard-roll

memory-shard-roll is a command for Claude Code from marcelopaniza/mempenny. It costs 38 tokens per session (5,052 once invoked), scanned A, original, MIT.

A command that moves entries from completed calendar years out of an oversized worklog, support, or decisions file into permanent year-specific files called shards.

In plain words
What is it for?
Use it to archive finished years from supported log-topic files and update their shard index. It only processes years that have already ended.
Why use it?
A growing history file becomes harder to navigate and maintain. Moving closed years preserves the record while keeping the active file smaller; the current year stays open.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; positional $N argument.

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

Good fit Use it to archive finished years from supported log-topic files and update their shard index. It only processes years that have already ended.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/marcelopaniza/mempenny/memory-shard-roll
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/marcelopaniza/mempenny

Made for: Claude Code.

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 memory-shard-roll

README.md
[![agentmods](https://agentmods.dev/badge/commands/marcelopaniza/mempenny/memory-shard-roll/github.svg)](https://agentmods.dev/commands/marcelopaniza/mempenny/memory-shard-roll)
Your own site
<a href="https://agentmods.dev/commands/marcelopaniza/mempenny/memory-shard-roll"><img src="https://agentmods.dev/badge/commands/marcelopaniza/mempenny/memory-shard-roll/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 memory-shard-roll

Your own site · 80×15
<a href="https://agentmods.dev/commands/marcelopaniza/mempenny/memory-shard-roll"><img src="https://agentmods.dev/badge/commands/marcelopaniza/mempenny/memory-shard-roll.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,052 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.00038 $0.05052
Opus 5 $0.00019 $0.02526
Sonnet 5 $0.00008 $0.01010
Haiku 4.5 $0.00004 $0.00505

Measured 9d ago against content hash 36500dc0c8ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

memory-shard-roll 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 9d 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.

commands/memory-shard-roll.md · 321 lines

How it starts

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

Roll closed calendar years out of a log-topic file (worklog.md, support.md, or decisions.md, or an already-open <topic>.md that used to be a shard's parent) into a locked, permanent <topic>-YYYY.md shard, once the open file has grown past its ceiling. See docs/memory-taxonomy-design.md §2 for the sharding rule this implements. No writes happen for content in the current (open) year — shard-roll only ever closes a year that has already ended.

Step 1 — Parse arguments

The user invoked this command with: $ARGUMENTS

  • First positional argument — absolute path to a log-topic file. Required.
  • --lang <code> — output language. Default from MEMPENNY_LOCALE or en.

Step 2 — Load locale strings

Same 2a validation + read pattern as memory-distill.md Step 2. You need apply.* and errors.* keys.

Step 3 — Validate the input file path

Identical validation chain to memory-curate.md Step 3 (regex, symlink pre-check, realpath, regex re-check, confinement to {MEMORY_DIR}, existence), with one difference at the reserved-topic check:

Reserved-topic check: the basename must be exactly one of the three log-topic files — worklog.md, support.md, decisions.md. (Reference-topics never shard — see docs/memory-taxonomy-design.md §2 — if the target is a reference-topic, print an error pointing at /mempenny:memory-curate instead and STOP.)

Folder-lock and file-lock checks: identical to memory-curate.md Step 3. If the target file itself is already locked, STOP — a locked file is either already a closed shard (nothing to roll) or explicitly frozen by the user; either way, do not touch it.

Step 4 — Determine closed years

CURRENT_YEAR=$(date -u +%Y)

Determine closed years mechanically — do not read the target file's content into this (the orchestrating) context to figure this out by eye. Every top-level ## YYYY-MM heading whose YYYY is strictly less than $CURRENT_YEAR belongs to a closed year — the year has fully ended, this is a fact, not a judgment call — but "which lines are real headings" is exactly as mechanical a question, and should be answered the same fence-aware way Step 7's apply script answers it, not by an LLM skimming the file (a heading-shaped line quoted inside a fenced code example must not be mistaken for a real one):

Read the full file on GitHub · 321 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. 9d ago First seen · 321 lines · 38 tokens per session scan A 36500dc0c8ed

Subscribe to this mod's changes

memory-shard-roll is a command published in the GitHub repository marcelopaniza/mempenny (2 stars, last pushed 20d ago), licensed MIT. It adds 38 tokens to every session and 5,052 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