shepherd-pr

Reviews pull request comments and fixes build failures autonomously on GitHub.

50.1k|3.5k|Updated May 9, 2021
One-click install
npx skills add https://github.com/tldraw/tldraw --skill shepherd-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shepherd-pr
Source: https://github.com/tldraw/tldraw/tree/main/skills/shepherd-pr
Command: npx skills add https://github.com/tldraw/tldraw --skill shepherd-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Maintaining a pull request involves repetitive triage of reviewer comments and CI failures, which consumes developer time on trivial fixes and status checks.

Core Features & Use Cases

  • Comment Triage: Classifies unresolved review threads into false positives, trivial fixes, and items needing human judgment, then replies and resolves threads via the GitHub API.
  • Build Failure Remediation: Investigates lint, type, unit test, and e2e snapshot failures, fixing mechanical issues and triggering snapshot updates with labels.
  • Use Case: After receiving reviewer feedback on a tldraw PR, run this Skill to automatically fix typos and missing null checks, resolve addressed threads, update e2e snapshots, and produce a summary of items needing human input.

Quick Start

Review the PR comments on my current branch, fix what you can, and resolve the addressed threads.

Frequently Asked Questions about shepherd-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically resolve PR review comments on GitHub?

Use the GitHub CLI to fetch unresolved review threads via the GraphQL API, triage each comment by confidence level, fix trivial issues, then reply and resolve threads with the resolveReviewThread mutation. Only resolve threads after pushing fixes and replying.

How to fix CI build failures on a pull request?

Check failure status with gh pr checks, then investigate by category: run yarn lint-current for lint errors, yarn typecheck for type errors, and yarn test run for unit tests. Fix mechanical issues and flag failures requiring design decisions.

When should e2e snapshot failures be updated versus flagged?

Update snapshots when the PR's code changes intentionally cause visual differences, such as UI or style updates, by adding the update-snapshots label. Flag the failure as an unintended regression when code changes should not affect visuals.

What types of PR comments should not be auto-resolved?

Comments raising design questions, matters of opinion, significant refactors, or ambiguous fixes should not be auto-resolved. Only act when confidence is at least 80 percent that the fix is correct and uncontroversial.

Does this workflow require a specific Node version?

Yes, the repository requires Node 24. Switch versions using nvm use 24 before running any yarn lint, typecheck, or test commands to avoid environment-related failures.