agentleFS
yaohuangguanyaohuangguan/agent-playbook/skills/write-pull-request/SKILL.md

write-pull-request

Skill1 starsChanged 2 days agoMITView on GitHub

Write clear commits and pull requests that a reviewer can check quickly. Use this whenever you commit, push, open or update a pull request, or draft a commit message or PR description.

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Finish verification first: Follow verify-and-report.

    line 19
  2. Distinctive:

    Follow the project's format: Run git log --oneline -20, and match it.

    line 30
  3. Distinctive:

    Branch from the current default branch: Never push directly to it unless the project does that and the user asked.

    line 36
  4. Distinctive:

    Write the PR: Use the template below. Use real numbers, and only ones you measured.

    line 39
  5. Distinctive:

    Check CI after pushing: If it fails, read the log and fix the cause.

    line 42
  6. Distinctive:

    Use this as the pull request description:

    line 73

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Write a pull request

A reviewer needs to know why the change exists, what it does and how you know it works. Writing those down well is often the difference between a quick review and a long one.

When to use

Any commit or pull request. Commit, push or open a PR only when the user asked you to, because these are visible to other people.

Steps

  1. Finish verification first. Follow verify-and-report.
  2. Check what you are committing.

    git status --short
    git diff --staged

    Stage named files. Avoid git add ., which can pick up secrets and scratch files.

  3. Follow the project's format. Run git log --oneline -20, and match it. Check for a commit convention or a PR template in the repository.
  4. Keep commits to one purpose. Explain why in the message. The diff already shows what changed.
  5. Branch from the current default branch. Never push directly to it unless the project does that and the user asked.
  6. Write the PR. Use the template below. Use real numbers, and only ones you measured. Keep it short enough to read.
  7. Check CI after pushing. If it fails, read the log and fix the cause. Do not merge unless you were asked to.

Stop and ask when

  • You were not asked to commit or push.
  • Hooks fail. Fix the cause, and do not bypass them with --no-verify.
  • You would need to force push a shared branch.

Common mistakes

Tempting moveWhy it failsDo this instead
Commit message "fix bug"Useless in historySay what broke and why
Mix a refactor with a featureHard to reviewSplit the commits
Paste the diff into the descriptionAdds nothingExplain the reason
Claim tests that you did not runA false recordList only what you ran
Hide known gapsReviewers will miss themList them

Example

fix(billing): stop double refunds on webhook retries

The provider retries webhooks after a timeout, and `applyRefund` had no duplicate
check, so a retry credited the customer again. Store the event id in the same
transaction, and skip events already seen.

Report

Use this as the pull request description:

## Why
<The problem and its evidence: numbers, logs or links.>

## Change
<What changed, by area. Mention behaviour that stays the same on purpose.>

## Validation
<Commands and results. For a bug fix, how the old code fails.>

## Not included
<Known gaps, follow-ups and anything unverified.>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.