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.07249 |
| Opus 5.5 | $0.00019 | $0.02900 |
| Sonnet 5.5 | $0.00009 | $0.01450 |
| Haiku 4.5 | $0.00005 | $0.00725 |
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 — 250 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 3.8 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 842089b362e5
- 10d ago Changed · +10 lines 7b3072fca12e
- 26d ago Changed · +2 lines scan C → A fae1bcb7b022
- 1mo ago Changed 188fa57a8eb2
- 1mo 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 yesterday), licensed MIT. It adds 47 tokens to every session and 7,249 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.
Other skills, from other repositories
release
Cut a brooks-lint release: set the version in package.json, propagate it across all four plugin manifests and every version-bearing text file (README badges, docs site metadata), write the CHANGELOG entry, validate, then commit, push, tag, and publish the GitHub release. Triggers when the maintainer asks to "release"…
gh-skill
Manage agent skills with gh skill. Use this skill to discover, preview, install, update, and publish Agent Skills so an agent can self-manage the skills available in its environment.
update-pr
Update an existing pull request with new changes. Use when the user wants to update a PR, push follow-up changes to a PR, refresh a PR description, or sync a PR with latest commits. Triggers on: update pr, update-pr, update the pr, push to pr, refresh pr, sync pr, update pull request.
new-skill
Scaffold a new brooks-lint analysis skill so it passes npm run validate and npm run evals on the first try — generates skills/{name}/SKILL.md (with the mandatory "Do NOT trigger for:" clause and a Process section citing guide step ranges) plus skills/{name}/{name}-guide.md (sequentially numbered steps), then appends…
smart-rebase
Smart partial rebase for squash-merge repositories. Auto-detect which commits to keep/drop when base branch was squash-merged into target. Use when: user says 'rebase', 'partial rebase', 'base already merged', 'smart rebase', or /smart-rebase. Not for: simple git rebase (the developer runs it — no skill executes…
architecture-refiner
Facilitate a structured conversation to define architecture principles for a repository. Supports multiple architecture styles: clean architecture (default), hexagonal / ports & adapters, modular monolith, or custom. Produces a formal architecture document that the corresponding atom will use. Use when setting up a…