| name | pr-prep |
| description | Prepares pull requests by running quality gates, drafting descriptions, and validating tests. Use when completing a feature and ready for review. |
| alwaysApply | false |
| category | artifact-generation |
| tags | ["git","pr","pull-request","quality-gates","testing"] |
| tools | [] |
| complexity | medium |
| model_hint | standard |
| estimated_tokens | 1000 |
| progressive_loading | true |
| modules | ["quality-gates.md","pr-template.md"] |
| dependencies | ["sanctum:git-workspace-review","imbue:proof-of-work","imbue:justify","imbue:structured-output","scribe:slop-detector","scribe:doc-generator"] |
| hooks | {"PreToolUse":[{"matcher":"Bash","command":"# Log quality gate execution\ncmd=$(jq -r '.tool_input.command // empty' 2>/dev/null || echo 'N/A')\nif echo \"$cmd\" | grep -qE \"(make|npm|cargo|pytest|ruff|eslint|clippy) (test|lint|fmt|build|check)\"; then\n echo \"[skill:pr-prep] Quality gate: $cmd at $(date)\" >> ${CLAUDE_CODE_TMPDIR:-/tmp}/skill-audit.log\nfi\n","once":false}],"PostToolUse":[{"matcher":"Write","command":"# Track PR template generation\nfile=$(jq -r '.tool_input.file_path // empty' 2>/dev/null)\nif echo \"$file\" | grep -qE \"(pr[-_]description|PR[-_]TEMPLATE|pull[-_]request)\"; then\n echo \"[skill:pr-prep] PR template written: $file at $(date)\" >> ${CLAUDE_CODE_TMPDIR:-/tmp}/skill-audit.log\nfi\n"}],"Stop":[{"command":"echo \"[skill:pr-prep] === Workflow completed at $(date) ===\" >> ${CLAUDE_CODE_TMPDIR:-/tmp}/skill-audit.log\n"}]} |
Pull Request Preparation Workflow
When NOT To Use
- Reviewing someone else's PR (use
sanctum:pr-review)
- Only the commit message is needed (use
sanctum:commit-messages)
Usage
Use this skill to stage changes and generate a PR summary. Run Skill(sanctum:git-workspace-review) first to capture the repository state and diffs.
Required Progress Tracking
Create TodoWrite items for these steps before starting:
pr-prep:workspace-reviewed
pr-prep:quality-gates
pr-prep:self-reviewed
pr-prep:changes-summarized
pr-prep:testing-documented
pr-prep:pr-drafted
pr-prep:content-verified
Mark each item as complete as the section is finished.
Step 1: Review Workspace (workspace-reviewed)
Confirm that Skill(sanctum:git-workspace-review) is complete. If changes were staged after the initial review, re-execute the skill to refresh the context.
Step 2: Run Quality Gates (quality-gates)
Execute formatting, linting, and tests using project-specific commands (e.g., make fmt, make lint, make test). Resolve all failures before proceeding. If a task cannot be executed locally, document the reason and the alternative validation performed. Language-specific commands and failure handling are detailed in modules/quality-gates.md.
Capabilities Reference Sync
If any plugin files changed (plugin.json, skills, commands,
agents, or hooks), run make docs-sync-check to verify
book/src/reference/capabilities-reference.md is current.
If it reports discrepancies, run /sync-capabilities --fix
or update the reference manually before proceeding.
Step 2.5: Self-Review Pass (self-reviewed)
Read the diff as if you are a reviewer seeing it for the
first time. This catches scope creep, stale debug code,
and unclear changes before anyone else spends time on
them.
Automated checks:
git diff --cached --name-only | xargs grep -nE \
\
2>/dev/null ||
git diff --cached | grep -c ||
git --oneline $(git merge-base HEAD origin/master)..HEAD | \
grep -iE ||