mcpField
P
pr

pr

github.com/akshay-diwadkarDevelopment173 installsUpdated today
Repository

About pr

A skill for preparing and opening pull requests with descriptions grounded in the diff, authoritative requirements, and recorded verification. It requires explicit user confirmation of the exact checked text before publishing and does not merge or change branch code.

Key features

  1. 01Ground descriptions in the diff and requirements
  2. 02Record verification commands and results
  3. 03Check drafts for grounding and missing evidence
  4. 04Require confirmation before opening a PR
  5. 05Never merge or edit branch code

Use cases

  1. 01Draft a PR description from a completed change
  2. 02Check that claimed tests were actually run
  3. 03Open a PR only after reviewing its exact description

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/akshay-diwadkar/first-four-hours --skill pr

After installing, type/prin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

skill-protocol.json
agents/
openai.yaml
references/
description-guide.md
update.md
scripts/
_diagnostic_contract.py
_skill_protocol_runtime.py
check_description.py
cli.py
pr_contract.py
publish_pr.py
record_run.py

Details

From the project README

PR

Write what a reviewer needs and the diff cannot show, check it mechanically, and open the PR only after the user confirms the exact text. Never merge, approve, or edit the branch's code.

Ground

  1. Fix the base ref (for example origin/main) and read the whole git diff <base>...HEAD. If gh pr view <branch> --json state shows OPEN, read Update first.
  2. Find the authority: the linked issue (gh issue view <n>) or a sealed .first-four-hours/blueprints/*/blueprint.md. Link or quote its intent, decisions, and acceptance criteria; never re-author them as a second source of truth. With neither, say so and take intent from the user.
  3. From a clean worktree at the commit you will push, run each verification you will claim through record, one arg per argv element:
python <skill-root>/scripts/cli.py --repo-root <repo> --input runs=<runs.jsonl> \
  --input arg=<argv0> --input arg=<argv1> --format json record

Its result gives the real exit_code and the command string to cite.

Draft

Read Description guide, then write the draft outside the repository, next to <runs.jsonl>.

Check

python <skill-root>/scripts/cli.py --repo-root <repo> --input draft=<draft.md> \
  --input runs=<runs.jsonl> --input base=<base> --format json check

Repair each diagnostic in the draft, or record the missing run, and rerun until it passes. The script checks only grounding, recorded runs, and Mermaid shape, never prose quality; the content and every diagram are your judgment.

Confirm and open

Show the user the title and the complete checked draft, and ask whether to open the PR, and to push the branch first when its upstream is missing or behind. Only an explicit yes authorizes it; silence or an earlier approval does not. After a yes, push if needed, then:

python <skill-root>/scripts/cli.py --repo-root <repo> --input draft=<draft.md> \
  --input runs=<runs.jsonl> --input base=<base> --input title=<title> \
  --input confirm=<body_sha256 from check> --format json publish

confirm binds the exact text the user saw; after any edit, check, show, and ask again. Report the PR URL. End with one optional next step fitting this outcome: a fenced, self-contained prompt naming any repository, issue, PR, or artifact it needs, or say none is needed. Only a "yes" starts it, via any skill it names, but the user runs a charter, diagnose, or ticket step as its /<skill> command. Never merge the PR.

Comments

Markdown supported