From create-pr
Use when the user asks to "create a PR", "open a pull request", "push and create PR", "commit and PR", or wants to finalize their changes into a GitHub pull request. Handles commit, push, observability enforcement, and transcript attachment.
How this skill is triggered — by the user, by Claude, or both
Slash command
/create-pr:create-prThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Write a commit message, then create or update a GitHub PR using the `gh` CLI. Enforce observability best practices and attach session context.
Write a commit message, then create or update a GitHub PR using the gh CLI. Enforce observability best practices and attach session context.
Collect current state:
git statusgit branch --show-currentgit diff --stat HEADDetect whether we are in a git worktree by comparing:
git rev-parse --show-toplevel (current tree root)git rev-parse --git-common-dir piped to dirname (main repo root)If these differ, we are in a worktree. Note the main repo root for later use.
Check if docs/observability/ exists in the project root. If it does, skip to Step 4.
If it does NOT exist, generate it:
go.mod, package.json, requirements.txt, pom.xml, Cargo.toml, etc. — search recursively, not just root).docs/observability/<language>.md with:
service, endpoint, method, status_codegit add docs/observability/
git commit -m "docs: add observability instrumentation guide"
Analyze the impacted code for observability gaps. Read the full functions and files that are modified — not just the diff lines.
git diff --name-only HEAD.pb.go, test files, protos, constants), read the entire file or at minimum the full functions containing changes.Metrics (always needed at service boundaries):
Traces (always needed for cross-service work):
db.statement attributeLogs (ONLY at error/failure paths — do NOT add logs to every function):
.pb.go, _generated.*, etc.)Add the instrumentation, stage, and commit separately:
git add -u
git commit -m "observability: add missing metrics/logs/traces"
If no gaps, skip this step.
CRITICAL: The commit message MUST end with a ## Release Monitoring section. Never omit it. CI/CD agents parse this section to set up automated regression checks after deploy.
To populate it, inspect the full impacted code (entire functions affected by ALL commits in this PR, not just the latest diff). Find every metric, log pattern, and trace span that could change behavior as a result of this PR. Include existing signals in modified code paths, not just newly added ones.
The commit message format:
<type>: <short description>
<body explaining what and why>
## Release Monitoring
### Metrics to watch
- <metric_name> — expected behavior (e.g., "http_request_duration_seconds{endpoint="/api/relay"} — p99 should stay under 500ms")
- <metric_name> — expected behavior
### Logs to check
- <log pattern> — what to look for (e.g., "level=error msg=\"relay failed\" — should not appear more than 1/min per pod")
- <log pattern> — what to look for
### Traces
- <span_name> — expected behavior (e.g., "webhook.relay — p95 latency should stay under 200ms")
- <span_name> — expected behavior
Rules for populating:
.specstory/, .cursor/, or plan files).--force).git add -A
git reset -- .specstory/ .cursor/ '*.plan.md'
git commit -m "<commit message from Step 5>"
git push origin HEAD
Check if a PR exists:
gh pr view --json number 2>/dev/null
If no PR exists, create one. Build the PR body with the same ## Release Monitoring section from the commit message, plus a summary of changes:
gh pr create --title "<type>: <short description>" --body "<PR body>"
# or with base branch:
gh pr create --base $ARGUMENTS --title "<type>: <short description>" --body "<PR body>"
The PR body should include:
## Release Monitoring section from the commit message (metrics, logs, traces to watch). This makes it visible to reviewers and parseable by CI/CD from the PR API.If a PR already exists, update its body to include/refresh the Release Monitoring section:
gh pr edit <PR_NUMBER> --body "<updated PR body with Release Monitoring>"
Capture the PR number and URL.
If $TRANSCRIPT_PATH is set (exported by the SessionStart hook), read the transcript file and post it as a PR comment:
$TRANSCRIPT_PATH (it's JSONL — one JSON object per line).gh pr comment <PR_NUMBER> --body-file "$TRANSCRIPT_PATH"
If $TRANSCRIPT_PATH is not set or the file doesn't exist, skip this step.
open <PR_URL> # macOS
xdg-open <PR_URL> # Linux
.specstory/, .cursor/, or plan files.## Release Monitoring section is MANDATORY in both the final commit message AND the PR description. If you produce a commit without it, amend it immediately. A commit message without this section is considered broken.npx claudepluginhub oodle-ai/claude-marketplace --plugin create-prProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.