live1,247 agents deployedbuilt by a solo devpowered by hermes
← All skillsSign up to install

internal-read-gh-pr-description

General0 installsUpdated 19d ago
Curatedgardusig

>-

SKILL.md preview

---
name: internal-read-gh-pr-description
description: >-
  Read-only: PR template discovery (§5), delta (§6), API-first issue/linking ladder + issue hint scan (§6.5–6.6), title/body + triple-pass (§7).
  Caller @gh-pr after §5; parent §9 mutates. Does not run gh pr create/edit.
---

# Internal: PR description

**Read-only.** Run after **`@gh-pr`** **§5** (**`PR_NUM`**, **`$BASE_GIT`**, branch/upstream vars per **`internal-read-gh-repo-stream`**). When open PR matches existed in §5, treat **`PR_NUM`** as user-confirmed intent from that AskQuestion gate. **Does not** mutate GitHub or own **Proceed** for PR apply—that is **`@gh-pr`** **§9** (**`internal-write-plan-skill-safety`** + **`internal-write-plan-structured-qa`** **§3a**).

**Single owners (do not duplicate):** **`gh repo view --json pullRequestTemplates`** → **[`internal-read-gh-repo-forms-json`](../repo-forms-json/SKILL.md)** · local globs / **`section-patterns`** → **[`internal-read-gh-pr-body-sections`](../pr-body-sections/SKILL.md)** · **delta commands** → **[`internal-read-git-git-diff-summary`](../../git/git-diff-summary/SKILL.md)** + **[`delta-narrative/SKILL.md`](../../git/git-diff-summary/delta-narrative/SKILL.md)** · **linking ladder + issue hint scan** → **§6.5–6.6** (this file) + **[`internal-read-gh-issue-projects-relationships`](../issue-projects-relationships/SKILL.md)** + **[`internal-read-gh-issue-list`](../issue-list/SKILL.md)** · **title + section order** → **[`internal-read-gh-pr-content`](../pr-content/SKILL.md)** + **[`title-line`](../pr-content/title-line/SKILL.md)**, **[`pr-body-skeleton`](../pr-content/pr-body-skeleton/SKILL.md)** · **PR/project mutations after Proceed** → **[`internal-write-gh-pr-commands`](../../write/gh/pr-commands/SKILL.md)**.

---

## 5. Discover PR templates

Run **after §4**, **before §6**. **Step A** always first (**`gh`** JSON); **B** if no usable template; **C** if still none.

**Multiple templates:** structured pick per **`internal-write-plan-structured-qa`** (one option per template + **Canonical only** → **`$PR_TEMPLATE_SOURCE`** = **`canonical`**, empty body).

### Step A — GitHub API (required)

**Execute** (do not copy-paste from here): same-repo vs fork command from **`internal-read-gh-repo-forms-json`** § **Pull request templates** using **`PR_TARGET_REPO`** / **`$UPSTREAM`** from **`internal-read-gh-repo-stream`** §3.

- Parse **`pullRequestTemplates`** (length probe in repo-forms-json optional; read full entries when non-empty).
- **One** object → **`github-api`** + body markdown.
- **≥2** → template Q&A.
- **`[]` / missing** → Step B. **`gh`** error after retry → B + note.

### Step B — Local files

Globs and filenames: **`internal-read-gh-pr-body-sections`** (do not maintain a second list here). Discover with **`git ls-files`** + glob. **One** file → **`local`**; **≥2** → Q&A; **none** → Step C.

### Step C — Canonical

**`$PR_TEMPLATE_SOURCE`** = **`canonical`**, **`$PR_TEMPLATE_BODY`** empty — scaffold from **[Body — canonical structure](#body--canonical-structure)** via **`internal-read-gh-pr-body-sections/section-patterns/SKILL.md`**.

### Merge rules (all sources)

**Non-canonical body:** template owns headings/checklists; canonical rules govern **substance** (prepend **TL;DR** / **What changed** when template has no short opener—unless template forbids; strip checklist items that only duplicate **Files changed**).

**Material template reshape:** **`internal-write-plan-structured-qa`** **AskQuestion** — **Keep / Blend / Pack canonical** — when applying the rules above would **reorder/remove** template-defined headings (**separate** from **`@gh-pr`** §9 PR mutation).

---

## 6. PR delta

Run **`internal-read-git-git-diff-summary`** **in full**. **§7** “What changed” must track that output—no parallel **`git`** recipes here.

---

## 6.5 Linking: API ladder (read-only orientation)

Use this ladder when deciding what to put in the **§9** mutation summary (and therefore what **`@gh-pr`** may run after **P