nap

nap is a command for Claude Code from marcelopaniza/mempenny. It costs 38 tokens per session (6,070 once invoked), scanned C, original, MIT.

A command that schedules memory cleanup for a project. It can run daily, weekly, or once when you next open Claude Code after the scheduled time.

In plain words
What is it for?
Use it to create, list, or cancel cleanup schedules for memory directories.
Why use it?
It removes the need to remember to clean the project’s memory directory manually.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool; positional $N argument.

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

Good fit Use it to create, list, or cancel cleanup schedules for memory directories.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add marcelopaniza/mempenny
Claude Code
/plugin install 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 nap

README.md
[![agentmods](https://agentmods.dev/badge/commands/marcelopaniza/mempenny/nap.svg)](https://agentmods.dev/commands/marcelopaniza/mempenny/nap)
Your own site
<a href="https://agentmods.dev/commands/marcelopaniza/mempenny/nap"><img src="https://agentmods.dev/badge/commands/marcelopaniza/mempenny/nap.svg" alt="Measured on agentmods" 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 6,070 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.06070
Opus 5 $0.00019 $0.03035
Sonnet 5 $0.00008 $0.01214
Haiku 4.5 $0.00004 $0.00607

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

Security

Grade C, and why

nap scanned grade C with 2 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 600 "$bak"

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

for settings_path in "$HOME/.claude/settings.json" "./.claude/settings.json" "./.claude/settings.local.json"; do
commands/nap.md · 435 lines

How it starts

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

Schedule a recurring /mempenny:clean for the current memory directory. The schedule lives in ~/.claude/mempenny.config.json; the cleanup itself fires via a plugin-shipped SessionStart hook the next time you open Claude Code in this project after the scheduled time.

Auth-agnostic: works with whatever Claude Code is already using — OAuth, API key, otherwise. MemPenny doesn't care.

Step 1 — Parse arguments

The user invoked this command with: $ARGUMENTS

Parse optional arguments:

  • --cancel — remove the schedule entry for the current memory dir. Mutually exclusive with the configure flow.
  • --list — print all scheduled memory dirs from the config and exit. Read-only.
  • --dir <path> — absolute path to the memory directory. If set, use verbatim; otherwise auto-detect (Step 3).
  • --lang <code> — output language. If not passed, check MEMPENNY_LOCALE. Default en.

If both --cancel and --list are passed, treat as --list (read-only wins; cancel is ignored). If --list is passed, skip Step 3's memory-dir resolution — --list is global.

Step 2 — Load locale strings

2a — Validate <lang> before reading (H2: path traversal guard)

Before constructing the locale path, validate that <lang> matches the regex ^[a-zA-Z]{2,3}(-[A-Za-z0-9]{2,8})?$. If it does not match, treat it exactly like a missing locale: silently reset <lang> to en and warn with errors.locale_missing.

Read ${CLAUDE_PLUGIN_ROOT}/locales/<lang>/strings.json. Fall back to en if the file is missing (warn with errors.locale_missing).

You'll need nap.*, errors.*, warnings.*, prompts.*, confirmations.*, and clean.first_run_default keys.

Step 3 — Locate the memory directory

(Skip this step if --list was passed — --list is global across all configured memory dirs.)

If --dir <path> was passed, apply the following validation. On any failure, print errors.memory_dir_not_found and STOP:

  1. Regex: ^/[A-Za-z0-9/_.\ -]{1,4096}$ (alphanumerics, slash, underscore, dot, hyphen, space only).
  2. Realpath: run realpath "<candidate>" via Bash. Use the resolved value for all subsequent steps.
  3. Depth: reject if the realpath equals / or has fewer than 2 path components.
  4. Existence + not-a-symlink: [ -d "$resolved" ] && [ ! -L "$resolved" ].

Read the full file on GitHub · 435 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 First seen · 435 lines · 0 tokens per session scan C 74b5af0538ab

Subscribe to this mod's changes

nap is a command published in the GitHub repository marcelopaniza/mempenny (2 stars, last pushed 18d ago), licensed MIT. It adds 38 tokens to every session and 6,070 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). 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