hos-gh-pull-request

Write and open GitHub pull requests with structured Why, How, and Note sections using gh CLI.

32|Updated Aug 29, 2026
One-click install
npx skills add https://github.com/openreachtech/hora-skills-ort-support --skill hos-gh-pull-request-openreachtech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hos-gh-pull-request
Source: https://github.com/openreachtech/hora-skills-ort-support/tree/main/kit/skills/hos-gh-pull-request
Command: npx skills add https://github.com/openreachtech/hora-skills-ort-support --skill hos-gh-pull-request-openreachtech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing pull request titles and bodies that communicate the approach behind a change—rather than restating the diff—is hard to do consistently, and opening PRs with the correct base branch, draft status, and linked issue requires careful use of the GitHub CLI. ## Core Features & Use Cases - Structured PR body: Generates a body with # Why (a single * Close #<issue> link), # How (the approach taken), and an optional # Note for caveats, with rules for when H2 subheadings are warranted. - Convention-driven titles: Titles open with the linked issue's type emoji and name the work at one altitude, never listing parts or repeating the branch name. - Safe gh CLI workflow: Reads open issues to match the one being closed, always opens PRs as drafts with --assignee @me, resolves the correct base branch by walking trunk markers, and hands over text alone when gh is unavailable. - Use Case: After finishing work on a feature branch, ask the agent to write and open the pull request; it identifies the linked issue, drafts the title and body for your review, then runs gh pr create --draft only after you approve. ## Quick Start Write a pull request for the current branch and open it as a draft against the correct trunk using gh.

Frequently Asked Questions about hos-gh-pull-request

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a good pull request body on GitHub?

Structure the body as three sections: `# Why` containing only `* Close #<issue>`, `# How` describing the approach taken rather than the diff, and `# Note` only when something needs watching. The diff and commits already show what changed, so the body should carry what they cannot.

How do I create a draft pull request with the gh CLI?

Run `gh pr create --draft --base <branch> --title '<title>' --body-file <path> --assignee @me`. The body should go through `--body-file` rather than `--body` so backticks and newlines are not mangled by the shell, and the branch must already be pushed to the remote.

How do I find the right base branch for a pull request?

Walk the first-parent ancestry for an empty marker commit like `Start ...` or `Release x.x.x`, then find the branch with zero non-merge commits past that marker—that is the trunk. Only `dev`, `env`, `hotfix/*`, and `release/*` branches open directly against `main`.

What happens if the gh CLI is not installed or not authenticated?

The skill states which condition applies and stops at handing over the pull request text in fenced blocks, along with the `gh pr create` command for later use. Nothing about the title, body structure, or language changes when gh is unavailable.

Should a pull request close multiple issues?

No. `# Why` names exactly one issue with a single `Close #<issue>` line. When work spans several pieces, close the hub issue they sit under; the children are reachable through the hub's sub-issue panel and repeating them goes stale.