session-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSession PR
会话PR
Create a PR from the current session's changes.
基于当前会话的变更创建PR。
Workflow
工作流程
-
Runto see current changes (never use -uall flag)
git status -
Runto understand what changed
git diff -
Runto see recent commit style
git log -5 --oneline -
Create and checkout a new branch:
- If user provided $ARGUMENTS, use that as branch name
- Otherwise, generate a descriptive branch name from the changes (e.g., ,
fix-auth-bug)add-user-validation
-
Stage only the files that were modified in this session (prefer specific files over)
git add -A -
Create a commit with a clear message summarizing the session's work:
- End with:
Co-Authored-By: Claude <noreply@anthropic.com>
- End with:
-
Push the branch withflag
-u -
If the PR touches frontend code (e.g., files in, components, routes, styles), capture a screenshot of the relevant UI change and include it in the PR body using the
app/skill.github-image-upload -
Create PR using:
bash
gh pr create --title "..." --body "$(cat <<'EOF'-
运行查看当前变更(请勿使用-uall参数)
git status -
运行了解具体变更内容
git diff -
运行查看近期提交风格
git log -5 --oneline -
创建并切换到新分支:
- 若用户提供了$ARGUMENTS,则将其作为分支名称
- 否则,根据变更内容生成一个描述性的分支名称(例如:、
fix-auth-bug)add-user-validation
-
仅暂存本次会话中修改的文件(优先指定具体文件,而非使用)
git add -A -
创建提交,使用清晰的提交信息总结本次会话的工作:
- 结尾需包含:
Co-Authored-By: Claude <noreply@anthropic.com>
- 结尾需包含:
-
使用参数推送分支
-u -
若PR涉及前端代码(例如目录下的文件、组件、路由、样式文件),请捕获相关UI变更的截图,并使用
app/技能将其添加到PR正文中。github-image-upload -
使用以下命令创建PR:
bash
gh pr create --title "..." --body "$(cat <<'EOF'Summary
Summary
<bullet points of changes>
<bullet points of changes>
Test plan
Test plan
<how to verify>
<screenshot if frontend changes>
Generated with Claude Code
EOF
)"
10. Return the PR URL to the user<how to verify>
<screenshot if frontend changes>
Generated with Claude Code
EOF
)"
10. 将PR链接返回给用户