Skill

pr_create

Create a pull request from a reviewed implementation branch. Use when the implementation and review stage is approved and you are ready to open a PR. Generates a conventional-commit title, structured body with ticket link, spec summary, test results, and review findings, then creates the PR via gh CLI.

From full-orchestration
Install
1
Run in your terminal
$
npx claudepluginhub shouenlee/ghcp-dev-plugin --plugin full-orchestration
Tool Access

This skill uses the workspace's default tool permissions.

Skill Content

PR Creation

State file: .claude/swe-state/{ticket-id}.json

Create a well-structured PR from the reviewed implementation.

Usage

/pr_create <ticket-id>

Phase 1: Validate and Gather

Read state. Confirm stages.review.approved is true (not just completed — an aborted review is completed but not approved). Extract feature_branch, target_branch. Read ticket.json for ticket URL and source system. Read impl summary and review summary. Verify feature branch exists.

Report: ticket ID, branches, ticket URL, review iteration count.


Phase 2: Generate PR Content

Title: {type}({ticket-id}): {description} — under 72 chars.

Type mapping: feature→feat, bug→fix, refactor→refactor, docs→docs, test-only→test, chore→chore.

Labels: feature→enhancement, bug→bug, refactor→refactor, docs→docs, test→test, security fix→security.

Body — assemble from pipeline artifacts:

## Summary
{2-3 sentences}
Resolves [{ticket-id}]({ticket-url})

## Spec
**Goal**: {from spec}  **Approach**: {summary}
**Key decisions**: {list}

## Changes
- `{file}` — {description}

## Test Results
{from impl summary}

## Review Summary
{iterations, findings table, resolutions}

## Checklist
- [x] Tests pass locally
- [x] Code review completed
- [x] No critical/major findings remaining
- [ ] CI pipeline (pending)

Preview gate: Show title, labels, body. User chooses: Create, Edit, or Cancel.


Phase 3: Create PR

  1. Rebase check: Fetch latest target branch and check for divergence:
    git fetch origin {target_branch}
    git merge-base --is-ancestor origin/{target_branch} HEAD
    
    If target has moved ahead, rebase: git rebase origin/{target_branch}. On conflict → present conflicting files to user and pause. Do NOT force-push or auto-resolve.
  2. Push (with user confirmation): git push -u origin {feature_branch}
  3. Check existing: gh pr list --head {feature_branch} --json number,url — offer to update if exists
  4. Create: gh pr create --title "{title}" --body "{body}" --base {target_branch}
  5. Labels: gh pr edit {number} --add-label "{labels}"

Phase 4: Update Ticket (non-fatal)

SystemAction
JiraMCP: transitionJiraIssue to "In Review" + addCommentToJiraIssue
LinearMCP: linear_update_issue to "In Review" + linear_add_comment
GitHubAuto-linked via Resolves #N; add comment with gh issue comment

Phase 5: Post-PR

Request reviewers from CODEOWNERS if available: gh pr edit {number} --add-reviewer {list}. Report CI monitoring command.


Phase 6: Update State

Set stages.pr.completed = true, populate pr_number, pr_url, title, labels, ticket_updated, reviewers_requested. Set status = "completed".

Similar Skills
cache-components

Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.

138.5k
Stats
Parent Repo Stars0
Parent Repo Forks0
Last CommitMar 9, 2026