zip

A command that creates a dated ZIP file containing the agent's memory, handoff notes, plans, and global settings. It saves the archive to an existing directory without using GitHub or the network.

In plain words
What is it for?
Use it to archive agent state before wiping or moving a computer, or to keep an offline backup. You choose the destination each time.
Why use it?
It provides a portable copy for a USB drive, an offline computer, or a one-time snapshot. It also asks whether to scan the files for secrets before creating the archive.

Command

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.

agentmods
npx agentmods add commands/cwakim/claude-plugins/zip
Clone the repo
git clone --depth 1 https://github.com/cwakim/claude-plugins
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00054 $0.01081
Opus 5 $0.00027 $0.00541
Sonnet 5 $0.00011 $0.00216
Haiku 4.5 $0.00005 $0.00108

Measured yesterday against content hash 45adce6acfe8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

zip 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 yesterday.

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.

plugins/memory-backup/commands/zip.md · 77 lines

How it starts

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

Zip (zip <path>)

A portable, dated archive of everything a backup would mirror, without GitHub: no repo, no gh, no network. Useful for a USB copy, an air-gapped machine, or a one-off snapshot before wiping this laptop. Does not require /backup setup to have run.

The mirror tree and naming rules live in ${CLAUDE_PLUGIN_ROOT}/docs/layout.md; the scan behavior in ${CLAUDE_PLUGIN_ROOT}/docs/secret-scan.md. Read both before building the archive.

Steps

  1. <path> is required and must be an existing directory (expand a leading ~); if it is missing or not a directory, say so and stop. There is no default destination: writing an archive is a deliberate act.
  2. Ask via AskUserQuestion, every run, before touching anything: scan the mirrored files for secrets before writing the archive, or skip the scan?
    • Scan (recommended): same secret-scan behavior as a GitHub backup.
    • Skip: copy everything as-is, no scanning, no redaction. Warn plainly, once, before proceeding: the archive may then contain credentials verbatim, and it is only as safe as <path> itself (a bare USB stick or an unencrypted folder is not a private GitHub repo). This choice is per-run and is never remembered; a zip made for quick, local carrying is a different threat model than the one it makes for someone who's about to hand <path> to another machine or drive.
  3. Build the same tree a backup run would, in a fresh temp directory (mktemp -d), under machines/<hostname>/ for parity with the GitHub layout and the manual restore fallback: the full inclusion list, naming rules, and exclusions are in docs/layout.md, and the handoff-copying rules (index parsed with python, archived handoffs collected separately) are identical to a backup run's.
  4. If scanning was chosen, scan every file for secrets per docs/secret-scan.md. Reuse this machine's shared .redact-allow read-only if it exists; new findings are asked interactively (batched, same three choices) and includes go to a .redact-allow bundled inside the archive itself, never the shared one, per the allowlist section of docs/secret-scan.md. If scanning was skipped, do nothing here: every file goes in as found.
  5. Write manifest.json at the archive root per docs/layout.md, with "scanned": true/false recording which choice step 2 made.
  6. Zip the temp directory into <path>/memory-backup-<hostname>-<YYYY-MM-DD-HHMM>.zip, then remove the temp directory.
  7. Report: the archive's full path and size, counts mirrored per store, and whether the scan ran. If scanning ran: every redaction or omission (loudly, same as a backup). If it was skipped: repeat the warning from step 2 once more here, so it isn't just a prompt someone clicked past.

Read the full file on GitHub · 77 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. yesterday First seen · 77 lines · 54 tokens per session scan A 45adce6acfe8

Subscribe to this mod's changes

zip is a command published in the GitHub repository cwakim/claude-plugins (2 stars, last pushed 11d ago), licensed MIT. It adds 54 tokens to every session and 1,081 once invoked, about $0.0003 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.