Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add ai-sdlc-framework/ai-sdlc/plugin install ai-sdlcWrote 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/commands/ai-sdlc-framework/ai-sdlc/cleanup)<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/cleanup"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/cleanup/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/commands/ai-sdlc-framework/ai-sdlc/cleanup"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00030 | $0.01377 |
| Opus 5.5 | $0.00012 | $0.00551 |
| Sonnet 5.5 | $0.00006 | $0.00275 |
| Haiku 4.5 | $0.00003 | $0.00138 |
Grade C, and why
cleanup scanned grade C with 1 finding 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 10d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
It keeps `keep-inflight` (task inflight on the board, or a `.active-task` sentinel younger than 24 h) and `keep-open-pr`. PR state is looked up per branch. A dirty tree does not block removal; the untracked paths are log How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Companion to /ai-sdlc execute. Two modes:
Mode 1 — Sweep leftover worktrees (no arguments)
When $ARGUMENTS is empty, run the same sweep as the dispatch tick (AISDLC-1108), so the manual and the automatic path agree. A worktree is removed when its disposition is one of:
remove-merged: its PR is MERGED.remove-closed: its PR is CLOSED and not merged.remove-no-pr: the branch has no PR and the directory is older than the grace window (default 6 h).remove-stale: the PR is OPEN but the branch head has not moved for 14 days.
It keeps keep-inflight (task inflight on the board, or a .active-task sentinel younger than 24 h) and keep-open-pr. PR state is looked up per branch. A dirty tree does not block removal; the untracked paths are logged, git worktree remove --force runs with its exit code checked, and a refusal falls back to rm -rf plus git worktree prune. Branches are never deleted, locally or on origin: only the worktree directory goes, and a resume recreates it from the branch. Also remove the legacy project-level .worktrees/.active-task sentinel if present (superseded by per-worktree sentinels in AISDLC-81).
rm -f .worktrees/.active-task
if [ ! -d .worktrees ]; then
echo "No .worktrees/ directory — nothing to sweep."
exit 0
fi
# >>> plugin-root preamble
unset PLUGIN_SCRIPTS_DIR
for _c in "${CLAUDE_PLUGIN_DIR:-}" "${CLAUDE_PLUGIN_ROOT}" "$(pwd)/ai-sdlc-plugin" "$(node -e 'const f=require("fs"),p=require("path"),r=(d)=>{try{return f.realpathSync(d)}catch(e){return d}};try{const g=JSON.parse(f.readFileSync(p.join(require("os").homedir(),".claude/plugins/installed_plugins.json"))).plugins,s=[];for(const k in g)if(k.startsWith("ai-sdlc@"))s.push(...g[k]);const o=[];for(let d=process.cwd(),u;u!==d;d=p.dirname(d)){u=d;for(const e of s)if(e.scope!="user"&&e.scope!="managed"&&e.projectPath&&r(e.projectPath)==d)o.push(e)}for(const e of s)if(e.scope=="user")o.push(e);console.log(o.find((e)=>f.existsSync(e.installPath)).installPath)}catch(e){}' 2>/dev/null)"; do
[ -n "$_c" ] && [ -d "$_c" ] && PLUGIN_SCRIPTS_DIR="$_c/scripts" && break
done
[ -n "${PLUGIN_SCRIPTS_DIR:-}" ] || { echo "ERROR: plugin not found: set CLAUDE_PLUGIN_DIR or CLAUDE_PLUGIN_ROOT, or install it (see ~/.claude/plugins/installed_plugins.json)" >&2; exit 1; }
# <<< plugin-root preamble
if [ -z "${PIPELINE_CLI_BIN:-}" ]; then
if [ -f "$PLUGIN_SCRIPTS_DIR/resolve-pipeline-cli.sh" ]; then
PIPELINE_CLI_BIN=$(bash "$PLUGIN_SCRIPTS_DIR/resolve-pipeline-cli.sh") || { echo "ERROR: @ai-sdlc/pipeline-cli not found; export PIPELINE_CLI_BIN=/path/to/pipeline-cli/bin" >&2; exit 1; }
else
PIPELINE_CLI_BIN="$(pwd)/pipeline-cli/bin"
fi
fi
# Optional preview: node "$PIPELINE_CLI_BIN/cli-hierarchy.mjs" sweep-worktrees --dry-run
node "$PIPELINE_CLI_BIN/cli-hierarchy.mjs" sweep-worktrees
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.
- 10d ago Changed dc136648b8c7
- 12d ago Changed · +6 lines 25dc0ba5be69
- 26d ago Changed · -3 lines scan A → C cf933d21bc95
- 1mo ago Changed · +2 lines 2127cff3d755
- 1mo ago Changed · -10 lines 9d1ac7323bd4
- 1mo ago Changed 55dcabc323ab
- 1mo ago Changed · +11 lines 33a683d58dba
- 3mo ago First seen · 77 lines · 30 tokens per session scan A f3495c501981
cleanup is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (464 stars, last pushed yesterday), licensed Apache-2.0. It adds 30 tokens to every session and 1,377 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
cleanup compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cleanupai-sdlc-framework/ai-sdlc | Command | 464 | yesterday | Apache-2.0 | C | 30 | Claude Code |
| code-reviewGoldziher/ai-rulez | Command | 182 | 2d ago | MIT | A | 11 | Claude Code |
| repo-audittractorjuice/arc-kit | Command | 2.3k | yesterday | none | A | 29 | Claude Code |
| evidenceairblackbox/airblackbox | Command | 25 | 9d ago | Apache-2.0 | A | 14 | Claude Code |
| releaseGoldziher/ai-rulez | Command | 182 | 2d ago | MIT | A | 4 | Claude Code |
| shipGoldziher/ai-rulez | Command | 182 | 2d ago | MIT | A | 4 | Claude Code |
| convergelugassawan/swe-workbench | Command | 3 | today | MIT | A | 62 | Claude Code |