pr-preparation
Prepare clear, accurate pull request summaries after completed work. Use when Codex needs to inspect changed files or diffs and write a reviewable PR description for a feature, bug fix, refactor, docu
SKILL.mdskills/pr-preparation/SKILL.md
GitHubPR Preparation
Use this skill after completing implementation, repair, refactor, documentation, test, deployment, or cleanup work that needs a clear pull request description or handoff summary.
Core Rule
Inspect the actual changes before summarizing. A PR summary must be specific, honest, reviewable, and clear about what was changed, why, how it was tested, and what risks remain.
Workflow
- Identify the completed task:
- feature, bug fix, refactor, docs update, API behavior, frontend screen, backend endpoint, database change, auth/permission change, tests, deployment fix, CI/CD repair, cleanup, or client deliverable
- Inspect changed files or diff:
- frontend, backend, database/migrations, tests, docs, config, CI/CD, deployment, generated files, dependencies, deleted files, and renamed files
- Summarize main changes:
- focus on reviewer-relevant behavior and implementation, not vague file-update language
- Explain why the change was needed:
- business reason, user need, defect, maintainability issue, delivery requirement, security issue, or operational issue
- Describe user-facing behavior:
- affected roles, screens, flows, success states, error states, visibility, restrictions, and changed UX
- Describe technical behavior:
- API behavior, database behavior, state management, validation, authentication, authorization, cache invalidation, error handling, deployment, or CI/CD behavior
- List changed files by category:
- group large PRs by area; do not invent files or list unchanged files as changed
- Document API changes when applicable:
- method, path, auth, query params, request body, success response, error responses, and backward compatibility
- Document database or migration changes:
- tables, columns, indexes, constraints, backfill, rollback, migration safety, and whether no migration is included
- Document authentication and authorization impact:
- who can access, who cannot, backend enforcement, frontend visibility, ownership/tenant scope, and tests for restricted access
- Document validation and error handling:
- required fields, invalid input, not found, unauthorized, forbidden, conflict, server errors, frontend display, and retry behavior
- List tests and checks actually run:
- command, result, and any failures; state honestly when checks were not run
- Add manual QA steps for user-facing changes:
- role, navigation path, happy path, empty state, error state, denied access, mobile/responsive checks, and regression areas
- Add screenshot or demo placeholders for UI changes:
- only provide placeholders unless screenshots actually exist
- Identify risks and limitations:
- untested areas, migration/staging needs, mobile gaps, external service limits, performance uncertainty, legacy compatibility, or response-shape assumptions
- Separate follow-up tasks:
- future work must not be presented as completed work
- Add reviewer notes:
- specific files, flows, permissions, data integrity, API shape, migration safety, or UI states to inspect
- Add deployment notes:
- environment variables, migrations, restart/build commands, feature flags, rollback notes, or no deployment changes
- Add a PR checklist:
- match actual completed work and remaining unchecked items
- Produce a final PR description with title, summary, why, changes, behavior, technical notes, files, tests, QA, risks, follow-ups, reviewer notes, and deployment notes.
Read references/pr-description-checklist.md for section guidance, review categories, honest test reporting, and the final PR description template.
Non-Negotiable Rules
- Do not invent changed files.
- Do not claim tests or checks were run if they were not run.
- Do not hide known risks, missing coverage, or pending remote verification.
- Do not mix future follow-up tasks with completed work.
- Do not write vague summaries such as "updated files" or "fixed stuff".
- Do not omit security, permission, ownership, or tenant notes for protected features.
- Do not omit migration notes when schema or data shape changed.
- Do not omit deployment notes when environment, build, CI/CD, release, or runtime behavior is affected.
- Do not include secrets, credentials, private tokens, or sensitive environment values.
- Keep the PR description specific, accurate, and useful to reviewers.
Output Contract
When using this skill, provide:
- Suggested PR title.
- PR description with summary and why.
- Changes made.
- User-facing behavior.
- Technical notes.
- API, database/migration, auth/permission, validation/error, and deployment notes as applicable.
- Files changed by category.
- Tests/checks run with actual results.
- Manual QA checklist and screenshot/demo placeholders when relevant.
- Risks and limitations.
- Follow-up tasks.
- Reviewer notes.