create-pr
Creates a GitHub pull request for the current branch using the gh CLI. Use when asked to create a PR, open a pull request, submit changes for review, or push and create a PR. Defaults to draft, detects and fills repo PR templates, auto-detects the base branch, and supports 'ready for review' override. DO NOT TRIGGER for reviewing existing PRs or commenting on PRs.
- License 许可
- MIT
- 最近更新
- 2026-10-27
- Stars
- ★ 5
- Forks
- 2
01 前言 Front Matter
- name
- create-pr
- description
- Creates a GitHub pull request for the current branch using the gh CLI. Use when asked to create a PR, open a pull request, submit changes for review, or push and create a PR. Defaults to draft, detects and fills repo PR templates, auto-detects the base branch, and supports 'ready for review' override. DO NOT TRIGGER for reviewing existing PRs or commenting on PRs.
03 SKILL.md 正文
Create Pull Request
Overview
Create a pull request for the current branch. Defaults to draft so the author can review on GitHub before marking ready.
Core principle: Draft by default. The author controls when a PR is ready for review.
The Process
Step 1: Check Prerequisites
# Verify gh CLI is available and authenticated
command -v gh >/dev/null 2>&1 || echo "GitHub CLI (gh) not installed"
gh auth status 2>/dev/null || echo "Not authenticated with gh"
# Detect default branch
base=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
base=${base:-main}
git log "origin/$base..HEAD" --oneline
# Verify branch is pushed
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null
If branch is not pushed:
git push -u origin $(git branch --show-current)
Step 2: Detect PR Template
# Check common template locations
ls .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null
ls .github/PULL_REQUEST_TEMPLATE/ 2>/dev/null
ls docs/PULL_REQUEST_TEMPLATE.md 2>/dev/null
ls PULL_REQUEST_TEMPLATE.md 2>/dev/null
If template exists: read it, fill out all sections from diff and commit history.
If no template: examine recent merged PRs for conventions (gh pr list --state merged --limit 5).
Step 3: Create the PR
Default (draft):
gh pr create --draft --title "<title>" --body "<body>"
If your human partner explicitly requests "ready for review":
gh pr create --title "<title>" --body "<body>"
PR Content
- Title: Short (under 70 chars), describes the change
- Body: If using template, fill all sections. If no template:
## Summary <2-3 bullets of what changed and why> ## Test Plan - [ ] <verification steps>
Draft Override
Your human partner can request a non-draft PR by saying:
- "ready for review"
- "skip draft"
- "mark it ready"
- "not a draft"
In these cases, omit the --draft flag.
Common Mistakes
- Hardcoding
mainas the base branch — always detect the default branch dynamically; some repos usemaster,develop, or other names. - Creating the PR before pushing the branch —
gh pr createwill fail if the branch doesn't exist on the remote. - Skipping the PR template — if the repo has one, fill it out completely. Reviewers expect it.
- Writing vague titles — "Update code" or "Fix stuff" tells reviewers nothing. Describe the actual change.
- Forgetting
--draft— the default is draft for a reason. Only omit when your human partner explicitly asks.
Integration
Called by:
- finish-branch (Option 2) — after committing and pushing
- User directly by asking to create a PR (triggers via description match)
References:
- Installed
/commitcommand for staging and committing
04 同仓库更多 Skills
writing-docs
Use when creating or editing documentation of any kind, including Markdown, RST, or HTML pages, READMEs, design docs, ADRs, changelogs, docstrings, and comment blocks. Covers document purpose, headings, paragraphs, lists, procedures, notices, cross-references, code samples, placeholders, example data, and word choice for technical writing.
work
Runs the story worker loop in a story-workflow project — claim ready stories, implement each in its own worktree, close through verification gates, repeat until the goal is met or the loop stalls. Use when asked to "work the board", "complete all stories", "work on epic st-XXXX", "pick up the next story", "start a worker", or to resume or continue a story run — and when a loop re-prompt names the next story in a session that started the loop. DO NOT TRIGGER without .agents/shousper-stories/config.json (use stories:setup first), for decomposing a spec into stories (stories:plan), or to stop a run (stories:cancel).
using-stories
Compressed story-workflow rulebook, injected automatically at session start (including after compaction) in projects with .agents/shousper-stories/config.json. Use when unsure of the workflow rules mid-session, when asked "how does the story workflow work here", or for a story CLI quick reference. DO NOT TRIGGER in projects without .agents/shousper-stories/config.json, to set up the workflow (stories:setup), to file stories (stories:plan), or to run the loop (stories:work).
setup
Interactive onboarding that turns a repo into a story-workflow project — merge-mode choice, verification gates with test-runner detection, gitignore wiring, optional project-specific reviewer personas. Use when asked to "set up the story workflow", "adopt stories", "story init", "install the story board", or when stories:plan / stories:work is wanted but .agents/shousper-stories/config.json does not exist yet. DO NOT TRIGGER when .agents/shousper-stories/config.json already exists (use stories:plan to file work, stories:work to execute it), for creating individual stories, or for project scaffolding unrelated to the story workflow.
plan
Decomposes a spec or approved design into epics and stories on the story board — sized, dependency-ordered, gated, human-approved, then filed via the story CLI. Use in a project with .agents/shousper-stories/config.json when there is a design doc (often from kit:brainstorming), spec, requirements file, or feature request to break down; it replaces kit:writing-plans in the workflow chain for story-based projects. Also use for "file stories", "break this into stories", "populate the board". DO NOT TRIGGER in projects without .agents/shousper-stories/config.json (use kit:writing-plans), for executing stories (stories:work), or for filing a single discovered-work story mid-loop (plain story create).
cancel
Stops an active story loop and reports where the board stands. Use when asked to "stop the loop", "cancel the story run", "halt autonomous story work", "kill the worker loop", or when a runaway run must be shut down. DO NOT TRIGGER for closing a single story (that is story done inside stories:work), for deleting or archiving stories, or for removing the story workflow from a project.