{"id":50720518,"url":"https://github.com/mstuart/pr-babysitter","last_synced_at":"2026-06-09T23:30:49.429Z","repository":{"id":352455260,"uuid":"1215213867","full_name":"mstuart/pr-babysitter","owner":"mstuart","description":"AI-powered PR babysitter — automatically fixes merge conflicts, failing CI, and unresolved review comments using Claude Code","archived":false,"fork":false,"pushed_at":"2026-05-23T00:55:15.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T02:33:23.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mstuart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-19T16:21:19.000Z","updated_at":"2026-05-23T00:55:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mstuart/pr-babysitter","commit_stats":null,"previous_names":["mstuart/pr-babysitter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mstuart/pr-babysitter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstuart%2Fpr-babysitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstuart%2Fpr-babysitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstuart%2Fpr-babysitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstuart%2Fpr-babysitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mstuart","download_url":"https://codeload.github.com/mstuart/pr-babysitter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstuart%2Fpr-babysitter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34130641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-09T23:30:47.501Z","updated_at":"2026-06-09T23:30:49.423Z","avatar_url":"https://github.com/mstuart.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pr-babysitter\n\nAI-powered PR babysitter that runs locally on your Mac. Automatically fixes merge conflicts, failing CI, and unresolved review comments using [Claude Code](https://claude.ai/code).\n\nRuns every 5 minutes via macOS launchd. No GitHub Actions minutes burned — uses your own Claude tokens.\n\n## How it works\n\n1. Scans your open PRs on GitHub\n2. For each PR with issues (merge conflicts, failing checks, unresolved reviews):\n   - Clones the repo into a temp directory\n   - Invokes Claude Code CLI to diagnose and fix the issues\n   - Runs your project's verify/test/lint commands before pushing\n   - Pushes fixes and resolves review threads\n3. Tracks attempts via GitHub labels (`babysitter-attempt-N`)\n4. Gives up after 10 attempts (`babysitter-gave-up` label)\n\n## Prerequisites\n\n- macOS (uses launchd for scheduling)\n- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) installed and authenticated\n- [GitHub CLI](https://cli.github.com/) (`gh`) installed and authenticated\n- `jq` installed (`brew install jq`)\n\n## Install\n\n```bash\ngit clone https://github.com/mstuart/pr-babysitter.git\ncd pr-babysitter\n./install.sh\n```\n\nThis copies `babysitter` and `pr-babysitter.sh` to `~/.local/bin/`.\n\n## Setup\n\n```bash\ncd /path/to/your/repo\nbabysitter init          # creates .babysitterrc\n# edit .babysitterrc with your repo and username\nbabysitter start         # starts the launchd agent\n```\n\n## Configuration\n\nPlace a `.babysitterrc` in your repo root. See [.babysitterrc.example](.babysitterrc.example) for all options.\n\nRequired settings:\n\n```bash\nBABYSITTER_REPO=\"owner/repo\"        # GitHub repo\nBABYSITTER_AUTHOR=\"your-username\"   # Only watch your PRs\n```\n\nOptional settings:\n\n```bash\nBABYSITTER_MAX_ATTEMPTS=10          # Give up after N attempts\nBABYSITTER_MODEL=sonnet             # Claude model\nBABYSITTER_INTERVAL=300             # Seconds between runs\nBABYSITTER_VERIFY_CMD=\"npm run verify\"\nBABYSITTER_TEST_CMD=\"npm test\"\nBABYSITTER_LINT_CMD=\"npm run lint:fix\"\nBABYSITTER_INSTALL_CMD=\"npm ci --prefer-offline --no-audit --no-fund\"\n```\n\n### Custom prompts\n\nFor full control over what Claude does, point to a prompt template file:\n\n```bash\nBABYSITTER_PROMPT_FILE=\".babysitter-prompt.txt\"\n```\n\nThe file supports variable substitution via `envsubst`: `$REPO`, `$NUMBER`, `$TITLE`, `$ATTEMPT`, `$MAX`, `$MERGEABLE`, `$FAILING`, `$UNRESOLVED`, `$VERIFY_CMD`, `$TEST_CMD`, `$LINT_CMD`.\n\nOr append extra rules to the default prompt:\n\n```bash\nBABYSITTER_EXTRA_RULES=\"- This is a monorepo with Turborepo\n- NEVER run 'npm run seed' (destroys all data)\"\n```\n\n### Config resolution\n\nConfig is loaded from the first match:\n\n1. `$BABYSITTER_CONFIG` env var (explicit path)\n2. `.babysitterrc` (walking up from cwd to `/`)\n3. `~/.config/pr-babysitter/config`\n\n## CLI\n\n```\nbabysitter \u003ccommand\u003e\n\nCOMMANDS\n  init         Create a .babysitterrc config in the current directory\n  start        Load and start the launchd agent\n  stop         Unload and stop the launchd agent\n  status       Show agent status and current PR overview\n  dashboard    Live-updating dashboard (refreshes every 30s)\n  run          Run one babysitter cycle immediately (foreground)\n  logs         Tail the babysitter log\n  logs clear   Clear the log file\n  reset \u003cpr\u003e   Remove all babysitter labels from a PR\n  reset-all    Remove all babysitter labels from all open PRs\n```\n\n### Dashboard\n\n```bash\nbabysitter dashboard       # refreshes every 30s\nbabysitter dashboard 10    # refreshes every 10s\n```\n\nShows: agent status, each PR's health (conflicts, failing checks, unresolved threads), attempt counts, and recent log activity.\n\n## What it fixes\n\n| Issue | How |\n|-------|-----|\n| Merge conflicts | `git merge origin/main` + AI conflict resolution |\n| TypeScript errors | Runs verify command, fixes reported errors |\n| Test failures | Runs test command, fixes failing tests |\n| Lint errors | Runs lint command with auto-fix |\n| Review comments | Reads unresolved threads, makes requested code changes, resolves threads |\n\nThe babysitter will **not**:\n- Force-push\n- Guess at answers to discussion questions in reviews\n- Push code that fails verification\n- Touch PRs by other authors\n\n## Labels\n\n| Label | Meaning |\n|-------|---------|\n| `babysitter-attempt-N` | The babysitter has made N fix attempts on this PR |\n| `babysitter-gave-up` | Exceeded max attempts — babysitter will no longer touch this PR |\n\nUse `babysitter reset \u003cpr-number\u003e` to clear labels and let it try again.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstuart%2Fpr-babysitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmstuart%2Fpr-babysitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstuart%2Fpr-babysitter/lists"}