Agent skill

pr-babysitter

Set up automated PR monitoring. Watches GitHub repos for PRs with failing CI or unanswered review comments, fixes high-confidence issues automatically, and messages you when human input is needed. Triggers on "pr babysitter", "watch PRs", "monitor PRs", "pr monitor".

Stars 24
Forks 5

Install this agent skill to your Project

npx add-skill https://github.com/b1rdmania/ghostclaw/tree/main/.claude/skills/pr-babysitter

SKILL.md

PR Babysitter

Automated PR monitoring that only spawns an agent when there's actual work to do. Uses the scheduler's pre_check feature to run a lightweight gh CLI check first — zero API credits burned when all PRs are clean.

Setup

1. Verify GitHub CLI

bash
gh auth status

If not authenticated, run gh auth login.

2. Ask the user

Use AskUserQuestion for each:

  1. Which repos to watch? Accept either:
    • Specific repos: owner/repo1 owner/repo2
    • All repos: gh repo list --json nameWithOwner -q '.[].nameWithOwner'
  2. How often to check? Default: every 30 minutes (*/30 * * * *)
  3. What to watch for? Default: all of the below. Let user pick:
    • Failing CI checks
    • Unanswered review comments (especially from AI reviewers)
    • Stale PRs (no activity for 48h+)
  4. Auto-fix? Should the agent attempt high-confidence fixes (typos, linting, simple test fixes) or always ask first?

3. Create the scheduled task

Build a pre_check script and prompt based on user choices. Example for watching specific repos:

bash
cat > $GHOSTCLAW_IPC_DIR/tasks/pr-babysitter_$(date +%s).json << 'TASKEOF'
{
  "type": "schedule_task",
  "pre_check": "REPOS=\"owner/repo1 owner/repo2\"; for repo in $REPOS; do gh pr list --repo $repo --state open --json number,title,headRefName,statusCheckRollup,reviewDecision,updatedAt --jq '.[] | select(.statusCheckRollup == \"FAILURE\" or .reviewDecision == \"CHANGES_REQUESTED\" or (.reviewDecision == \"\" and (.statusCheckRollup == \"PENDING\" or .statusCheckRollup == \"\")))' 2>/dev/null; done",
  "prompt": "You are a PR babysitter. These PRs need attention:\n\n{{pre_check_output}}\n\nFor each PR:\n1. Check CI status: `gh pr checks <number> --repo <repo>`\n2. Read review comments: `gh api repos/<owner>/<repo>/pulls/<number>/comments`\n3. If CI fails with a clear fix (linting, type error, simple test fix):\n   - Clone the repo, checkout the branch, fix it, push\n   - Comment on the PR: \"Fixed [issue] automatically\"\n4. If review comments are from AI reviewers and the suggestion is high-confidence:\n   - Implement the change, push, reply to the comment\n5. If it needs human judgement:\n   - Message me with: repo, PR number, what's wrong, what you think the fix is\n\nBe conservative. Only auto-fix things you're confident about. When in doubt, ask.",
  "schedule_type": "cron",
  "schedule_value": "*/30 * * * *",
  "context_mode": "isolated",
  "targetJid": "TARGET_JID"
}
TASKEOF

Replace TARGET_JID with the user's chat JID (get from registered groups).

4. Confirm setup

Tell the user:

  • PR babysitter is active
  • Checking every [interval] for [repos]
  • Will auto-fix: [yes/no]
  • To pause: "pause the PR babysitter" or "stop watching PRs"
  • To check now: "check my PRs"

Pre-check script details

The pre_check runs as a bash script before spawning the agent:

  • Exit 0 + no output → nothing to do, agent not spawned (free)
  • Exit 0 + output → PRs found, output passed to agent as {{pre_check_output}}
  • Exit non-zero → something's wrong, agent spawned to investigate

The gh pr list with --jq filter only outputs PRs that actually need attention. If all PRs are green with no pending reviews, the output is empty and the agent is skipped entirely.

Customising the pre_check

For users who want to watch all their repos:

bash
"pre_check": "gh repo list --json nameWithOwner -q '.[].nameWithOwner' | while read repo; do gh pr list --repo $repo --state open --json number,title,headRefName,statusCheckRollup,reviewDecision --jq '.[] | select(.statusCheckRollup == \"FAILURE\" or .reviewDecision == \"CHANGES_REQUESTED\")' 2>/dev/null; done"

For users who only care about failing CI (not review comments):

bash
"pre_check": "gh pr list --repo owner/repo --state open --json number,title,statusCheckRollup --jq '.[] | select(.statusCheckRollup == \"FAILURE\")'"

Managing the babysitter

  • Pause: Update task status to paused via IPC or ask the agent
  • Resume: Update task status to active
  • Change repos: Cancel old task, create new one with updated pre_check
  • Run now: User can say "check my PRs now" — agent runs the same prompt manually

Expand your agent's capabilities with these related and highly-rated skills.

b1rdmania/ghostclaw

agent-browser

Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.

24 5
Explore
b1rdmania/ghostclaw

add-voice-transcription

Add voice message transcription to GhostClaw using ElevenLabs Scribe API. Automatically transcribes voice notes so the agent can read and respond to them.

24 5
Explore
b1rdmania/ghostclaw

sales-enablement

When the user wants to create sales collateral, pitch decks, one-pagers, objection handling docs, or demo scripts. Also use when the user mentions 'sales deck,' 'pitch deck,' 'one-pager,' 'leave-behind,' 'objection handling,' 'deal-specific ROI analysis,' 'demo script,' 'talk track,' 'sales playbook,' 'proposal template,' 'buyer persona card,' 'help my sales team,' 'sales materials,' or 'what should I give my sales reps.' Use this for any document or asset that helps a sales team close deals. For competitor comparison pages and battle cards, see competitor-alternatives. For marketing website copy, see copywriting. For cold outreach emails, see cold-email.

24 5
Explore
b1rdmania/ghostclaw

seo-audit

When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," or "indexing issues." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema-markup. For AI search optimization, see ai-seo.

24 5
Explore
b1rdmania/ghostclaw

churn-prevention

When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers or wants to build systems to prevent it. For post-cancel win-back email sequences, see email-sequence. For in-app upgrade paywalls, see paywall-upgrade-cro.

24 5
Explore
b1rdmania/ghostclaw

qodo-pr-resolver

Review and resolve PR issues with Qodo - get AI-powered code review issues and fix them interactively (GitHub, GitLab, Bitbucket, Azure DevOps)

24 5
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results