Open a Pull Request
When to Use
Use this skill only when the user explicitly requests to open a pull request (e.g. "open a pull request", "open an pull request", "create a pull request"). Do not run git commit, push, or gh pr create for any other request.
Preconditions
- Working tree: Confirm that current changes (staged or unstaged) are what the user wants to commit. If the state is unclear or already on a feature branch with unpushed commits, ask before proceeding.
- GitHub CLI: Require
gh installed and authenticated. Run gh auth status; if not OK, instruct the user to install GitHub CLI and run gh auth login, then stop.
Workflow
1. Create a new branch
- Create a new branch from current HEAD:
git checkout -b <branch-name>.
- Branch name: Use user-provided name if given. Otherwise derive from the commit message: e.g.
feat/scope-short-desc, fix/short-desc, enhance/improve-x, ci/update-workflow, or (deps)/go-mod (slug from the first line of the conventional commit). These patterns align with .github/labeler.yml so the labeler auto-applies PR labels (feature, bug, enhancement, github-actions, dependencies). For breaking changes, include ! in the branch name to get the breaking-change label. Prefer lowercase, hyphens; avoid spaces.
2. Stage and commit
- Run
git add .
- Commit message: Use conventional style per project (e.g.
feat(scope): description, fix(scope): description). If the user provided a message, use it; otherwise generate from git status and git diff (or git diff --staged after add).
- Run
git commit -s -m "<message>" so the commit includes a Signed-off-by line (DCO). Do not add a Made-with: Cursor or similar trailer to the commit message. The repo has the DCO bot enabled; PRs must have all commits signed off.
3. Push and create PR
- Push:
git push -u origin <branch-name>
- Create PR:
gh pr create using the repository's pull request template. Populate all sections (see PR body below). The neptune label is applied automatically; do not add it manually.
4. Safety
- Do not run
git push, git commit, or gh pr create unless the user has explicitly requested to open a pull request.
- If the repo is in an unexpected state (e.g. already on a feature branch with unpushed commits, or detached HEAD), ask the user before creating a new branch or pushing.
PR body (repo template)
The repo uses .github/pull_request_template.md. When creating the PR (e.g. gh pr create --body-file - or by filling the template), populate:
- What is this feature? – Short description; correlates with issues.
- Why do we need this feature? – Problem or context (from commit/conversation).
- Who is this feature for? – Target user or use case.
- Related issues – e.g.
Fixes #123 or Relates to #456 if applicable.
- Notes for reviewers – Optional; call out design decisions or areas to focus on.
- Checklist – Mark as appropriate: breaking changes (Yes/No/N/A), docs updated, tests added/updated.
- AI Summary – For AI reviewers; fill from changed files and context:
- Scope: e.g.
lambda (config, webhooks, main), docs, AGENTS.md
- Type:
feat | fix | docs | refactor
- Key files/areas: paths from
git diff --name-only or conversation (e.g. lambda/pkg/config/config.go, docs/github-app-and-lambda.md)
Generate the body from the commit message and git diff --name-only (or equivalent) so the template sections are filled accurately.
1---2name: open-pull-request-23description: Commits current changes and opens a pull request via GitHub CLI (gh). Use only when the user explicitly says "open a pull request", "open an pull request", or "create a pull request". Do not run this workflow for other requests.4metadata:5 source: https://skillmd.com/skills/majiayu000/open-pull-request-26---78# Open a Pull Request910## When to Use1112Use this skill **only** when the user explicitly requests to open a pull request (e.g. "open a pull request", "open an pull request", "create a pull request"). Do not run git commit, push, or `gh pr create` for any other request.1314## Preconditions15161. **Working tree**: Confirm that current changes (staged or unstaged) are what the user wants to commit. If the state is unclear or already on a feature branch with unpushed commits, ask before proceeding.172. **GitHub CLI**: Require `gh` installed and authenticated. Run `gh auth status`; if not OK, instruct the user to install [GitHub CLI](https://cli.github.com/) and run `gh auth login`, then stop.1819## Workflow2021### 1. Create a new branch2223- Create a new branch from current HEAD: `git checkout -b <branch-name>`.24- **Branch name**: Use user-provided name if given. Otherwise derive from the commit message: e.g. `feat/scope-short-desc`, `fix/short-desc`, `enhance/improve-x`, `ci/update-workflow`, or `(deps)/go-mod` (slug from the first line of the conventional commit). These patterns align with [.github/labeler.yml](.github/labeler.yml) so the labeler auto-applies PR labels (feature, bug, enhancement, github-actions, dependencies). For breaking changes, include `!` in the branch name to get the `breaking-change` label. Prefer lowercase, hyphens; avoid spaces.2526### 2. Stage and commit2728- Run `git add .`29- **Commit message**: Use conventional style per project (e.g. `feat(scope): description`, `fix(scope): description`). If the user provided a message, use it; otherwise generate from `git status` and `git diff` (or `git diff --staged` after add).30- Run `git commit -s -m "<message>"` so the commit includes a Signed-off-by line (DCO). Do not add a `Made-with: Cursor` or similar trailer to the commit message. The repo has the [DCO bot](https://github.com/apps/dco) enabled; PRs must have all commits signed off.3132### 3. Push and create PR3334- Push: `git push -u origin <branch-name>`35- Create PR: `gh pr create` using the repository's [pull request template](.github/pull_request_template.md). Populate all sections (see **PR body** below). The `neptune` label is applied automatically; do not add it manually.3637### 4. Safety3839- Do not run `git push`, `git commit`, or `gh pr create` unless the user has explicitly requested to open a pull request.40- If the repo is in an unexpected state (e.g. already on a feature branch with unpushed commits, or detached HEAD), ask the user before creating a new branch or pushing.4142## PR body (repo template)4344The repo uses [.github/pull_request_template.md](.github/pull_request_template.md). When creating the PR (e.g. `gh pr create --body-file -` or by filling the template), populate:4546- **What is this feature?** – Short description; correlates with issues.47- **Why do we need this feature?** – Problem or context (from commit/conversation).48- **Who is this feature for?** – Target user or use case.49- **Related issues** – e.g. `Fixes #123` or `Relates to #456` if applicable.50- **Notes for reviewers** – Optional; call out design decisions or areas to focus on.51- **Checklist** – Mark as appropriate: breaking changes (Yes/No/N/A), docs updated, tests added/updated.52- **AI Summary** – For AI reviewers; fill from changed files and context:53 - **Scope:** e.g. `lambda (config, webhooks, main)`, `docs`, `AGENTS.md`54 - **Type:** `feat` | `fix` | `docs` | `refactor`55 - **Key files/areas:** paths from `git diff --name-only` or conversation (e.g. `lambda/pkg/config/config.go`, `docs/github-app-and-lambda.md`)5657Generate the body from the commit message and `git diff --name-only` (or equivalent) so the template sections are filled accurately.