From cape
Create a pull request with clear description and actionable test plan. Use whenever the user wants to open a PR — explicit requests ("create a PR", "open a pull request", "let's PR this", "/cape:pr") and implicit ones ("ship it", "ready for review", "push this up"). Also use when finish-epic completes and the user wants to publish their work. Runs automatable test plan items before creating the PR. Do NOT use for reviewing someone else's PR (use cape:review) or committing (use cape:commit).
npx claudepluginhub sqve/cape --plugin capeThis skill uses the workspace's default tool permissions.
<skill_overview> Create a pull request with conventional title, structured description, and verified
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
<skill_overview> Create a pull request with conventional title, structured description, and verified
test plan. Detects repo PR templates, validates the branch, runs automatable test plan items, then
creates the PR via gh. The test plan acts as a gate — all checkboxes must pass before the PR is
created. </skill_overview>
<rigidity_level> MEDIUM FREEDOM — Follow the process exactly as written. Every step must execute in order. Gates are non-negotiable. The description format comes from the detected template or the bundled template — never invent sections. </rigidity_level>
<when_to_use>
Don't use for:
</when_to_use>
<critical_rules>
cape pr create without user confirmation — present the full description to the
user first, then use AskUserQuestion to get explicit approval. This is the most important rule.[x] before cape pr create runscape pr create — not the GitHub API directly</critical_rules>
<the_process>
cape pr template
This returns JSON with source ("repo" or "default"), content (raw template text), and sections
(heading names). If source is "repo", use that template's section structure and heading levels for
the description. If "default", use the bundled template in step 5.
cape git context
git diff <default-branch>...HEAD --stat
Use mainBranch from the context output as <default-branch> throughout.
Gate checks:
git rev-parse --abbrev-ref @{upstream} 2>/dev/nullgit push -u origin HEADgit log @{upstream}..HEAD --onelinegit pushgit log HEAD..<default-branch> --onelineAuto-detect contribution artifacts by checking for these files. Act only on what exists:
npx changeset interactivelyIf none exist, skip.
Read the full diff against the target branch:
cape git diff branch
git log <default-branch>..HEAD --oneline
Write the description following the detected template structure (step 1). If no repo template was found, use this bundled template — match the sections and heading levels exactly:
!cat "${CLAUDE_SKILL_DIR}/resources/pr-template.md"
Use the elements-of-style:writing-clearly-and-concisely skill for prose.
Title: conventional commit format — type(scope): subject
Section guidelines:
npm test,
curl localhost:3000/api) — these are the gateIf no subjective items exist, omit manual verification entirely. If no deployment steps, omit deployment notes. Check coverage: happy path, edge cases, integration points, regression risks. If gaps found, add missing test plan items.
You MUST stop here and get user approval before running tests or creating the PR.
Output the full PR:
- [ ] checkboxes verbatim, not as bullet points)End output with --- separator. After the separator, immediately use AskUserQuestion with
options:
Do not announce next steps or say "Let me..." after the separator. Present the plan, then ask. Do
not call any tools between outputting the description and calling AskUserQuestion.
On approval (Create PR or Create draft): run every test-plan checkbox in order, mark each
- [x] on pass, keep - [ ] on fail. On any failure, stop, report details, ask Fix and retry
or Cancel. After all pass, validate the rewritten description with cape pr validate --stdin
(rejects missing sections AND unchecked boxes — loop back if any - [ ] remains), then call
cape pr create with the rewritten body. Add --draft for the draft option. On creation failure
(push rejected, conflicts): auto-fix if trivial, re-attempt up to 3 times, then ask the user.
cape pr create --title "the title" --body "$(cat <<'EOF'
<rewritten-description>
EOF
)"
After successful creation:
gh pr edit <number> --add-label <label> (if project uses label conventions)PR created: <url>
<title>
Test plan: <passed>/<total> checks passed
</the_process>
Standard feature PRBranch has 3 commits adding a caching layer. No repo PR template found.
cape pr template → source: "default", sections: Motivation, Changes, Test planfeat/add-cache, all committed, pushedAskUserQuestion → user picks "Create PR"[x] npm test, [x] verify cache hit returns 200, [x] verify TTL expirycape pr validate --stdin passes → cape pr create — successcape pr template → source: "repo", sections: Summary, Testing, Screenshots.
cape pr validate --stdin before cape pr createUser says "create a PR" but git status shows modified files.
Right: "Uncommitted changes detected. Load cape:commit first." Wrong: Silently commit and
proceed.
<key_principles>
type(scope): subject matching project conventions</key_principles>