Get the FREE Ultimate OpenClaw Setup Guide →

gh-pr

npx machina-cli add skill puku0x/agent-skills-test/gh-pr --openclaw
Files (1)
SKILL.md
2.4 KB

GitHub Pull Request Creation Skill

This skill guides the creation of GitHub pull requests following project-specific conventions.

When to Use

Use this skill when:

  • Ready to create a pull request for review
  • Need to push branch to remote and open PR

Instructions

Step 1: Push to remote

Push the current branch to the remote repository:

git push -u origin $(git branch --show-current)

Step 2: Create a pull request

Create a pull request using the GitHub CLI:

gh pr create --title "<PR title>" --body "<PR description>"

Format of PR title

The PR title follows this format:

<type>[optional scope]: <description>
  • <type> and [optional scope] follow the same format as commit messages
  • <description> must be written in Japanese
  • <description> must end with a noun

Format of PR description

The PR description should be written in Japanese and follow this template:

## 概要

<!-- (修正の内容など) -->

- [ ] 変更内容 1
- [ ] 変更内容 2
- [ ] 不具合修正の内容

## 備考

<!-- (関連Issueなど) -->

- #123

Example

gh pr create --title "docs(github): カスタムインストラクションの追加" --body "## 概要

GitHub Copilot 用のカスタムインストラクションを追加しました。

### 変更内容

- [x] `.github/custom-instructions.md` の追加
- [x] `.github/instructions/*.md` の追加

## 備考

- #123"

Notes

  • Important The type and scope in the PR title must be written in English while the description must be written in Japanese. (e.g., feat(frontend): 〜の追加)
  • Enclose file names with extension (i.e., *.md *.json ) in the <description> field with backticks.
    • Backticks must be escaped in the command line to avoid shell interpretation issues on GitHub Copilot.

References

Source

git clone https://github.com/puku0x/agent-skills-test/blob/main/.github/skills/gh-pr/SKILL.mdView on GitHub

Overview

gh-pr guides you to create GitHub pull requests that follow project conventions. It formats the PR title with a type and optional scope (feat, fix, docs, etc.) and generates a Japanese description template. PR creation is handled via the gh CLI, ensuring the description ends with a noun.

How This Skill Works

The skill pushes the current branch to origin, then uses gh pr create with a formatted title and a Japanese body template. The PR title follows the format <type>[optional scope]: <description>, while the body uses the Japanese template with sections 概要 and 備考. It relies on gh CLI to open the PR for review.

When to Use It

  • When you're ready to create a pull request for review
  • When you need to push the current branch to the remote and open a PR
  • When you are instructed to 'create a PR', 'open a PR', or 'submit PR'
  • When you want to ensure the PR title uses the <type>[optional scope]: <description> format
  • When you want to generate a Japanese PR description using the standard template

Quick Start

  1. Step 1: Push the current branch to the remote: git push -u origin $(git branch --show-current)
  2. Step 2: Create the PR with gh pr create --title <type>[scope]: <Japanese description> --body <PR template in Japanese>
  3. Step 3: Open the PR in the browser, request reviews, and merge after approvals

Best Practices

  • Format PR titles as English type and optional scope followed by a Japanese description
  • Ensure the Japanese description ends with a noun
  • Use gh pr create to submit PRs following the template
  • Fill the template's sections 概要 and 備考 and reference related issues like #123
  • Preview the PR to confirm compliance with project conventions before submitting

Example Use Cases

  • gh pr create --title 'docs(github): カスタムインストラクションの追加' --body '## 概要 GitHub Copilot 用のカスタムインストラクションを追加しました。 ## 備考 - #123'
  • gh pr create --title 'feat(frontend): ダッシュボード機能を追加' --body '## 概要 ダッシュボード機能を追加しました。 ## 備考 - #124'
  • gh pr create --title 'fix(api): API バグ修正' --body '## 概要 APIのバグを修正しました。 ## 備考 - #125'
  • gh pr create --title 'docs(util): ユーティリティ関数のドキュメント追加' --body '## 概要 ユーティリティ関数の説明を追加しました。 ## 備考 - #126'
  • gh pr create --title 'refactor(auth): 認証フローのリファクタ' --body '## 概要 認証フローをリファクタしました。 ## 備考 - #127'

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers