gastown: Command for Claude Code

.claude/commands/reaper.md

reaper is a command for Claude Code from gastownhall/gastown. It costs 23 tokens per session (902 once invoked), scanned A, original, MIT.

A command that scans Dolt databases for old temporary work items and stale issues, closes or deletes them according to age limits, and removes old closed messages. Dolt is a database system with Git-like version tracking.

In plain words
What is it for?
Use it to find stale work items across production databases, close old issues, purge older records, monitor open-item counts, or perform a dry run.
Why use it?
Temporary records and abandoned issues can accumulate and make operational databases harder to manage. The command also checks server health and can report what it would do without changing data.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is gastownhall/gastown's own configuration. It tells Claude Code how to work on gastown 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 gastown configures →

About the project

Gas Town is a workspace manager for coordinating multiple AI coding agents across projects while preserving their work state in git-backed records. Developers use it to organize agents, tasks, identities, mailboxes, and handoffs across repositories. Its catalogue add-ons support operating and coordinating Gas Town workflows.

gastownhall/gastown · 18,711 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to gastownhall/gastown. 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/gastownhall/gastown/main/.claude/commands/reaper.md
Clone the repo
git clone --depth 1 https://github.com/gastownhall/gastown

Made for: Claude Code.

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 reaper

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/gastownhall/gastown/reaper"><img src="https://agentmods.dev/badge/commands/gastownhall/gastown/reaper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 902 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.00023 $0.00902
Opus 5.5 $0.00009 $0.00361
Sonnet 5.5 $0.00005 $0.00180
Haiku 4.5 $0.00002 $0.00090

Measured 2mo ago against content hash 03582bff5c69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

reaper 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 2mo 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.

.claude/commands/reaper.md · 121 lines

How it starts

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

Wisp Reaper

Reap stale wisps and close stale issues across all production Dolt databases. Runs the same cycle as mol-dog-reaper but directly, without Dog dispatch.

Arguments: $ARGUMENTS If --dry-run is passed, report counts without making changes.

Configuration Defaults

Parameter Default Description
max_age 24h Wisps older than this are reaped (closed)
purge_age 72h Closed wisps older than this are purged (deleted)
stale_issue_age 168h Issues stale longer than this are auto-closed
mail_delete_age 72h Closed mail older than this is purged
alert_threshold 3000 Open wisp count that triggers escalation
dolt_port 3307 Dolt server port

Execution Steps

Step 1: Verify Dolt server health

gt dolt status

If the server is unhealthy or unreachable, STOP and escalate:

gt escalate "Reaper blocked: Dolt server unhealthy" -s HIGH

Step 2: Discover databases

gt reaper databases --json

This lists all production databases on the Dolt server. Expected databases: hq, beads, gastown (and any rig-specific DBs).

Step 3: Scan each database for candidates

For each database returned in Step 2:

gt reaper scan --db=<name> --port=3307 \
  --max-age=24h --purge-age=72h \
  --mail-age=72h --stale-age=168h \
  --json

Inspect the JSON output:

  • reap_candidates: wisps eligible for closing
  • purge_candidates: closed wisps eligible for deletion
  • open_wisps: total open wisp count
  • anomalies: array of detected problems

If open_wisps exceeds 3000 across all databases, note for escalation. If no candidates found across all databases, report "nothing to reap" and stop.

Step 4: Reap stale wisps

For each database with reap candidates:

gt reaper reap --db=<name> --port=3307 --max-age=24h [--dry-run] --json

IMPORTANT: Scan/reap count mismatch is NORMAL (witness closes wisps concurrently). Do NOT escalate scan > reap mismatches. Only escalate actual errors.

Read the full file on GitHub · 121 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. 2mo ago First seen · 121 lines · 23 tokens per session scan A 03582bff5c69

Subscribe to this mod's changes

reaper is a command published in the GitHub repository gastownhall/gastown (18,711 stars, last pushed 9d ago), licensed MIT. It adds 23 tokens to every session and 902 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

reaper compared with commands from other repositories

reaper next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
reapergastownhall/gastownCommand19k9d agoMITA23Claude Code
checklistgithub/spec-kitCommand148kyesterdayMITA13Claude Code
clarifygithub/spec-kitCommand148kyesterdayMITA27Claude Code
specifygithub/spec-kitCommand148kyesterdayMITA13Claude Code
convergegithub/spec-kitCommand148kyesterdayMITA35Claude Code
implementgithub/spec-kitCommand148kyesterdayMITA14Claude Code
speckit.bug.fixgithub/spec-kitCommand148kyesterdayMITA12Claude Code