session-pr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Session PR

会话PR

Create a PR from the current session's changes.
基于当前会话的变更创建PR。

Workflow

工作流程

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