Janitor
Use when the user says `/janitor`, or wants to drain the open **issues and PRs** you or Dependabot created across all `~/code` repos. One idempotent pass — scan every child repo, keep only self- and Dependabot-authored items (never third-party), and for each either **merge the PR** or **implement the issue**. PRs: get them green (update-branch / rebase, conflict + lockfile resolution, flaky retry) and — for dependency bumps — read the changelog and adapt the repo to breaking changes before merging (majors get the full migration-guide upgrade), and for your own PRs fix the failing checks from the PR's stated intent and merge when green. Issues: implement the requested change in a worktree, `/ship` it (review fleet + CI) as a PR closing the issue, and merge when green + review-clean. Escalate only what it can't safely adapt or implement. A bare `/janitor` arms its own 5-minute loop (`/janitor once` for a single pass) and stops that loop itself once the backlog is drained. NOT for reviewing, implementing, or merging third-party / fork contributions.From its SKILL.md
npx -y skills add jsolly/agent-skills --skill janitorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.8 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Janitor
A background maintainer for authorized open issues and PRs across every git repo under ~/code.
One invocation is one idempotent pass: PR → make correct, green, and merge; issue → implement,
/ship, and merge when green + review-clean. GitHub labels, comments, linked PRs, and checks are
the durable state between passes. This skill is narrow standing authorization bounded by the author,
green, review-fleet, and HOLD gates.
Invocation modes
- Bare
/janitor: if already inside an active/loopiteration, run one pass and exit. Otherwise invoke theloopskill with5m /janitor; let its first iteration run the first pass and do not also run one inline. /janitor once: run one pass without arming a loop.- Drain termination: stop the loop when zero actionable authorized items remain, including when every remaining item is HELD for a human. Keep looping while any item can advance next pass.
- Schedule footer: every pass report (and the initial arming confirmation) includes last-run and
next-run times in the machine's local clock, the armed interval, and whether the loop is
unbounded-until-drain or a fixed pass count (
references/reporting-and-loop.md). - Read
references/reporting-and-loop.mdfor exact loop, launchd, drain, and reporting decisions.
Required progressive loading
- Before any mutation, read
references/invariants-and-holds.md. - For every authorized PR, read
references/pr-drain.md. - For every Dependabot PR, also read
references/dependabot-upgrades.md. - For every authorized issue, read
references/issue-triage.md. - Before concurrency decisions or ending the pass, read
references/reporting-and-loop.md. - Read
references/gotchas.mdonly when a pass hits a recurring GitHub-state, mergeability, lockfile, or lifecycle failure that the route playbook does not resolve.
Do not preload route-specific playbooks for item types the pass did not find.
One-pass orchestration
- Resolve
SELFwithgh api user --jq .login. - Scan only primary checkouts (
~/code/*/whose.gitis a directory). Resolve each canonical slug from that repo's own remote and deduplicate by slug; never construct an owner from a path. - Enumerate open PRs and issues per slug. Immediately exclude drafts and every author other than
SELFor Dependabot. Third-party and fork items are read-only. - Route PRs through
references/pr-drain.md:- Dependabot bumps also load
references/dependabot-upgrades.md; every major must be researched, adapted, validated, labeledjanitor-prepped, and only then armed or merged. - Self PRs recover intent from title, body, linked issue, and diff; fix genuine failures from that context, push only to the PR head, and merge only when required checks are green.
- Dependabot bumps also load
- Route issues through
references/issue-triage.md: check for linked/in-flight work, triage, claim withjanitor-implementing, implement in a worktree, run the repo gate, and invoke/shipwithCloses #<n>. A/shipstop is a HOLD, never a bypass invitation. - Parallelize independent deep work in separate worktrees; never overlap whole janitor passes.
- Emit the terse pass report (including the schedule footer: last/next local times, cadence, bound) and make the loop stop/continue decision. Do not babysit post-merge production deploys in this pass (fleet alerting owns those) — this is not a ban on watching PR CI; green required checks before merge still apply.
Hard stops
- Never mutate, approve, implement, close, or merge a third-party item.
- Never merge with red or pending required checks; never weaken, skip, or bypass a gate.
- Never merge or arm an unprepped Dependabot major.
- Never author issue work outside
/ship, and never merge it without clean review + green CI. - Never push to
main, force-push, use--admin/--no-verify, or edit in a primary checkout. - Never touch a draft or WIP/DO-NOT-MERGE self PR.
- When correctness needs judgment or cannot be validated, follow the universal
JANITOR HOLD:contract and disarm auto-merge. Later passes may maintain held PRs but never land them.
Reference index
references/invariants-and-holds.md— PR/issue policy envelopes, hard invariants, universal HOLD.references/pr-drain.md— discovery, classification, self PRs, merge states/mechanics, deploy stance.references/dependabot-upgrades.md— changelog review, majors, migration tools, prep persistence.references/issue-triage.md— idempotency, claim, worktree implementation,/ship, escalation.references/reporting-and-loop.md— bounding, output contract (incl. schedule footer), loop arming/termination, wiring.references/gotchas.md— recurring fleet, GitHub-state, mergeability, and lifecycle failures.
What ships with it: 6 files
41.4 KB alongside SKILL.md
references/
- dependabot-upgrades.md6.6 KB
- gotchas.md3.4 KB
- invariants-and-holds.md8.3 KB
- issue-triage.md4.8 KB
- pr-drain.md9.4 KB
- reporting-and-loop.md8.9 KB