/git-workflows:pull-requestfrom git-workflows
Create GitHub pull requests using the gh CLI with conventional commit titles and structured, human-written descriptions that cover goal, rationale, and concrete code examples woven into the narrative.
Ships in git-workflows. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create pull requests that are structured enough to scan quickly but written in a natural voice. Every PR should make the goal, reasoning, and impact clear without reading like it was generated by a tool.
The PR title MUST follow the conventional commit format:
<type>(<scope>): <short summary>
Types:
| Type | When to use |
|---|---|
feat | A new capability or behavior |
fix | A bug fix |
refactor | Code change that neither fixes a bug nor adds a feature |
docs | Documentation only |
chore | Build, CI, tooling, dependencies |
test | Adding or correcting tests |
perf | Performance improvement |
style | Formatting, whitespace, naming (no logic change) |
ci | CI/CD configuration |
Scope is optional but encouraged. Use the area of the codebase affected (e.g., auth, api, billing, ui).
Summary should be lowercase, imperative mood, no period at the end.
Examples:
feat(auth): add SSO login via SAMLfix(billing): prevent double-charge on retryrefactor(api): simplify error handling middlewarechore(deps): bump openssl to patch CVE-2024-1234The description should be easy to scan and technically useful, while still reading like a real person wrote it. No corporate jargon, no LLM filler.
What to cover:
A good PR description answers these questions, roughly in this order:
These map loosely to Goal, Rationale, Changes, and Notes sections, and those headers are reasonable defaults. But they're not mandatory containers. Use your judgement. A small fix might only need a Goal paragraph and a sentence of rationale, with no headers at all. A larger change might merge rationale into the goal section because they flow naturally together, or break Changes into ### subheadings organized by logical concern. The structure should emerge from the content, not the other way around.
The only hard rule: every description should make the why clear. The diff shows what changed. The description's job is to explain the reasoning, context, and trade-offs that the diff can't convey.
Using code in descriptions:
Code snippets belong wherever they make the description clearer. Don't isolate them in a separate section. Embed them in the goal (to show what the feature looks like for users), alongside design reasoning (to illustrate a trade-off), or in the change summary (to show a key mechanism).
The code is illustrative, not comparative. Show "here's how it looks" or "here's the key mechanism," not a before-then-after exhibit. After a code block, add a brief sentence explaining its implication.
Scale depth to importance. Key mechanisms get a code snippet and explanation. Peripheral changes get a sentence. Don't try to be exhaustive.
Voice rules:
Write in a natural, direct tone. Short paragraphs, plain language. First person is fine.
Skip the obvious. Don't describe things the diff already shows clearly.
No AI patterns. Avoid words like "comprehensive", "robust", "enhance", "streamline", "leverage", "seamless", "cutting-edge". No "This PR does X" opening. No emoji headers.
Never use em-dashes. Use commas, periods, or parentheses instead.
Never use the bolded-prefix-then-explanation bullet pattern (e.g., "Thing: explanation"). This pattern is a dead giveaway of AI-generated text. If you use bullets, keep them short and uniform without bolded lead-ins.
Don't pad. If the change is small, the description should be small. A two-line goal and a sentence of rationale is perfectly fine for a small fix.
Good description:
## Goal
Allow operators to tune reconciliation intervals per-config at runtime,
without redeploying.
## Rationale
All requeue intervals (phase progression, deletion cleanup, steady-state
re-check) were hardcoded as Go constants. Changing them required a code
change and a new release. In production, different configs need different
tuning: a high-churn config benefits from faster phase polling, while a
stable one can poll less aggressively to reduce API server load.
```yaml
spec:
reconcile:
reconcileInterval: 10m
phaseRequeueInterval: 15s
The PhasedReconciler is a singleton per controller type, not per CR instance, so struct-level interval fields can't vary between instances. A callback-based resolver solves this (more on that in Changes).
New ReconcileConfig type with four optional duration fields, each with
CEL validation on the CRD and defense-in-depth clamping in Go accessor
methods.
Parent controllers read intervals from the config and propagate them to children. Child controllers resolve per-object intervals via a callback:
phased.WithRequeueResolver(func(_ context.Context, obj *v1.ServiceSLO) phased.RequeueIntervals {
rc := obj.Spec.Reconcile
return phased.RequeueIntervals{
Phase: rc.GetPhaseRequeueInterval(),
Reconcile: rc.GetReconcileInterval(),
}
})
The resolver takes precedence when set, falling back to struct-level defaults when fields are nil.
Fully backwards-compatible. All fields are optional with the same defaults as the previous hardcoded values.
**Bad description (don't do this):**
This PR enhances the rate limiting system with comprehensive plan-aware functionality.
middleware/rate_limit.go to add plan detectionconfig/limits.yaml with new tier valuesX-RateLimit-Plan header to responsesrate_limit_test.go
**Also bad (the bolded-prefix bullet pattern):**
X-RateLimit-Plan so clients can
check their tier programmatically.
## Workflow
### Step 1: Understand the Changes
Before writing anything, understand the full picture:
```bash
# See what branch we're on and its status
git status
# See all commits on this branch vs the base
git log --oneline main..HEAD # adjust base branch as needed
# See the full diff
git diff main...HEAD
Read ALL commits, not just the latest one. The PR covers the entire branch.
Determine the correct base branch:
# Check the default branch
gh repo view --json defaultBranchRef -q '.defaultBranchRef.name'
# Check if remote tracking is set up
git status -sb
# Push with upstream tracking if needed
git push -u origin HEAD
Based on the full set of changes, write a conventional commit title. Pick the type that represents the primary intent of the branch, even if there are mixed commit types.
Follow the "what to cover" guidance above. Start with the goal and reasoning since those are the most valuable parts for reviewers, then fill in what changed and any caveats. Let the content dictate the structure. Use section headers when they help scanability, skip them when the description is short enough without them. Embed code snippets wherever they make the text clearer.
If the change is small and obvious, Goal + Rationale might be all you need. Don't pad.
gh pr create --title "<title>" --body "$(cat <<'EOF'
<description>
EOF
)"
Always return the PR URL so the user can access it directly.
When a change is large enough to split into an ordered chain of smaller, reviewable layers, each depending on the one below it, use GitHub's native stacked pull request support (public preview as of July 2026) instead of managing the base branches by hand.
Install the CLI extension once:
gh extension install github/gh-stack
Typical flow:
gh stack init # start a stack rooted at the trunk branch
# commit the first layer's changes
gh stack add <branch-name> # add the next layer on top, checks it out
# commit that layer's changes
gh stack submit # push branches, open PRs, link them into a stack
Each PR in the stack targets the layer below it, so a reviewer opening any single PR sees only that layer's diff. GitHub adds a "stack map" at the top of each PR showing where it sits in the chain, so different reviewers can review different layers without blocking each other.
Merging is stack-aware: gh stack merge lands the chosen PR and everything below it in one operation. Merge just a lower layer instead, and the PRs above it stay open and rebase and retarget automatically, no manual gh pr edit --base needed.
Use gh stack sync to pull remote changes, cascade-rebase the whole chain, and push in one step, and gh stack view to see the stack's branches, PRs, and ordering.
For a simple two-PR chain ("this cleanup PR, then this feature PR on top of it"), setting the second PR's base by hand with gh pr edit --base <first-branch> is still fine. GitHub has long retargeted a PR automatically to its grandparent base once the immediate base branch's PR merges and that branch is deleted, independent of the stacking feature. Reach for gh stack once the chain grows past two or three PRs, or when the stack map matters for review.
For single-commit branches, the commit message might be enough context. Still write a proper description but keep it brief.
If the user says "draft" or "WIP", add the --draft flag. If they specify a base branch, use --base <branch>. Reviewers can be assigned with --reviewer <handle> and labels with --label <label> when requested.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub cedi/agent-plugins --plugin git-workflows4 skills in this plugin
/changelog-generatorAutomatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation./pr-reviewPost pull request review comments using the gh CLI, annotating feedback directly on the relevant files and lines in the PR diff./sre-code-reviewerCode Review (SRE Lens)Review code the way a staff site reliability engineer would: prioritizing reliability, correctness, observability, and idiomatic language use over traditional application security concerns.