/repo-related-skills:create-issues-update-prfrom repo-related-skills
Creates GitHub issues from work on a branch/PR, grouping related issues under parent epics using GitHub's native parent/child relationship, then updates the PR title and description with a formatted issue list.
Ships in repo-related-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Takes work that's already happened on a branch (or that the user is about to describe) and turns it into GitHub issues — one flat issue for a single atomic change, or a parent epic plus child issues when the work genuinely splits into distinct pieces — then rewrites the pull request's title and description so the description carries an itemized, correctly nested list of every issue it's tracked by.
The two halves of this (creating issues, updating the PR) are meant to happen together: an issue list in a PR description is only useful if the numbers in it are real and current, and issues filed for a PR are only useful if the PR actually points back at them.
Establish what work you're filing issues for. If a PR number is
given or obvious from context (the current branch's open PR), read it
— pull_request_read method get for its title/body/branches, and
either get_commits or a local git log/git diff against the base
branch for what actually changed. Ground every issue in real,
verifiable work: a commit, a diff, a file. If the user is describing
work that isn't reflected in commits yet, that's fine to file too, but
say so explicitly rather than presenting it as already-done. If
there's no PR yet and no clear scope, ask rather than guessing at what
to track.
Decide the shape: one issue, or a parent epic with children?
Check issue-type support before creating anything. Call
list_issue_types for the owner/repo. If the repository defines
types (commonly something like Feature/Bug/Task), pick the closest
fit for each issue you create and pass it. If the repository has no
issue types configured, omit the type field entirely rather than
guessing at a value that doesn't exist there.
Search before creating, to avoid duplicates. Use search_issues
(or list_issues for a small repo) for anything already covering the
same work — a stale or half-finished issue from earlier is worth
linking to and updating rather than duplicating. Only skip this check
if the user has made clear these are definitely new.
Create the issues, parent first.
issue_write method create, with a body
naming the PR it's tracked in and a short description of the
overall goal. A plain-text checklist of the sub-pieces is fine here
even before the children exist — you can go back and turn it into
real #-linked bullets once the children have numbers, but that's
a nice-to-have, not required.issue_write method create with parent_issue_number
set to the parent's number — this attaches the child to the parent
in the same call; no separate linking step needed. (sub_issue_write
is for re-parenting an issue that already exists — you don't need it
for issues you're creating fresh in this workflow.)Update the PR — title and body, in one call.
Title: short. When a parent epic exists, matching its title verbatim keeps the PR and its tracking issue recognizable as the same piece of work at a glance — an epic title that was itself kept short is usually reusable as-is. Otherwise, write a short, accurate title for the single issue's scope. Aim well under 70 characters.
Body: the default shape, whenever this skill is writing or rewriting a body from scratch, is three parts in this order:
A short Summary (1-2 sentences): what the PR fixes or adds, in plain terms — the kind of sentence someone skimming a PR list needs, not the mechanism.
A Details section: the fuller explanation — root cause (for a fix), the approach taken, what actually changed, and how it was verified — pulled from the real commits/diff for this PR, not written generically from the title alone.
An Issues section listing every issue created, one per line, in exactly this format:
- Closes #{{issue-number}} -- {{issue-title}}
The Closes keyword is deliberate, on every line including a
parent epic's — GitHub auto-closes any issue referenced this way
when the PR merges into the repo's default branch, so the list
doubles as the mechanism that closes the issues, not just a
description of them. Indent each level of child under its
parent by two spaces — GitHub renders two-space-indented bullets
as a nested list. A flat set of issues with no parent is just
one un-indented list.
This Summary/Details/Issues shape is the default, not a rigid template to impose everywhere: if the PR already has its own established, still-accurate structure (a repo convention like Summary/Key changes/Test plan, or anything else genuinely reflecting the PR's current state), preserve that structure and just add or refresh the Issues section within it, additively, rather than forcing the Summary/Details split on top of a body that already works. The one case that calls for a full rewrite either way: if the existing description is generic boilerplate that no longer reflects the PR's actual current state (common after several rounds of commits since it was first written) — then rewriting the whole body (into the default Summary/Details/ Issues shape, absent some other convention to follow) is the right call — just say that's what you're doing rather than silently overwriting something that looked deliberate.
Use update_pull_request with both title and body set in the
same call.
Verify — don't trust the write call's echo. After creating the
issues and updating the PR, read them back: pull_request_read
method get on the PR to confirm the title and body actually saved
as given (GitHub's write endpoints occasionally normalize or truncate
content silently), and spot-check the created issues if there's any
doubt about the parent/child structure actually taking. Only report
the work as done once you've confirmed it from a fresh read, not from
memory of what you sent.
The default full body shape — Summary, then Details, then the Issues list (see workflow step 6):
## Summary
Fixes a sidebar bug where a row's reading-time estimate with more
digits than the rest threw its part-number index out of column with
every other row.
## Details
`.n-meta`'s auto-sized width let a wider time value shift that row's
whole trailing block, including the index digits, independently of
every other row. Fixed by giving the time value a fixed, right-aligned
width instead of letting it size itself. Verified with new tests and
by regenerating the two affected real editions.
## Issues
- Closes #76 -- Fix sidebar reading-time column misalignment
- Closes #77 -- Derive sidebar time-column width from reading_times.total
- Closes #78 -- Update scrolls memory for sidebar alignment fix
The rest of these examples show just the ## Issues fragment itself —
the part whose exact list/nesting format matters regardless of what
Summary/Details (or a repo's own alternate sections) look like above
it.
With a parent epic:
## Issues
- Closes #50 -- Add Stata skill (stata-recipes)
- Closes #51 -- Create the initial stata-recipes skill
- Closes #52 -- Expand stata-recipes: time-series/panel regression, unit-root tests
- Closes #53 -- Restructure stata-recipes recipes into models/ and tests/ subfolders
Flat, no parent:
## Issues
- Closes #61 -- Fix broken link in README
Two levels of nesting (a parent whose children each have their own children) follows the same two-spaces-per-level rule:
## Issues
- Closes #70 -- Rewrite the onboarding flow
- Closes #71 -- New signup form
- Closes #72 -- Add email verification step
- Closes #73 -- New welcome email
type, when the repository supports one) and the PR's own title and
body.See meta/MAINTAINERS.md for layout and versioning notes. Not read as
part of carrying out a live "file issues for this PR" request — don't
act on it while answering one.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (sugatoray/aiskills) — no native marketplace selected
npx claudepluginhub p/sugatoray-repo-related-skills-skills-development-repo-related