skills/pr-sweep/SKILL.md
Sweep open PRs across all repos: triage, rebase stale branches, fix review comments, report what's ready for owner to merge. Use when idle loop detects open PRs, on cron schedule, or when asked to check PRs. Keywords: PR sweep, open PRs, stale PRs, review comments, rebase, triage, merge ready
npx skillsauth add avifenesh/cairn pr-sweepInstall 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.
Sweep open PRs across all repos owned by avifenesh. Triage, fix, and report.
agent-cairn. You CANNOT merge PRs — only the owner (avifenesh) can merge.gh search prs --owner avifenesh --state open --json repository,number,title,author,createdAt,isDraft --limit 50
Group by repo. Skip archived repos.
gh pr view <NUMBER> --repo <OWNER/REPO> --json state,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,headRefName,isDraft
Classify:
gh pr update-branch)For PRs authored by agent-cairn:
Rebase behind branches:
gh pr update-branch <NUMBER> --repo <OWNER/REPO>
Address review comments:
gh api repos/<OWNER/REPO>/pulls/<NUMBER>/commentsgh pr diff <NUMBER> --repo <OWNER/REPO>Do NOT fix if:
Send a compact summary. Format:
PR Sweep Report
Ready for merge (owner action needed):
avifenesh/cairn #441 — Bedrock role alternation [CI green, mergeable]
avifenesh/agnix #692 — Dep bump [CI green, mergeable]
Fixed (rebased/comments addressed):
avifenesh/cairn #422 — Mask 5xx errors [rebased, 3 comments fixed, CI running]
Needs attention:
avifenesh/cairn #368 — Rate limiting [8 comments, conflicts, needs rework]
Stale (>3 days, no activity):
avifenesh/cairn #367 — Sanitize errors [5 days, conflicts, overlaps #422]
Only send if there are actionable items. Skip if all PRs are drafts or already reported.
Use memory to avoid re-reporting the same PR state:
cairn.searchMemory("pr sweep last report")
Only notify again if state changed (new comments, CI flip, became mergeable).
data-ai
Detect agent-cairn PRs that have stalled (no activity >=90 min) and classify the failure mode to route to appropriate recovery agent.
tools
Post-install skill adaptation: read a newly installed SKILL.md, fix environment-specific references (paths, accounts, tool names), assign the skill to relevant agent types, and propose an AGENTS.md update. Triggered automatically after cairn.installSkill completes.
data-ai
Monthly self-improvement brief for Cairn. Queries error_patterns, action_exemplars, experiment_windows, and session_journal to synthesize what Cairn learned, where it failed, and 3 concrete proposals for Avi to approve. Run on the 1st of each month. Keywords: growth brief, monthly review, self-improvement, what did cairn learn, how is cairn doing, monthly report
testing
Decision support with memory-backed context. Retrieves past decisions, journal history, and relevant facts before answering questions that involve a choice or tradeoff. Keywords: should I, which is better, tradeoff, compare, decide, choose, option, alternative, pros and cons, recommend