custom-gh-pr-summary-comment

Posts a scannable changes-summary comment on a GitHub pull request via the gh CLI.

1|Updated Apr 3, 2021
One-click install
npx skills add https://github.com/NaoyaMiyagawa/dotfiles --skill custom-gh-pr-summary-comment-naoyamiyagawa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: custom-gh-pr-summary-comment
Source: https://github.com/NaoyaMiyagawa/dotfiles/tree/main/.ai/skills/custom-gh-pr-summary-comment
Command: npx skills add https://github.com/NaoyaMiyagawa/dotfiles --skill custom-gh-pr-summary-comment-naoyamiyagawa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? PR comment threads often become unreadable walls of nested headings and debugging narratives, forcing reviewers to dig through diffs to understand progress. This Skill posts a concise, timeline-style summary comment covering only what changed since the previous summary, with deep links to every referenced spec, doc, or source line. ## Core Features & Use Cases - Delta-scoped summaries: Finds prior summary comments via the <!-- pr-change-summary --> marker and scopes the new comment to changes since that boundary, chaining the thread into a navigable timeline. - Scannable structure: Enforces a visible headline plus 1-2 sentence TL;DR with details folded in a <details> block, bullets over paragraphs, and tables for status matrices. - Deep linking: Pins source links to commit SHAs with line anchors, links spec sections and doc heading anchors, and links the previous summary via #issuecomment-<id>. - Use Case: After pushing a batch of commits implementing OID4VCI credential issuance, ask the assistant to post a changes summary; it finds the last summary, diffs the new commits, and posts a folded comment linking the exact spec sections and source lines touched. ## Quick Start Ask the assistant to post a changes summary comment on the current branch's pull request covering what changed since the last summary.

Frequently Asked Questions about custom-gh-pr-summary-comment

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

FAQPage Schema
How do I post a comment on a GitHub pull request from the command line?

Use the gh CLI with `gh pr comment <number> --body-file <path>` after writing the markdown body to a scratch file. The gh CLI must be authenticated, which you can verify with `gh auth status`.

How do I find the pull request for the current branch with gh?

Run `gh pr view --json number,url,headRefOid` from the branch to get the PR number, URL, and head commit SHA. The head SHA is also used to pin source links so line anchors do not drift.

How do I edit an existing GitHub PR comment instead of posting a new one?

Use `gh api -X PATCH /repos/{owner}/{repo}/issues/comments/<id> -f body=@<file>` with the comment ID and a file containing the revised body. This is how you update the latest summary rather than adding a new timeline entry.

Why should GitHub source links use a commit SHA instead of a branch name?

Branch-based links drift as new commits change line numbers, breaking the anchor. Pinning links to `blob/<commit-sha>/path#L120-L130` keeps the referenced lines stable for reviewers reading the comment later.

What are the limitations of PR summary comments for documenting changes?

Summary comments are a map, not the territory; detailed rationale and debugging narratives belong in committed docs that the comment deep-links to. They also require an authenticated gh CLI and an existing PR for the current branch.