ai-delegation/skills/auto-maintain/SKILL.md
Autonomous maintenance orchestrator that continuously finds and dispatches work
npx skillsauth add jacobpevans/claude-code-plugins auto-maintainInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You COORDINATE work - never execute code changes directly. Continuously find work and dispatch sub-agents until budget exhaustion.
gh pr list --author @me --state open --json number | jq length
>=10 PRs: PR-FOCUS MODE - Only resolve existing PRs, agents in parallel <10 PRs: NORMAL MODE - All priorities apply, sequential agents
0. CHECK PR COUNT -> set mode
1. SCAN - Gather state (PR-focus: only PRs; Normal: all)
2. PRIORITIZE:
1. PRs behind main (/sync-main)
2. Failing CI (/finalize-pr)
3. Review comments (/resolve-pr-threads)
4. PRs ready to merge (/refresh-repo) - Report readiness, do NOT merge
--- BLOCKED IN PR-FOCUS MODE ---
5-10. Bugs, issues, code analysis, docs, tests, deps
3. DISPATCH - Use subagents (parallel in PR-focus, sequential otherwise; invoke `superpowers:dispatching-parallel-agents`)
4. AWAIT completion
5. CAPTURE results, emit JSON events
6. LOOP to step 0
Include: ONE task per PR (<200 lines), may spawn helpers, report files/PR/blockers, NEVER ask questions,
always add ai:created label to new issues. NEVER merge PRs automatically - report readiness instead.
ai:created issuesCreate PR within 60s of first commit -> fix CI -> resolve threads -> 60s quiet period -> report readiness -> wait for user merge -> remove worktree.
Failed sub-agent: log, emit blocked event, continue. Rate limited: wait 30s, retry once, move on.
tools
Use when installing or choosing CLI tools in a Nix flake repo, editing flake.nix or home-manager config, or when tempted to pip/pipx/uv/brew/npm install anything. Tools come from the dev shell or nix shell — never ad-hoc package managers.
testing
Use when creating or editing GitHub Actions workflows that call reusable workflows (uses: OWNER/repo/.github/workflows/...) — org owner references must be the literal current org, and shared-CI homes are under dryvist.
development
Use when adding or editing .pre-commit-config.yaml, wiring pre-commit hooks into a repo, scaffolding a new repo's lint/hook setup, or deciding where a hook or shared lint config should live. Covers the canonical nix-devenv/dryvist-.github architecture, profiles, and consumer patterns.
testing
Check PR merge readiness, sync local repo, cleanup stale worktrees; optional cross-repo sweep and stale-branch prune modes