Automated summary
Drafts or updates a pull request description using a fixed skeleton (summary, test plan) plus conditional sections for wire-format diffs, architecture, CLI flow, storage layout and HA semantics.
Strengths
- Reads the git log and diff against origin/main, and finds linked issues (#N, Closes #N) in commit messages before drafting.
- Enforces a consistent skeleton including a test-plan checklist that lists the commands actually run and their results (fmt, clippy, cargo test, e2e, check-docs).
- Only adds change-shape sections (wire-format diff, mermaid sequence diagram, HA semantics) when the diff warrants them, and validates every mermaid block with make check-docs.
- Also updates an existing PR by number and points at a canonical example PR to match tone and structure.
Limitations
- Tightly coupled to one repository's conventions (Rust/cargo, the plonk CLI, FlatBuffers, PlonkStorage), so the skeleton needs adapting elsewhere.
- Assumes an origin/main remote and a local branch; it does not push code or open the PR itself.
- Heavier than necessary for a one-line fix or a purely conversational review.
Use it when a branch is finished and you need a reviewer-friendly PR body, or when refreshing the description of an existing PR.
Skip it for trivial changes or in repositories that don't follow this skeleton, where the process costs more than the change.
Security analysis
CautionThe skill uses standard development tools (git, gh) for a legitimate purpose: creating or updating pull requests. It does not include destructive commands, exfiltration, obfuscation, or disabling safety. The main concern is the use of shell and network operations, which warrant a caution rating.
- •Skill executes shell commands (git, gh, mktemp) and pushes code to a remote repository via `git push -u origin`, which is a network action.
- •Declared allowed-tools is empty, but the skill body uses bash commands; if the execution platform enforces allowed-tools, this may fail or need declaration.
Examples
/pr/pr 364Draft a pull request description for my branch: diff it against origin/main, list the tests I ran with their results, and include a wire-format before/after if the spec changed./pr — Create or Update a Pull Request
Description
Creates a PR with a structured description that lets a reader understand the change without reading the diff. Can also update an existing PR's description.
The canonical example for this project is PR #364 (PlonkStorage slice 5 — PlonkNats CRD + conditions-based reconciler/worker). When in doubt about structure, tone, or how to weave code blocks and mermaid diagrams into the body, open that PR and match it.
Instructions
When the user runs /pr or /pr <pr-number>, follow this workflow:
Phase 1: Gather context
-
Determine mode:
/prwith no number: create a new PR/pr <number>: update the description of an existing PR
-
Read the branch state:
git log --oneline origin/main..HEAD git diff --stat origin/main..HEAD -
Read the full diff to understand all changes:
git diff origin/main..HEAD -
Check for linked issues in commit messages (look for
#<number>,Part of #<number>,Closes #<number>).
Phase 2: Draft the description
The description has a fixed skeleton plus change-shape sections that you include only when the change actually has them. The skeleton always present:
Summary
2–4 sentences. State what the PR does and the headline test signal (e.g. make e2e-full → 39/39 green in 9m). Link the epic it's part of. If it lands a methodology shift (new architectural pattern, refactor target), name it here and link the doc that codifies it.
Test plan
Markdown checklist. Mark completed items with [x]. List every verification command actually run, with results:
cargo fmt --allcargo clippy --workspace --all-targets --all-features -- -D warningscargo test -p <package>with pass countmake e2e-fullwith pass count + wall-clock when relevantmake check-docswhen docs were touched- Manual verifications and the commands that produced them
Change-shape sections (include the ones that apply, in this order):
Wire-format diff
Whenever the PR changes a CRD spec/status, a FlatBuffer message, an env var contract, or any other persisted interface, show the before → after as YAML/Rust/proto snippets in a fenced code block. The reader should see the shape change without inferring it from the diff.
Architecture
Explain how the new pieces fit together. For reconciler/worker work this means: which fieldManager owns which condition, how the watch fires, what the worker's exact responsibility is. Include a mermaid sequence diagram when the flow crosses ≥3 actors (CR → reconciler → NATS → worker → apiserver → kube-controller). Validate every mermaid block with make check-docs (or mmdc) before pushing — broken diagrams render as raw text on GitHub.
When this section is non-trivial, put the full version in docs/<feature>.md and link it from the PR; the PR section is the precis.
CLI flow
If plonk install / plonk uninstall ordering changed, list the new steps with the prior order alongside (numbered list or table). Call out steps that exist purely to dodge a chicken-and-egg (e.g. bootstrapping NATS with the operator's fieldManager so the first operator reconcile is a no-op SSA).
Storage layout / mount paths
If persistent storage shape changed (new PVC, new mount path, new tier consumer), state the path convention applied (<tier-base>/<workload>/<n> for StatefulSets, <tier-base>/<workload> for Deployments) and how the ordinal subdir is realised (downward API → shell wrapper).
HA semantics
For workloads that scale: explain the replicas: 1 behaviour and the replicas: N behaviour. State the failure mode tolerated (e.g. "JetStream streams configured replicas: 3 tolerate single-node failure"). Name any production-only knobs the change unlocks.
What this slice does NOT ship
Bullet list of related work explicitly out of scope, each pointing at the issue/epic that tracks it. The point is to head off "why didn't you also fix X?" review comments by showing that X is known and queued.
Spec-change re-dispatch (reconciler PRs only)
When the reconciler decides whether to re-publish a worker task, name the helper (e.g. dispatched_for_generation) and the comparison it does (Dispatched.observedGeneration vs metadata.generation). Link the unit test that pins boundary behaviour.
Phase 3: Create or update the PR
For new PRs:
Write the body to a tempfile and use --body-file. Heredoc + inline backticks in the body breaks GitHub's markdown rendering — backticks inside heredocs get escaped or mangled. Tempfile + --body-file is the only reliable form.
BODY_FILE=$(mktemp)
cat > "$BODY_FILE" <<'EOF'
## Summary
...
EOF
git push -u origin <branch-name>
gh pr create --draft --title "<title>" --body-file "$BODY_FILE"
rm "$BODY_FILE"
PRs are always created as draft ([[feedback_draft_prs]]). The user marks ready for review; never do it automatically.
For existing PRs:
BODY_FILE=$(mktemp)
cat > "$BODY_FILE" <<'EOF'
...
EOF
gh pr edit <number> --title "<title>" --body-file "$BODY_FILE"
rm "$BODY_FILE"
Rules
- Title: Under 70 characters. Lead with a verb or the epic/slice name (
PlonkStorage slice 5: ...). No period. - Body: Use a tempfile +
--body-file, never inline heredoc with backticks. - Tone: Concrete and specific. Code blocks beat prose summaries — show the actual YAML/Rust diff instead of describing it ([[feedback_human_communication]]).
- Mermaid diagrams: Validate with
make check-docsbefore pushing. Avoid semicolons insideNote overtext — the parser breaks. - No AI references: Never mention AI tools, Claude, or add Co-Authored-By tags.
- No fabricated estimates: Don't add "rollout takes ~2h" or similar timings unless they were actually measured ([[feedback_no_fabricated_estimates]]).
- No forward-looking phrasing in inline comments the PR introduces: keep PR-anchored TODOs out of source per the CLAUDE.md comment-hygiene rules.
- Always show the user the drafted title and description before creating/updating.
- Return the PR URL when done.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/create-or-update-a-pull-request-ms1aw3cj/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/create-or-update-a-pull-request-ms1aw3cj' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-or-update-a-pull-request-ms1aw3cj/download' --output '.skill-downloads/create-or-update-a-pull-request-ms1aw3cj/SKILL.md.part' && mv '.skill-downloads/create-or-update-a-pull-request-ms1aw3cj/SKILL.md.part' '.skill-downloads/create-or-update-a-pull-request-ms1aw3cj/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.
Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/create-or-update-a-pull-request-ms1aw3cj/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.