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.
npx agentmods add skills/auerbachb/claude-code-config/pm-cleannpx skills add auerbachb/claude-code-config --skill pm-cleangit clone --depth 1 https://github.com/auerbachb/claude-code-configWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00103 | $0.05041 |
| Opus 5 | $0.00051 | $0.02521 |
| Sonnet 5 | $0.00021 | $0.01008 |
| Haiku 4.5 | $0.00010 | $0.00504 |
Grade A, and why
pm-clean 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 254 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/pm-clean is the repo's single janitor. It runs two independent staleness scans and presents one recommend-then-confirm report:
- Open GitHub issues — solved-by-merged-PR, inactive, superseded, potential duplicates.
- On-disk workspace — stale worktrees and stale local/remote branches, via
stale-cleanup.sh(the exact script/pm-updateStep 8 calls — one implementation, no divergence).
The two scans never gate each other: one finding nothing does not suppress the other, and the summary always reports both. Nothing is closed or deleted without explicit confirmation.
Resolve both scan engines before Step 0:
resolve_script() {
local name="$1" candidate
for candidate in \
"$HOME/.claude/skills-worktree/.claude/scripts/$name" \
"$HOME/.claude/scripts/$name" \
".claude/scripts/$name"; do
if [[ -x "$candidate" ]]; then echo "$candidate"; return 0; fi
done
return 1
}
BACKLOG_STALENESS_SH=$(resolve_script backlog-staleness.sh || true)
STALE_CLEANUP_SH=$(resolve_script stale-cleanup.sh || true)
[[ -n "$BACKLOG_STALENESS_SH" ]] || { echo "ERROR: backlog-staleness.sh not found (checked all three paths) — issue scan unavailable" >&2; exit 1; }
[[ -n "$STALE_CLEANUP_SH" ]] || { echo "ERROR: stale-cleanup.sh not found (checked all three paths) — workspace scan unavailable" >&2; exit 1; }
Invoking-repo scope (issue #687). Both scans stay in the invoking repo's lane: the issue scan (
backlog-staleness.sh) runsgh issue listcwd-repo-scoped, and the workspace sweep (stale-cleanup.sh) enumerates worktrees/branches viagit -C "$ROOT"where$ROOTis this repo's root — never another project's worktrees./pm-cleantherefore never offers to close an issue or delete a worktree/branch outside the invoking repo, whether run directly or inline from/pm.
Step 0: Parse arguments
Parse $ARGUMENTS:
[days]— the first bare (non-flag) token. If it is a positive number, use it as the issue-inactivity threshold and the default worktree/branch age. If empty, non-numeric, or non-positive (zero or negative), default to 30 days:- Warn if non-numeric: "Invalid argument '{value}', defaulting to 30 days"
- Warn if non-positive: "Threshold must be positive, defaulting to 30 days"
--worktree-days N— optional flag. If present and a positive integer, it overrides the worktree/branch age only (the issue scan still uses[days]). If present but invalid (non-numeric or non-positive), warn ("Invalid --worktree-days '{value}', reusing the [days] threshold of {DAYS}") and fall back to[days]. If the flag is absent, the worktree/branch age reuses[days].
Record two values for the rest of the run: DAYS (issue-inactivity threshold) and WORKTREE_DAYS (workspace threshold — equal to DAYS unless --worktree-days overrode it).
Threshold note. Reusing
[days]means/pm-cleandefaults the workspace age to 30 days (its issue default), whereas/pm-updateStep 8 keeps its ownSTALE_DAYS=7default. That is intentional: the two skills share the implementation (stale-cleanup.sh), not the threshold. Use--worktree-days 7for the aggressive sweep.
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.
- 2d ago First seen · 254 lines · 103 tokens per session scan A 7296bb589979
pm-clean is a skill published in the GitHub repository auerbachb/claude-code-config (5 stars, last pushed 3d ago), licensed MIT. It adds 103 tokens to every session and 5,041 once invoked, about $0.0005 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.
Other skills, from other repositories
fixer
Surgical code fixer for Bug Hunter. Implements minimal, precise fixes for verified bugs. Uses doc-lookup (Context Hub + Context7) to verify correct API usage in patches. Respects fix strategy classifications (safe-autofix vs manual-review vs larger-refactor).
referee
Final arbiter for Bug Hunter. Receives Hunter findings and Skeptic challenges, independently re-reads code, and delivers authoritative verdicts with CVSS scoring and proof-of-concept generation for security findings.
commit-security-scan
Scan code changes for security vulnerabilities using Bug Hunter-native artifacts and STRIDE context. Use whenever the user asks for PR security review, commit-diff scanning, staged-change security checks, branch-comparison security review, or pre-merge security analysis of changed code.
decompose
Decompose project or track into modules with dependency mapping. Project scope updates architecture.md and derives .ai-context.md. Track scope generates hld.md (always) and lld.md (when --lld or High-complexity module triggers it) — design-mandated artifacts that drive implement, deploy-checklist, and upload sign-off.
adr
Create and manage Architecture Decision Records. Documents significant technical decisions with context, alternatives, and consequences. Also supports evaluate (assess proposals) and design (system design) modes.
deploy-checklist
Pre-deployment verification checklist. Generates customized checklists based on tech-stack with rollback triggers. Auto-invoked by /draft:upload.