$npx -y skills add tobihagemann/turbo --skill create-prCreate a GitHub pull request with a drafted title and description. Use when the user asks to \"create a PR\", \"create a pull request\", \"open a PR\", or \"submit a PR\".
| 1 | # Create Pull Request |
| 2 | |
| 3 | Draft a concise and descriptive title and a short paragraph for a PR. Explain the purpose of the changes, the problem they solve, and the general approach taken. When the changes involve clear runtime flows or state transitions, include Mermaid diagrams. |
| 4 | |
| 5 | ## Step 1: Analyze Changes |
| 6 | |
| 7 | If git is in a feature branch, examine all commit messages and the full diff to understand the overall changes. Analyze the diff for diagram opportunities (see Diagrams section below). |
| 8 | |
| 9 | ## Step 2: Draft Title and Description |
| 10 | |
| 11 | Run `/github-voice` to load writing style rules before drafting. |
| 12 | |
| 13 | Draft a title and description, embedding any diagrams in the body. Output the drafted title and description as chat text so the user can review it. |
| 14 | |
| 15 | ## Step 3: Confirm and Create |
| 16 | |
| 17 | Use `AskUserQuestion` for confirmation only. Generate a random tag so the body file is unique across sessions: |
| 18 | |
| 19 | ```bash |
| 20 | head -c 4 /dev/urandom | xxd -p |
| 21 | ``` |
| 22 | |
| 23 | Write the drafted body to `.turbo/pr/<tag>-body.md` (using the printed tag) with the Write tool, then create the PR with `gh pr create --body-file`: |
| 24 | |
| 25 | ```bash |
| 26 | gh pr create --title "<TITLE>" --body-file .turbo/pr/<tag>-body.md |
| 27 | ``` |
| 28 | |
| 29 | Do not set `--assignee` unless the user explicitly asks to assign someone. |
| 30 | |
| 31 | ## Diagrams |
| 32 | |
| 33 | GitHub renders Mermaid natively in PR descriptions via ` ```mermaid ` code blocks. Include diagrams only when they add clarity a text description can't — skip for trivial changes or obvious flows. |
| 34 | |
| 35 | ### Sequence Diagram |
| 36 | |
| 37 | Include when the changes introduce or modify a clear runtime flow: API endpoints, event handlers, pipelines, multi-service interactions, webhook flows. |
| 38 | |
| 39 | ````markdown |
| 40 | ```mermaid |
| 41 | sequenceDiagram |
| 42 | Client->>API: POST /payments |
| 43 | API->>PaymentService: processPayment() |
| 44 | PaymentService->>StripeClient: charge() |
| 45 | StripeClient-->>PaymentService: confirmation |
| 46 | PaymentService->>DB: save() |
| 47 | ``` |
| 48 | ```` |
| 49 | |
| 50 | ### State Diagram |
| 51 | |
| 52 | Include when the changes add or modify entity states, status enums, workflow transitions, or lifecycle hooks. |
| 53 | |
| 54 | ````markdown |
| 55 | ```mermaid |
| 56 | stateDiagram-v2 |
| 57 | [*] --> Draft |
| 58 | Draft --> Pending: submit() |
| 59 | Pending --> Approved: approve() |
| 60 | Pending --> Rejected: reject() |
| 61 | Approved --> [*] |
| 62 | ``` |
| 63 | ```` |
| 64 | |
| 65 | ### Rules |
| 66 | |
| 67 | - Only include when the diagram genuinely adds clarity |
| 68 | - Keep diagrams focused — max ~10 nodes/transitions |
| 69 | - Use descriptive labels on arrows (method names, HTTP verbs) |
| 70 | - Place diagrams after the summary paragraph under a `## Flow` or `## State Machine` heading |
| 71 | - One diagram per type max — don't include both unless the PR truly has both patterns |
| 72 | |
| 73 | ## Rules |
| 74 | |
| 75 | - Don't reference `.turbo/` content (filenames, requirement IDs, shell references, headings) in the title or body. `.turbo/` is gitignored, so these references would be opaque to anyone reading without local copies. |