一键导入
draft-pr
Draft a concise, direct pull request with a clear Problem and Solution. Use when the user asks to create, draft, or open a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Draft a concise, direct pull request with a clear Problem and Solution. Use when the user asks to create, draft, or open a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Write an implementation plan to docs/plans/. ALWAYS use this skill — never hand-roll a plan by mimicking files in docs/. Use when the user wants to create a project/implementation plan, when a plan discussed in chat should be persisted, or says /project-plan. Guarantees a spec exists, invoking to-spec if absent. Decomposes into vertical slices with Blocked-by edges, points to the spec for acceptance criteria, and extracts ADRs via to-adr.
Parse test failure output and diagnose root causes in a read-only background subagent, then fix the failures interactively in the main thread. Use when the user shares test output or says "tests fail". Default output path is /tmp/output.
Surface systemic patterns from an investigation as codified conventions or anti-patterns.
Architect a change from idea to actionable artifacts — bootstrap project instructions, research deeply, write a spec, then an implementation plan, each delegated to its skill. Use when the user wants to research a topic, explore a repo, write a spec, create a project plan, or says /architect.
Research a topic or repository deeply and produce a reference document under `docs/research/`. Handles two modes: code research (repo by URL, `org/repo`, or bare name — e.g. "check the spotless repo", "look at github.com/fastly/spotless") and topic research (concepts, technologies, patterns). Use when the user wants to research something, explore a repo, or says /research.
Elicit the user's intent before starting work. Use when a request is vague, when kicking off a new task, when another skill hits a vague request and needs to clarify it, or when the user says "help me with this", "I need something", "let's work on...", "draft a task", or /task.
| name | draft-pr |
| description | Draft a concise, direct pull request with a clear Problem and Solution. Use when the user asks to create, draft, or open a PR. |
| allowed-tools | Bash(git diff:*), Bash(git log:*), Bash(git status:*), Bash(git branch:*), Bash(git symbolic-ref:*), Bash(git rev-parse:*), Bash(git merge-base:*), Bash(git push:*), Bash(gh pr create:*), Bash(gh pr view:*), Bash(gh repo view:*) |
Open a pull request whose description is direct and concise, structured around a clear Problem and Solution.
If the fields below show commands rather than output, run each one first.
git branch --show-current 2>/dev/null || echo "(not a git repo)"git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null || echo "(unknown — detect in step 2)"git status --short 2>/dev/nullgit log --oneline -15 2>/dev/nullgh pr view --json url,state,isDraft 2>/dev/null || echo "(none)"Check preconditions.
Determine the base branch. Use the default branch from Context. If
unknown, run git symbolic-ref --short refs/remotes/origin/HEAD, falling
back to main, then master. Confirm with the user if still ambiguous (e.g.
the branch was cut from something else).
Read the full branch diff against the base:
base=$(git merge-base HEAD origin/<base>)
git log --oneline "$base"..HEAD # commits + intent
git diff "$base"...HEAD # actual hunks
Don't rely on diffstat alone; Problem/Solution must reflect the actual hunks. Read commit messages for intent the diff doesn't reveal.
Write the description using the Template.
## Notes only for testing done, a migration step, a risk, or a
follow-up worth flagging. Omit otherwise.Derive the title from the change: imperative mood, concise, no trailing
period. Follow ~/.gitcommit conventions (type prefix/scope) if that file
exists.
Show the title and description to the user and wait for approval. Do not open the PR before then.
Push if needed, then open the PR:
git push -u origin <branch> if the branch has no upstream.gh pr create --base <base> --title <title> --body-file - piping the
approved body via heredoc. Write paragraphs as single unwrapped lines — do
not hard-wrap at 80 columns (see Style).--draft only if the user asked.Report the PR URL from gh's output.
## Problem
<What's wrong or missing, and why it matters. Reference the issue/ticket
if there is one.>
## Solution
<What the change does to fix it, verifiable against the diff. Lead with
the key change; note trade-offs.>
## Notes
<Optional: testing, migration steps, risks, follow-ups. Omit if empty.>
../shared/CONCISE-PROSE.md. No marketing tone,
no restating the diff line by line, no boilerplate checklists..github/PULL_REQUEST_TEMPLATE*),
mapping Problem/Solution onto its sections.