Borrowing it
Nothing to install: this file belongs to 0xSoftBoi/suwappubot. 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/0xSoftBoi/suwappubot/main/.claude/commands/worktree-check.mdgit clone --depth 1 https://github.com/0xSoftBoi/suwappubotWrote 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/0xsoftboi/suwappubot/worktree-check)<a href="https://agentmods.dev/commands/0xsoftboi/suwappubot/worktree-check"><img src="https://agentmods.dev/badge/commands/0xsoftboi/suwappubot/worktree-check.svg" alt="Measured on agentmods" 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.00034 | $0.00496 |
| Opus 5 | $0.00017 | $0.00248 |
| Sonnet 5 | $0.00007 | $0.00099 |
| Haiku 4.5 | $0.00003 | $0.00050 |
Grade A, and why
worktree-check 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 8d 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.
What it actually says
Worktree Safety Check
Multiple Claude sessions run against this repo concurrently and share one stash stack. A past session lost agent changes to a worktree reset. Run this before any reset, checkout -f, worktree removal, or cleanup sweep.
Read-only. Never reset --hard, never git add -A, never bare git stash pop here.
Step 1 — Enumerate
git worktree list
git stash list --format='%gd %H %gs'
Step 2 — Per worktree, report what's at risk
For each path from git worktree list, run with -C <path>:
git -C <path> status --porcelain # uncommitted / untracked
git -C <path> log --oneline @{u}..HEAD # committed but UNPUSHED (ignore error if no upstream)
git -C <path> rev-parse --abbrev-ref HEAD
Step 3 — Verdict table
| worktree | branch | uncommitted | unpushed commits | upstream | risk |
|---|
Risk = HIGH if uncommitted files exist or unpushed commits exist with no upstream; LOW if clean and pushed.
Step 4 — Rescue before destroying
If any worktree is HIGH risk and the user asked for a cleanup/reset:
- Stop. Do not run the destructive command yet.
- Offer rescue: in that worktree,
HUSKY=0 git commit -am "wip: rescue <worktree>"then push to arescue/<worktree>-<branch>branch. - Only proceed after the user confirms, naming exactly which worktrees will be touched.
For stash entries: they may belong to another session. Never pop. Identify by message, git stash apply <sha>, then drop by re-finding the index by tag.
Step 5 — Output
A short table plus one line: SAFE TO PROCEED or WORK AT RISK IN: <paths>.
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.
- 8d ago First seen · 41 lines · 34 tokens per session scan A 260aa6a25fc9
worktree-check is a command published in the GitHub repository 0xSoftBoi/suwappubot (3 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 496 once invoked, about $0.0002 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-30.
Other commands, from other repositories
debug-order
Debug why a CoW Protocol order failed to match.
krait
Run a complete multi-phase security audit on the target codebase.
krait-fuzz
Run an invariant-based fuzzing campaign: Understand → Extract Invariants → Generate Foundry Tests → Run & Fix Iteratively → Report.
krait-poc
Write and run a valid Foundry proof-of-concept that proves (or disproves) a Solidity exploit by asserting the actual harm on a forked chain or against local source.
krait-init
Standalone readiness check before running /krait. Verifies tools, project shape, gitignore, MCP wiring, and /.claude install. Reports what's missing — does NOT install or modify anything.
dashboard
Open the ChainGPT marketplace dashboard (localhost web UI — Overview, Skills, Activity, Health, About).