一键导入
pr-create
Push branch and create or update a GitHub PR with a structured description derived from the branch plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Push branch and create or update a GitHub PR with a structured description derived from the branch plan
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Initialize Claude Code in a repository with standard project scaffolding. Use this skill whenever the user wants to set up Claude Code in a new repo, initialize claude configuration, run /init with extras, or mentions "ray-init". This goes beyond the built-in /init by adding gitignore rules, Sideways files, and a local planning doc.
Test-Driven Development discipline for writing code. Use this skill whenever writing new features, adding behavior, refactoring with tests, fixing bugs with regression tests, or when the user mentions TDD, red-green-refactor, test-first, failing tests, or asks to write tests before implementation. Also triggers when branch plans contain FAILING test tasks or test-first instructions.
Create a plan document for the current branch, or for a specified new/existing branch. The complete template and all instructions are provided below — do not search for examples elsewhere.
Plan and track a bugfix with diagnosis-first discipline — create a BUGFIX.<branch>.md working doc, trace the reported symptom to a proven root cause, and write a failing test that reproduces the bug BEFORE fixing it. Use when the user reports a bug to fix, asks to investigate or diagnose a defect, starts a bugfix branch, or mentions "ray-bugfix-plan". The complete template and all instructions are below — do not search for examples elsewhere.
Audit skill source files for personal references, credentials, and other publication blockers before mirroring them into the ray-ai-skills public repo. Use this skill whenever the user wants to audit one or more skills, check skills before publishing/syncing, look for hardcoded paths or sensitive content in skills, or asks "audit my skills". If no specific skills are named, audit every skill that has changed since the last sync (or is new and not yet mirrored).
Update the ray-ai-skills repo from source skills under ~/.claude/skills/ — audit, then sync, then stop before commit. Also handles adding a new skill to .shared-skills, removing a skill from the mirror, or auditing without syncing. Use this skill whenever the user wants to sync skills into the repo, publish skill changes, update the skills mirror, add a skill to the shared list, remove a skill from the shared list, or says "skills-update". Accepts natural-language targets like "sync all", "update ray-tdd and ray-commit", "remove ray-foo", "audit only", etc.
| name | pr-create |
| description | Push branch and create or update a GitHub PR with a structured description derived from the branch plan |
| allowed-tools | Bash(git *), Bash(gh pr *), Bash(gh api *) |
Push the current branch and create (or update) a GitHub pull request with a structured description derived from the branch plan document.
/pr-create [<base-branch>] [--ready]
/pr-create — create a draft PR (base branch auto-detected)/pr-create develop — create a draft PR targeting develop/pr-create --ready — create a non-draft PR (for finished work)PRs are created as drafts by default — open them early after your first commit and update as you go.
-u flag)gh pr create or gh pr editIf the user provides a base branch, use it. Otherwise, auto-detect:
develop branch exists (git rev-parse --verify develop)develop exists and the current branch is not a release branch (release/*), use developmain/master and develop are reasonable targetsmain — or master if main does not existRun gh pr view --json number,title,url 2>/dev/null to check if a PR already exists for this branch.
gh pr edit in step 6gh pr create in step 6Run these in parallel:
git log <base>..HEAD --oneline to see all commits on this branchgit diff <base>...HEAD --stat to see files changedPLAN.<branch-name>.md referenced in CLAUDE.local.md)If no branch plan exists, fall back to deriving the PR description from the commits and diff alone. Use the commit messages to infer the summary, and the diff stat to understand scope.
When a branch plan exists — extract from it:
When no branch plan exists — derive from commits and diff:
Follow the pattern: <category>(<scope>): <purpose>
feat, fix, docs, chore (also style, refactor)backend, frontend, fullend, database, app, api, worker) — omit if the project has a single scopeExamples:
feat(app): add new survey chartfix(backend): make service layer generate survey correctlydocs: split workflow docs into semver and trunk-basedgit push -u origin <branch>
Creating a new PR (default is draft):
gh pr create --draft --title "..." --body "..." --base <base>
If --ready was specified:
gh pr create --title "..." --body "..." --base <base>
Updating an existing PR:
gh pr edit --title "..." --body "..."
## Summary
[1-3 sentences from the plan's Goal. What does this PR achieve? Quantify impact where possible.]
## Plan
- [x] [completed item]
- [x] [completed item]
- [ ] [remaining item]
## Changes
[Group by architectural layer/concern — see "Organizing Changes" below. Skip if the plan checklist is sufficient.]
**[Layer/concern]** — [one-line summary]:
- [specific change]
- [specific change]
### Design note
[Only if there's a non-obvious decision reviewers need. Otherwise omit this section.]
## Test plan
- [x] [category] ([count] tests)
- [x] Full suite: [count] tests, 0 failures
- [x] Manual verification: [brief description if done]
[Omit this section if no tests were added or run.]
Group changes by the project's architectural layers or concerns. The right groupings are project-specific — determine them from:
For example, a DDD project might use: Domain, Repositories, Services, Contracts, Policies, Presentation, Routes. A Rails app might use: Models, Controllers, Views, Jobs. A React app might use: Components, Hooks, State, API Client.
For full-stack projects, split changes into Backend and Frontend subsections when both are affected. Use whichever layers are relevant — skip layers with no changes.
Co-Authored-By line or reference AI in the PR title or description.main or master directly — always create the PR against the base branch.