Borrowing it
Nothing to install: this file belongs to auerbachb/claude-code-config. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/auerbachb/claude-code-config/main/.claude/skills/pm-clean/SKILL.mdgit clone --depth 1 https://github.com/auerbachb/claude-code-configWrote 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.
[](https://agentmods.dev/skills/auerbachb/claude-code-config/pm-clean)<a href="https://agentmods.dev/skills/auerbachb/claude-code-config/pm-clean"><img src="https://agentmods.dev/badge/skills/auerbachb/claude-code-config/pm-clean/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.
<a href="https://agentmods.dev/skills/auerbachb/claude-code-config/pm-clean"><img src="https://agentmods.dev/badge/skills/auerbachb/claude-code-config/pm-clean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Excessive Agency · line 3 Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00103 | $0.05544 |
| Opus 5.5 | $0.00041 | $0.02218 |
| Sonnet 5.5 | $0.00021 | $0.01109 |
| Haiku 4.5 | $0.00010 | $0.00554 |
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 1mo 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 — 256 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(this skill holds that script's only direct invocation — 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), whereasstale-cleanup.shitself defaults toSTALE_DAYS=7. That is intentional: this skill owns the threshold it passes, while the script owns the implementation. Use--worktree-days 7for the script's own aggressive default.
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.
- 1mo ago Changed · +2 lines 33790bb3a3b0
- 2mo 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 2d ago), licensed MIT. It adds 103 tokens to every session and 5,544 once invoked, about $0.0004 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-31.
Other skills, from other repositories
revert
Git-aware revert that understands Draft tracks, phases, and tasks. Safely undo work at task, phase, or track level. Use when the user asks to 'revert this track', 'undo a phase', 'revert task X', or says 'roll back the last task', 'undo this work'.
robin
Use whenever an agent creates, updates, reviews, or completes a GitHub pull request. Detect whether Robin is installed in the repository; when it is, automatically drive the PR through a bounded review, verified-fix, reply, thread-resolution, re-review, authorized-merge, and cleanup loop without requiring the user to…
jira
Unified Jira entry point. Routes to preview (default), create, or review subcommands.
standup
Generate standup summary from git history, track progress, and Jira/GitHub activity. Read-only — makes no changes to the codebase.
status
Display current progress of Draft tracks and active tasks. Shows phases, completion percentages, and blocked items.
github-brief-intake
Use when GitHub work should enter the repository work-intake route, including an Issue, Milestone, view, or cross-repository selection.