Pull request size
Skill Amey-Thakur/AI-SKILLS/skills/git-collaboration/pull-request-size
Plug-and-play skills and prompts for every AI coding agent
npx -y skills add Amey-Thakur/AI-SKILLS --skill pull-request-sizeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 19 days oldThe repository was created 19 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 4 stars4 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.
What its author says it does
Copied from the file, not written here
Keep pull requests small through vertical slicing and stacking, because review quality and latency both collapse with size. Use when PRs are too big to review well or sit for days.
SKILL.md
3.4 KB, 767 tokens by cl100k_base, as published. Nobody here has run it
Pull request size
Small PRs are reviewed faster, more thoroughly, and merged sooner; big PRs get a rubber-stamp because nobody can hold 2000 lines in their head. The size of a PR is the single biggest lever on both review quality and cycle time, and it is almost entirely under the author's control.
Method
- Aim for a PR a reviewer can hold in one sitting. Roughly a few hundred lines of meaningful change; review quality drops sharply past that (studies and experience agree: beyond ~400 lines, defect detection craters because attention does). The number is a guide; the real test is "can one person review this well in one focused pass" (see code-review's execution-path reading).
- Slice vertically, not by layer. Ship a thin end-to-end increment (one scenario working through the whole stack: see user-story-writing's slicing), not "all the database changes" then "all the API changes": layer slices are individually un-reviewable (no observable behavior) and individually un-shippable. Vertical slices are small and complete.
- Stack dependent PRs. A large feature becomes a stack of small PRs, each building on the last, each reviewed independently (stacked-diff tooling, or manual base- branch chaining): the reviewer sees small coherent pieces instead of one wall. This is how you keep PRs small without blocking on a big feature landing all at once.
- Separate mechanical from substantive changes. A rename, a format pass, or a move (see boy-scout-rule's restraint) goes in its own PR, not mixed with logic changes where it buries the three lines that matter in three hundred that do not. "Refactor + feature" in one PR is two reviews fighting for attention; split them.
- Hide incomplete work behind flags to keep merging. Small PRs mean merging before the whole feature is user-ready; feature flags let incomplete code land dark (see feature-flags-hygiene, branch-strategy's trunk-based pairing): integrate continuously, enable when done. This is what makes small-PR discipline compatible with large features.
- Do the size math on latency. A big PR sits for days (reviewers defer the intimidating one), blocks the author, accumulates merge conflicts, and gets a shallow review anyway: worse on every axis. Small PRs get reviewed in minutes-to-hours, keep the author moving, and rarely conflict (see deployment-pipelines' flow). Author effort to split is repaid many times in cycle time.
Boundaries
- Some changes are irreducibly large (a generated-code update, a framework migration touching every file, a vendored dependency): flag these clearly, review the human-written parts closely and the mechanical parts by spot-check, and never bury real changes inside them (see code-review's large-diff honesty).
- Small PRs require good CI and test coverage to merge safely and often (see testing-strategy, deployment-pipelines); the discipline assumes the safety net that trunk-based development needs.
- Splitting has a floor: PRs so tiny they lack context (one line with no story) waste review overhead too; the target is small-and-coherent, not atomized.