dev-clean
Skill9 starsChanged 14 days agoApache-2.0View on GitHub
Reclaim Fishhawk disk space and prune local worktrees, branches, containers, caches or logs without stopping the stack.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- boman-ng/skillstheir own version, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- boman-ng/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- deploy-localSkill
- diagnose-redSkill
- frontend-checkSkill
- new-go-moduleSkill
- record-adrSkill
- spec-changeSkill
- sync-mainSkill
- teardown-localSkill
- verify-gateSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 50
run worktrees under .git/fishhawk-worktrees/run-* older than --days N (default 7), only when git status proves them clean
- Very specific: line 58
Remove only fishhawk-test-postgres, and only when no scripts/test is running: docker rm -f -v fishhawk-test-postgres.
- Very specific: line 75
If --status --stale-only printed anything, the shim is serving an old child binary.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clean up local dev litter
Everything here is list first, confirm, then remove. Show the user the candidate list and sizes before deleting anything. Never touch .env, .claude/settings.local.json, the main checkout, or a dirty worktree.
Operator-only: stop if you are a run agent
This skill stops services or deletes state, and its confirmation steps need a human. Before anything else:
top=$(git rev-parse --show-toplevel) && "$top/scripts/is-run-agent"Continue only if it prints operator and exits 0. On any other result, stop, do nothing, and report its output to the user. That includes run-agent: …, a git error (you are not in a repository checkout), and a missing script (this checkout predates the guard). The contract lives in scripts/README.md § "is-run-agent".
0. Is anything live?
pgrep -fl '[f]ishhawk-runner .*--run-id' || echo no-live-runner
pgrep -fl '[s]cripts/test' || echo no-scripts-testWith a live runner, skip run-worktree pruning and container removal. Those belong to the run.
1. Inventory (read-only)
du -sh .claude/worktrees .git/fishhawk-worktrees logs .fishhawk/cache 2>/dev/null
git worktree list | wc -l
docker ps -a --filter label=org.testcontainers=true --format '{{.Names}} {{.Status}}'
docker volume ls -q --filter dangling=true --filter label=com.docker.volume.anonymous | wc -l
bin/fishhawk-mcp-shim --status --stale-only2. Worktrees, run litter, merged branches
scripts/dev sweep --dry-run # lists candidates, removes nothing
scripts/dev sweep --yes # only after the user approves the listWhat sweep removes:
- merged-clean operator worktrees under
.claude/worktrees/(never dirty ones, never the current one) - run worktrees under
.git/fishhawk-worktrees/run-*older than--days N(default 7), only whengit statusproves them clean - keyed
/tmp/fishhawk-*sidecars
It then runs scripts/cleanup-merged (deletes local branches already merged into origin/main). Follow with git worktree prune for entries whose directories are already gone.
3. Docker litter
- Leaked testcontainers. The
org.testcontainers=truelabel is shared by every testcontainers user on this Docker daemon (other repositories, IDE test runs), not just Fishhawk.- Remove only
fishhawk-test-postgres, and only when noscripts/testis running:docker rm -f -v fishhawk-test-postgres.-vtakes only that container's anonymous volumes. - For any other labelled container, list it with its image and age, and remove it only after the user confirms that specific container.
- Remove only
- Dangling anonymous volumes.
scripts/testwarns above 100. The cleanup command isdocker volume prune -f, but it is daemon-wide: it deletes every unused anonymous volume on the machine, not just Fishhawk's. Say so explicitly and get a yes before running it. - Compose named volumes (
fishhawk_fishhawk-postgres-data,fishhawk_fishhawk-rustfs-datafrom the main checkout; compose prefixes the project name) hold the dev database and traces. Leave them alone; destroying them is theteardown-localskill's destroy-data step (make nuke), and only on explicit request.
4. Caches and logs
| Item | Command | Note |
| Go test cache | go clean -testcache | Safe; next run is slower |
| golangci-lint cache | golangci-lint cache clean | Also fixes cross-worktree cache pollution |
| Go build cache | go clean -cache | Large; next build is slow. Ask first |
logs/ | truncate or remove old *.log | Not while fishhawkd is running (it holds logs/fishhawkd.log) |
Preview worktree in .fishhawk/cache/ | scripts/dev preview-down | Removes the acceptance preview build |
5. Stale MCP shim
If --status --stale-only printed anything, the shim is serving an old child binary. Report the recorded reason (deferred_in_flight, deferred_no_initialize_recorded, …). The fix is the user reconnecting their MCP client; don't kill the shim, because the harness owns it.
6. iCloud duplicates
Conflict copies named * 2* show as untracked files or directories. List them (git status --short | grep ' 2') for the user to confirm before removing them.
Report
What was removed and how much space it freed (du before/after). Also list what was skipped and why: live run, dirty worktree, or user declined.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

