From org-management
Clean up stale worktrees and help stuck PRs across an org's repos
How this skill is triggered — by the user, by Claude, or both
Slash command
/org-management:org-maintenanceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Clean up dead worktrees and unstick PRs across repos in an org.
Clean up dead worktrees and unstick PRs across repos in an org.
Run from ~/code/{org}/ or pass the org name as an argument.
Read bot_account, owner_account from the org's CLAUDE.md ## Automation config table.
A pre-built script at ~/.claude/scripts/org-maintenance.sh collects worktree and PR data in one pass.
Run it first to avoid spending tokens on individual git and gh calls.
~/.claude/scripts/org-maintenance.sh <org-name> > /tmp/org-maintenance.json
If the script is missing or not executable, flag this to the user and stop.
The script outputs a JSON object with:
worktrees: array of non-main worktrees per repo (path, branch, whether directory exists)open_prs: array of open PRs by the bot/owner accounts with CI status, review decision, merge infoFrom the script output, flag worktrees that:
exists: false)Present a summary table and prune with confirmation.
From the script output, identify PRs that are stuck:
For bot/owner PRs (full access):
For PRs on other people's repos:
If more than 3 PRs need attention, spawn a team. Each teammate handles one PR fix. The lead tracks progress and reports results.
Report:
IMPORTANT: If this command is being run as a standalone request, automatically exit after completing all phases successfully.
npx claudepluginhub seabbs/skills --plugin org-managementShows read-only local Git repo status: branches with PR (#N/- /gone) and board ticket statuses, active worktrees, and stale branch cleanup recommendations.
Manages git worktrees for isolated parallel development: creates GitHub issue-tied branches via /pds:worktree command, lists worktrees, removes directories, prunes stale refs.
Scans projects for maintenance issues starting with stale docs, picks one, fixes it in a git worktree, self-reviews with competing agents, and opens a PR. Use to tidy codebases.