Agent skill
cleanup
Clean up the development environment: remove git worktrees, stale branches, merged remote branches (with no open PR), git stashes, stale remote-tracking refs, coverage/test artifacts, node_modules cache, and Claude temp files. Use when the repo feels cluttered or before a fresh start.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/cleanup-vero-ventures-fuzzycat
SKILL.md
Environment Cleanup
Run the cleanup script to remove stale branches, worktrees, caches, and artifacts.
Usage
Invoke from the repo root:
# Preview what will be cleaned (no deletions)
bash .claude/skills/cleanup/cleanup.sh --dry-run
# Actually clean everything
bash .claude/skills/cleanup/cleanup.sh
What it cleans
- Git worktrees under
.claude/worktrees/ - Stale local branches (anything not
main) - Remote branches with no open PR — merged or abandoned (uses
ghCLI) - Git stashes (drops all)
- Stale remote-tracking refs (
git remote prune origin) - Coverage/test artifacts (
coverage*,playwright-report,test-results) - node_modules/.cache
- Claude temp files in
/tmp
Flags
| Flag | Description |
|---|---|
--dry-run |
Preview actions without making changes |
Notes
- Always skips
mainbranch - Always skips branches with open PRs on GitHub
- Idempotent: safe to run multiple times
- Requires
ghCLI to be authenticated for remote branch cleanup
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?