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
- 01Ground descriptions in the diff and requirements
- 02Record verification commands and results
- 03Check drafts for grounding and missing evidence
- 04Require confirmation before opening a PR
- 05Never merge or edit branch code
Use cases
- 01Draft a PR description from a completed change
- 02Check that claimed tests were actually run
- 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 prAfter installing, type/prin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
skill-protocol.jsonagents/openai.yamlreferences/description-guide.mdupdate.mdscripts/_diagnostic_contract.py_skill_protocol_runtime.pycheck_description.pycli.pypr_contract.pypublish_pr.pyrecord_run.pyDetails
From the project READMEPR
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
- Fix the base ref (for example
origin/main) and read the wholegit diff <base>...HEAD. Ifgh pr view <branch> --json stateshowsOPEN, read Update first. - 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. - From a clean worktree at the commit you will push, run each verification you will claim through
record, oneargper 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.