cleanup-dev

cleanup-dev is a command for coding agents from punt-labs/z-spec. It costs 7 tokens per session (590 once invoked), scanned A, original, MIT.

A developer-version cleanup command for removing automatically managed Z specification and TeX build files. It keeps the original Z source files and compiled PDFs.

In plain words
What is it for?
Use it to clean a chosen directory, defaulting to docs, by deleting fuzz.sty, font files, logs, auxiliary files, fuzz output, and table-of-contents files.
Why use it?
It removes tooling files and temporary outputs that clutter the project after specification work, without removing the documents meant to be kept.

Command

Part of the z-spec-dev plugin — 42 commands, 1 hook shipped together

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/punt-labs/z-spec/cleanup-dev
Clone the repo
git clone --depth 1 https://github.com/punt-labs/z-spec

Or install z-spec-dev, the plugin that ships this one along with the rest of its 42 commands, 1 hook.

Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 590 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.00007 $0.00590
Opus 5 $0.00003 $0.00295
Sonnet 5 $0.00001 $0.00118
Haiku 4.5 $0.00001 $0.00059

Measured 3d ago against content hash 459b7bc49ff3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cleanup-dev 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 3d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • cleanup — 89% identical, 2 lines differ
plugin/commands/cleanup-dev.md · 96 lines

What it actually says

Cleanup Z Specification Files

Remove auto-managed TeX tooling files from the project while preserving source specs and PDF output.

Input

Arguments: $ARGUMENTS

  • Directory path (default: docs/)

Files to Remove

TeX tooling (auto-copied by /z-spec-dev:code2model-dev):

  • fuzz.sty - LaTeX style file
  • *.mf - Metafont source files
  • *.pk - Packed font files
  • *.tfm - TeX font metrics

Build intermediates:

  • *.aux - LaTeX auxiliary
  • *.log - LaTeX log
  • *.fuzz - fuzz output
  • *.toc - Table of contents

Files to Keep

  • *.tex - Z specification source files
  • *.pdf - Compiled PDF output

Process

1. Confirm Directory

DOCS_DIR="${1:-docs}"
if [ ! -d "$DOCS_DIR" ]; then
    echo "Directory not found: $DOCS_DIR"
    exit 1
fi

2. List Files to Remove

Before removing, show what will be deleted:

echo "Files to remove from $DOCS_DIR:"
ls -la "$DOCS_DIR"/fuzz.sty "$DOCS_DIR"/*.mf "$DOCS_DIR"/*.pk "$DOCS_DIR"/*.tfm \
       "$DOCS_DIR"/*.aux "$DOCS_DIR"/*.log "$DOCS_DIR"/*.fuzz "$DOCS_DIR"/*.toc 2>/dev/null

3. Remove Files

cd "$DOCS_DIR"

# TeX tooling
rm -f fuzz.sty
rm -f *.mf *.pk *.tfm

# Build intermediates
rm -f *.aux *.log *.fuzz *.toc

4. Report Results

echo ""
echo "Cleanup complete. Remaining files:"
ls -la "$DOCS_DIR"/*.tex "$DOCS_DIR"/*.pdf 2>/dev/null || echo "No .tex or .pdf files"

Output

Report what was removed and what remains:

## Cleanup Complete

Removed from docs/:
- fuzz.sty
- 10 Metafont files (*.mf)
- 3 font files (*.pk, *.tfm)
- 4 build files (*.aux, *.log, *.fuzz, *.toc)

Preserved:
- koch_trainer.tex (source)
- koch_trainer.pdf (output)
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. 3d ago First seen · 96 lines · 7 tokens per session scan A 459b7bc49ff3

Subscribe to this mod's changes

cleanup-dev is a command published in the GitHub repository punt-labs/z-spec (5 stars, last pushed 3d ago), licensed MIT. It adds 7 tokens to every session and 590 once invoked, about $0.0000 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.