issue-restructure
Split one GitHub issue into focused replacements, or merge several into one keeper, migrating substance and cross-linking before closing.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- issue-restructure
- description
- Split one GitHub issue into focused replacements, or merge several into one keeper, migrating substance and cross-linking before closing.
- allowed-tools
- Bash(gh issue *), Bash(gh api *), Bash(gh repo *), Read
- argument-hint
- split <#> | merge <#> <#> [#...]
02 资源文件 2
- 参考文档agents/openai.yaml171 B
- 参考文档bulk-and-cross-repo.md809 B
03 SKILL.md 正文
Issue Restructure
Change how issues partition the work: one into many (split) or many into one
(merge), without losing the comment-thread substance the old partition
produced. Both modes migrate before they close, the user previews every title,
body, and label set before anything is filed or closed, and every keeper and
source end up linking to each other.
1. Read every involved issue
gh issue view <#> --json title,body,state,labels,comments
For split, read <#>; for merge, read all of them. The comments often
hold the latest framing the body misses. From each, collect what isn't
already on the keeper or replacements:
- alternative approaches proposed in replies;
- corrections after filing ("this was wrong, the real issue is …");
file:linesamples added later;- cross-links to other issues and PRs;
- labels triagers added after filing that hint at scope.
Each is a migration candidate. --json comments returns at most the first
100; for a longer thread, fetch them all:
gh api --paginate "repos/<owner>/<repo>/issues/<#>/comments"
For a merge of more than five issues, or issues across repositories, read bulk-and-cross-repo.md first.
Done when you have a list of migration candidates for every issue involved.
2. Split
-
Confirm
<#>covers genuinely independent work streams, because splitting fragments discussion. Keep one issue when the pieces add up to a single PR, when the user only wants sub-tasks (use body checkboxes), or when every piece hangs on the same upstream decision (list the options in one issue). If it only needs reframing, call the Skill tool with "issue-update" instead and stop here. -
Draft the replacements, each with a clear title, scope, labels, and a link back to
<#>. Place each migration candidate in the replacement it belongs to. -
Show the user the plan and wait for confirmation:
Splitting #<src> into: #A: <title> Scope: <one sentence> Labels: <list> #B: <title> Scope: <one sentence> Labels: <list> #C: ... #<src> will be closed with: "Split into #A / #B / #C — ..." Original body will be edited to point to replacements. -
File the replacements in order, calling the Skill tool with "issue-create" once per replacement, so each gets the same duplicate search, labels, and preview. Tell each call that
<#>is the known source being split: an adjacent issue to link, not a duplicate to stop on. -
Edit
<#>'s body to open with "Split into #A, #B, #C", then close it:gh issue edit <#> --body-file - <<'EOF' > Split into #A, #B, #C. <original body> EOF gh issue close <#> --comment "Split into #A / #B / #C — see body for scope each covers."
Done when every replacement is filed and links back, and <#> is closed
pointing at all of them.
3. Merge
The inverse of split: each non-keeper is superseded by the keeper.
-
Pick the keeper, in this order: the broadest accurate scope (its framing already covers the others), then the most discussion (the longest thread stays in place without migration), then the most recent activity (readers expect a current issue to be active), then the lowest number (older is more canonical). If no issue clearly qualifies, the set probably shouldn't merge: call the Skill tool with "issue-create" for a new umbrella, then once per old issue with "issue-close" in
supersedemode, and stop here. -
Draft one consolidated migration comment on the keeper, grouping the migrated content by source issue and linking each source, and the label change if the keeper's scope grew.
-
Show the user the migration comment and the label diff, and wait for confirmation. Then post them:
gh issue comment <keeper#> --body-file - <<'EOF' <migration comment> EOF gh issue edit <keeper#> --add-label "..." # only if scope grew -
Close the non-keepers by calling the Skill tool with "issue-close" once per non-keeper, as
supersede <non-keeper#> <keeper#>. Tell each call the substance is already migrated, so it only drafts and previews the close comment ("Merged into #<keeper>", with a pointer to that source's section of the migration comment).
Done when every migration candidate is on the keeper, the migration comment links every source, every non-keeper is closed pointing at the keeper, and the keeper's labels match its scope.
Related
issue-create— files each replacement duringsplit.issue-close—mergecloses each non-keeper through itssupersedemode.issue-update— use it instead ofsplitwhen the issue only needs reframing.
04 同仓库更多 Skills
teach
Teach yourself a topic over several sessions, with lessons, references, and a record of what you've learned.
svg-logo-designer
Generate SVG logos with multiple concepts, layouts, and color variations.
documentation-writer
Writes and revises human-facing documentation — READMEs, contributor and setup guides, reference pages, architecture notes, CLAUDE.md, and changelog entries. Covers picking the right document type for the question being asked, structuring for skimming, writing examples that actually run, and keeping docs from going stale. Use when creating or rewriting docs, when a README has drifted from the code, or when deciding where a piece of information belongs. For SKILL.md and agent files, use /skill-writer instead.
adhd-mode
Shapes every response for a reader with ADHD: the next action first, numbered steps, progress restated each turn, tangents held back, concrete time estimates, wins made visible. Stays on for the rest of the session until the reader says "stop adhd mode". On Claude Code, the harness-kit:adhd output style does the same without invoking this skill.
wait-what
That last message didn't land: re-explain it with the missing context.
to-questionnaire
Turn a decision you can't make alone into a questionnaire for the one person who can answer it, filled in async or together in a meeting.