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 skills add lugassawan/swe-workbench --skill workflow-cleanup-mergedgit clone --depth 1 https://github.com/lugassawan/swe-workbenchWrote 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/lugassawan/swe-workbench/workflow-cleanup-merged)<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/workflow-cleanup-merged"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/workflow-cleanup-merged/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/lugassawan/swe-workbench/workflow-cleanup-merged"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/workflow-cleanup-merged.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.00047 | $0.07413 |
| Opus 5.5 | $0.00019 | $0.02965 |
| Sonnet 5.5 | $0.00009 | $0.01483 |
| Haiku 4.5 | $0.00005 | $0.00741 |
Grade A, and why
workflow-cleanup-merged 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.
Workflow: Cleanup Merged Branch
Announce at start: "I'm using the workflow-cleanup-merged skill to clean up after the merged PR."
When to Invoke
- After the user has confirmed a PR is merged on GitHub.
- Invoked by
/swe-workbench:cleanup-merged(user-triggered, one-off cleanup). - Invoked by Mode C orchestration (
orchestration.md) at Step 7, after each merge round.
Never auto-trigger. Cleanup is user-initiated or orchestrator-initiated. Do not attach to a Stop hook.
What This Skill Does NOT Do
- Does not merge PRs — that is the user's action.
- Does not force-delete branches with uncommitted work — no
--force, ever. - Does not squash, rebase, or alter commit history.
- Does not bypass branch protection rules.
- Does not verify CI status — CI verification happens in Phase 3/4 before the PR is created.
Cleanup Contract
Step 1 — Resolve Target PR
- If the user passed a PR number → use it directly.
- Else → derive from current branch:
Extractgh pr view --json number,state,mergedAt,headRefName,headRepository,bodyheadRefNameas the branch name to clean up.
Step 2 — Verify Merged via gh (Sole Oracle)
gh pr view <number> --json state,mergedAt,headRefName,headRefOid,url,body
Read state == "MERGED" and mergedAt != null. Abort with a clear message if either condition fails. Capture the url-derived owner/repo (the PR record in hand) and headRefOid for Step 5 — swe-workbench-sweep-residuals "$NUMBER" --repo "$OWNER/$REPO" --head-sha "$HEAD_SHA" uses them to scope the backstop sweep by repository and to fingerprint-attribute legacy un-scoped artifacts.
Never use git branch --merged as a merge check. GitHub's default squash-merge strategy creates a new commit SHA on main; the original branch tip is not a merge ancestor of main, so git branch --merged silently lies. gh is the only oracle that does not lie.
Step 3 — Classify the Primary Lease, Free Session, Anchor cwd, Sync Local Main
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- reference/deferred-verification-followup.md 3.7 KB
- reference/leased-anchor-cleanup.md 4.0 KB
- reference/recovery-examples.md 2.6 KB
- reference/worktree-removal-strategies.md 5.6 KB
- scripts/check-rimba-hook.sh 892 B runs code
- scripts/delete-branches.sh 1.5 KB runs code
- scripts/probe-worktree.sh 893 B runs code
- scripts/resolve-rimba.sh 603 B runs code
- scripts/sync-and-verify.sh 9.9 KB runs code
- triggers.txt 317 B
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 Changed · +4 lines e7c929c9bb7e
- 1mo ago Changed 842089b362e5
- 1mo ago Changed · +10 lines 7b3072fca12e
- 2mo ago Changed · +2 lines scan C → A fae1bcb7b022
- 3mo ago Changed 188fa57a8eb2
- 3mo ago First seen · 238 lines · 47 tokens per session scan C 8abfb6774afa
workflow-cleanup-merged is a skill published in the GitHub repository lugassawan/swe-workbench (3 stars, last pushed 2d ago), licensed MIT. It adds 47 tokens to every session and 7,413 once invoked, about $0.0002 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-09-03.
workflow-cleanup-merged compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| workflow-cleanup-mergedlugassawan/swe-workbench | Skill | 3 | 2d ago | MIT | A | 47 | Claude Code |
| releasehyhmrright/brooks-lint | Skill | 1.6k | yesterday | MIT | A | 135 | Claude Code, Codex |
| pull-requestzdanovichnick/dotnet-pilot | Skill | 5 | 5d ago | MIT | A | 55 | Claude Code |
| branch-finisher10CG/Aria | Skill | 2 | 24d ago | MIT | A | 37 | Claude Code |
| branch-manager10CG/Aria | Skill | 2 | 24d ago | MIT | C | 49 | Claude Code |
| new-skillhyhmrright/brooks-lint | Skill | 1.6k | yesterday | MIT | A | 145 | Claude Code, Codex |
| architecture-refinertechygarg/lattice | Skill | 219 | today | MIT | A | 114 | Claude Code |