AgentSkillsCN

pr-workflow

在GitHub上创建与编辑Pull Request时,遵循安全的分支管理规范,以日语为默认语言撰写PR内容,并使用Markdown安全的PR描述。当Codex需要创建PR、更新PR正文或标题、准备PR正文模板,或验证PR中的Markdown能够正确渲染换行符,而非转义后的换行文本时使用。

SKILL.md
--- frontmatter
name: pr-workflow
description: Create and edit GitHub pull requests with safe branch hygiene, Japanese-by-default PR writing, and markdown-safe PR descriptions. Use when Codex needs to create a PR, update a PR body or title, prepare PR body templates, or verify that PR markdown renders with real line breaks instead of escaped newline text.

PR Workflow

Required Rules

  • Create a dedicated new branch for each pull request.
  • Never create a pull request from a reused branch.
  • Write pull request titles and descriptions in Japanese by default.
  • Never pass escaped newline sequences like \n as PR body content.
  • Use real line breaks via a body file, then verify rendered markdown.
  • For functional changes, confirm related docs are updated or include a clear reason in the PR body for why updates are unnecessary.

Create a Pull Request

  1. Create and switch to a new branch: git checkout -b <topic-branch>
  2. Write the PR body in a file with real line breaks, and include document impact:
    • Updated docs (for example: docs/functional-requirements.md, docs/architecture.md)
    • Or a short reason if no documentation update was needed
  3. Create the PR with gh pr create --title "<title>" --body-file <path-to-body-file>
  4. Verify rendering with gh pr view --web or gh pr view <number> --json body,url

Edit an Existing Pull Request

  1. Update the same body file or create a new file with real line breaks.
  2. Run gh pr edit <number> --title "<title>" --body-file <path-to-body-file>
  3. Verify rendered markdown again.

Template

  • Use references/pr-body-template.md as the base.
  • Keep sections that are not used as N/A instead of deleting headers.