一键导入
pr
Create a feature branch, commit changes, push, and open a Pull Request. The standard way to ship changes. Use after implementation is complete.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a feature branch, commit changes, push, and open a Pull Request. The standard way to ship changes. Use after implementation is complete.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Cross-project audit and sync. Backs up, bootstraps, promotes, syncs, and verifies all downstream projects.
Structured pre-planning research. Explores codebase, asks clarifying questions, and produces a brainstorm output file for /plan-feature input.
Capture knowledge from development sessions. Debug patterns, architecture decisions, framework gotchas, and integration learnings compound over time.
Load project context and show current status. Use at the start of a session or when context is needed.
Run parallel code reviews using specialized agents (security, performance, simplicity, nextjs-react). Produces a structured report.
Initialize a new project from Agent Kit boilerplate. Use when creating a new downstream project.
| name | pr |
| description | Create a feature branch, commit changes, push, and open a Pull Request. The standard way to ship changes. Use after implementation is complete. |
| disable-model-invocation | true |
| allowed-tools | Read, Write, Bash, Grep, Glob |
| argument-hint | ["branch-name or description"] |
The standard workflow for shipping changes. Creates a branch, commits, pushes, and opens a PR.
This is the ONLY way to get code into main. Direct pushes are blocked by Branch Protection.
/pr
|
v
1. Detect current branch (expect feature branch from /execute)
2. Validate (lint + type-check)
3. Analyze changes vs main
4. Push branch
5. Create PR with CI checks
6. Report PR URL
Expected state: You are on a feature branch created by /execute. Commits are already there from /commit.
CURRENT_BRANCH=$(git branch --show-current)
Decision tree:
On which branch?
├── feature/* or fix/* or refactor/* or docs/* or chore/*
│ → Already on feature branch. Continue to Step 2.
│
├── main (with unpushed commits)
│ → FALLBACK: Create branch, move commits off main.
│ → git checkout -b feature/<name>
│ → git checkout main && git reset --hard origin/main
│ → git checkout feature/<name>
│ → Warn: "Next time, use /execute to create the branch first."
│
└── main (no unpushed commits)
→ ERROR: Nothing to PR. Run /execute first.
cd frontend && pnpm run validate
If validation fails: STOP. Fix the issues first.
If pnpm run validate does not exist, run lint and type-check separately:
cd frontend && pnpm run lint && pnpm run type-check
Run quality gate checks before creating the PR:
git diff main..HEAD (all branch changes)Results are included in the PR description under a "Quality Gate Results" section:
## Quality Gate Results
- architecture-guard: PASS
- code-reviewer: PASS (2 warnings)
- error-handling-reviewer: PASS
If CRITICAL findings: STOP. Fix before creating PR.
See .claude/reference/quality-gates.md for full gate architecture.
git status
git log --oneline main..HEAD
git diff --stat main..HEAD
Understand what is being pushed. Review all commits on the branch. Never push files that:
.env, credentials).next/, node_modules/)git push -u origin "$CURRENT_BRANCH"
gh pr create \
--title "<type>(<scope>): <description>" \
--body "$(cat <<'PREOF'
## Summary
<1-3 bullet points describing the changes>
## Changes
<list of key files changed and why>
## Test Plan
- [ ] CI passes (lint + type-check + build)
- [ ] <manual verification steps if applicable>
PREOF
)"
## PR Created
**Branch:** feature/<branch-name>
**PR:** <URL from gh pr create>
**CI Status:** Running (lint + type-check + build)
### Changes
- <X files changed, Y insertions, Z deletions>
### Next Steps
- Wait for CI checks to pass
- Get review approval
- Merge -> Auto-deploy
The deploy workflow runs automatically:
You do NOT need to do anything after merge. Deployment is fully automated.
If CI fails on the PR:
# Fix the issue locally
git add <fixed files>
git commit -m "fix: resolve CI failure"
git push
The PR will automatically re-run CI checks.
# Full flow in one go (after changes are ready):
git checkout main && git pull origin main
git checkout -b feature/my-change
git add <files>
git commit -m "feat(scope): my change"
git push -u origin feature/my-change
gh pr create --title "feat(scope): my change" --body "Summary of changes"
maingit add <files> (not git add -A)main (Branch Protection will reject it)