PR Author Skill
Produce a GitHub-ready Pull Request description from the standard PR context files. The pull request must be in a copy / paste block so that it can be copied easily to the PR extension.
Inputs
artifacts/pr_context.summary.txt — PR context summary (primary)
artifacts/pr_context.appendix.txt — PR context appendix (full baseline diff, commits, changed files)
- Optional user directives
Only reference files that are listed under "Additional context files" in the context bundle. Do not cite or summarize files outside that enumeration.
Output Requirements
- Output only the PR text body in GitHub-flavored Markdown.
- Use clear headings, consistent structure, and concise bullets.
- Do not invent tests or results; if not in context, state "Not verified in this PR."
- If scope is large, include a Review Guide with suggested review order.
- The output is a PR body artifact or PR-ready body text only.
PR Body Structure
Use these sections in this order:
- Suggested title — crisp, prioritizing the primary outcome
- Summary — 3–7 bullets, most important first; lead with the primary product/feature/architecture change
- Why — motivation, constraints, root cause; rely on embedded feature-doc excerpts and PR Intent fields only
- What Changed — grouped by theme (core feature, tooling/CI, tests, docs/templates)
- Architecture / How It Fits Together — short wiring description with components, entry points, control flow
- Verification — "Completed" (from context) and "Recommended" (commands to run)
- Backward Compatibility / Migration Notes — breaking changes, removals, renamed paths
- Risks and Mitigations — realistic risks with mitigations and rollback notes
- Review Guide — suggested order, noisy mechanical moves, large diffs
- Follow-ups — known TODOs, deferred cleanup, next PRs
- GitHub Auto-close —
- Closes #NNN only from verified autoclose lists; do not invent issue numbers
Output Artifact
The PR body produced by this skill is persisted as a body file plus a sibling receipt so the
PreToolUse hook can verify the body passed to gh pr create --body-file is the one this skill
produced:
Write the body text to artifacts/pr_body_<N>.md, where <N> is the target issue or PR number.
Compute the SHA-256 of the body file by running sha256sum artifacts/pr_body_<N>.md as a single command (no chaining) and take the lowercase hexadecimal digest.
Write the sibling receipt artifacts/pr_body_<N>.receipt.json with the shape:
{
"skill": "pr-author",
"pr_body_path": "artifacts/pr_body_<N>.md",
"number": <N>,
"sha256": "<lowercase-hex SHA-256 of the body bytes>",
"context_summary_path": "artifacts/pr_context.summary.txt",
"created_at": "<ISO-8601 UTC timestamp newer than pr_context.summary.txt last-write>"
}
Obtain it by running date -u +%Y-%m-%dT%H:%M:%SZ as a single command.
Pass the body to the pull request via --body-file artifacts/pr_body_<N>.md; do not use inline
--body.
The body-file and receipt write operations remain in the pr-author agent scope, which holds
Write(/artifacts/**). This skill authors the body text; the pr-author agent performs the file
writes and the gh pr create / gh pr edit --body-file handoff.
Issue/PR Reference Rules
- Only mention an issue/PR number if it appears verbatim in the provided context.
- Do not treat PR numbers as issues.
- Auto-close bullets must use exactly
- Closes #NNN format, sourced only from "Issues to autoclose" or "Author-asserted autoclose issues."
- If GitHub validation is unavailable/unverified, do not emit
Closes; use the fallback None bullet.
Required --head on gh pr create (issue #687)
Every gh pr create command this agent issues MUST carry an explicit
--head <branch> naming the branch the pull request is opened from.
This is what makes the call's target derivable. enforce-pr-author-skill.ps1 resolves the
worktree the call pertains to from the command text, and validates the orchestrator checkpoint
belonging to that worktree. Without --head, gh pr create infers its head branch from the
current checkout and the command carries no signal at all, so the gate denies with
TARGET_WORKTREE_NOT_DERIVABLE rather than validating against whichever checkpoint occupies the
session root, which in a parallel or epic topology belongs to a different item.
Pass --head even when the branch is the current one: the gate resolves it to the session root
and behaves exactly as before, and the command stays correct if it is ever replayed elsewhere.
1---2name: pr-author3description: Write a GitHub-ready pull request body from the canonical PR-context bundle with strict verification and auto-close rules.4allowed-tools:5 - Read6 - "Bash(git log *)"7metadata:8 source: https://skillmd.com/skills/drmoisan/pr-author9---1011# PR Author Skill1213Produce a GitHub-ready Pull Request description from the standard PR context files. The pull request must be in a copy / paste block so that it can be copied easily to the PR extension.1415## Inputs1617- `artifacts/pr_context.summary.txt` — PR context summary (primary)18- `artifacts/pr_context.appendix.txt` — PR context appendix (full baseline diff, commits, changed files)19- Optional user directives2021Only reference files that are listed under "Additional context files" in the context bundle. Do not cite or summarize files outside that enumeration.2223## Output Requirements24251. Output only the PR text body in GitHub-flavored Markdown.262. Use clear headings, consistent structure, and concise bullets.273. Do not invent tests or results; if not in context, state "Not verified in this PR."284. If scope is large, include a Review Guide with suggested review order.295. The output is a PR body artifact or PR-ready body text only.3031## PR Body Structure3233Use these sections in this order:34351. **Suggested title** — crisp, prioritizing the primary outcome362. **Summary** — 3–7 bullets, most important first; lead with the primary product/feature/architecture change373. **Why** — motivation, constraints, root cause; rely on embedded feature-doc excerpts and PR Intent fields only384. **What Changed** — grouped by theme (core feature, tooling/CI, tests, docs/templates)395. **Architecture / How It Fits Together** — short wiring description with components, entry points, control flow406. **Verification** — "Completed" (from context) and "Recommended" (commands to run)417. **Backward Compatibility / Migration Notes** — breaking changes, removals, renamed paths428. **Risks and Mitigations** — realistic risks with mitigations and rollback notes439. **Review Guide** — suggested order, noisy mechanical moves, large diffs4410. **Follow-ups** — known TODOs, deferred cleanup, next PRs4511. **GitHub Auto-close** — `- Closes #NNN` only from verified autoclose lists; do not invent issue numbers4647## Output Artifact4849The PR body produced by this skill is persisted as a body file plus a sibling receipt so the50PreToolUse hook can verify the body passed to `gh pr create --body-file` is the one this skill51produced:52531. Write the body text to `artifacts/pr_body_<N>.md`, where `<N>` is the target issue or PR number.542. Compute the SHA-256 of the body file by running `sha256sum artifacts/pr_body_<N>.md` as a single command (no chaining) and take the lowercase hexadecimal digest.553. Write the sibling receipt `artifacts/pr_body_<N>.receipt.json` with the shape:5657 ```json58 {59 "skill": "pr-author",60 "pr_body_path": "artifacts/pr_body_<N>.md",61 "number": <N>,62 "sha256": "<lowercase-hex SHA-256 of the body bytes>",63 "context_summary_path": "artifacts/pr_context.summary.txt",64 "created_at": "<ISO-8601 UTC timestamp newer than pr_context.summary.txt last-write>"65 }66 ```6768 Obtain it by running `date -u +%Y-%m-%dT%H:%M:%SZ` as a single command.69704. Pass the body to the pull request via `--body-file artifacts/pr_body_<N>.md`; do not use inline71 `--body`.7273The body-file and receipt write operations remain in the pr-author agent scope, which holds74`Write(/artifacts/**)`. This skill authors the body text; the pr-author agent performs the file75writes and the `gh pr create` / `gh pr edit --body-file` handoff.7677## Issue/PR Reference Rules7879- Only mention an issue/PR number if it appears verbatim in the provided context.80- Do not treat PR numbers as issues.81- Auto-close bullets must use exactly `- Closes #NNN` format, sourced only from "Issues to autoclose" or "Author-asserted autoclose issues."82- If GitHub validation is unavailable/unverified, do not emit `Closes`; use the fallback `None` bullet.8384## Required `--head` on `gh pr create` (issue #687)8586Every `gh pr create` command this agent issues MUST carry an explicit87`--head <branch>` naming the branch the pull request is opened from.8889This is what makes the call's target derivable. `enforce-pr-author-skill.ps1` resolves the90worktree the call pertains to from the command text, and validates the orchestrator checkpoint91belonging to that worktree. Without `--head`, `gh pr create` infers its head branch from the92current checkout and the command carries no signal at all, so the gate denies with93`TARGET_WORKTREE_NOT_DERIVABLE` rather than validating against whichever checkpoint occupies the94session root, which in a parallel or epic topology belongs to a different item.9596Pass `--head` even when the branch is the current one: the gate resolves it to the session root97and behaves exactly as before, and the command stays correct if it is ever replayed elsewhere.