issue-close
Closes a GitHub issue as resolved, superseded, or duplicate: reads the body and comments, migrates anything still live, cross-links both directions, and previews before closing. Use when the user asks to close an issue, when work that resolves one has merged, or when grooming finds a duplicate or superseded issue.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-19
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- issue-close
- effort
- low
- description
- Closes a GitHub issue as resolved, superseded, or duplicate: reads the body and comments, migrates anything still live, cross-links both directions, and previews before closing. Use when the user asks to close an issue, when work that resolves one has merged, or when grooming finds a duplicate or superseded issue.
- allowed-tools
- Bash(gh issue *), Bash(gh api *), Bash(gh repo *), Read
- argument-hint
- <#> | supersede <closing#> <canonical#> | dedupe <dup#> <keeper#>
02 资源文件 2
- 参考文档agents/openai.yaml124 B
- 参考文档long-and-cross-repo.md832 B
03 SKILL.md 正文
Issue Close
Close an issue without losing what its thread learned or stranding the people who read it. Every close carries a comment stating the resolution, and the user sees each comment before it posts.
| Arguments | Mode |
|---|---|
<#> |
resolve: fixed, wontfix, invalid, or no-repro |
supersede <closing#> <canonical#> |
another issue captures the work; migrate substance first |
dedupe <duplicate#> <keeper#> |
an outright duplicate; no migration |
1. Read the whole thread
gh issue view <#> --json title,body,state,labels,comments
Read both issues for supersede and dedupe. The comments often hold the
latest understanding, so the body alone can mislead. Look for:
- 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, which are part of the effective scope.
--json comments returns at most the first 100; for a longer thread, fetch
them all before mining:
gh api --paginate "repos/<owner>/<repo>/issues/<#>/comments"
For threads past 100 comments and issues in another repo, read long-and-cross-repo.md.
Done when you've read every comment on every issue involved, or, for a thread past 100 comments, sampled it as the reference describes.
2. Resolve
Name the resolution and draft the comment:
Resolved in #<pr> (commit <sha>). <One sentence on what changed.>
Closing as wontfix. <Reason: design constraint, scope, deprecated path.>
If circumstances change, reopen with new context.
Closing as invalid. <Why: misconfigured environment, expected behaviour, etc.>
Cannot reproduce on <env / commit>. Tried: <steps>. Reopen with a minimal
repro if you hit this again.
Show the user the comment and wait for confirmation, then:
gh issue close <#> --comment "..."
Done when the issue is closed with a comment naming its resolution.
3. Supersede
Migrate before closing: once the closing issue is shut, its substance is effectively lost to anyone reading the canonical one.
-
From step 1, list every item on
closing#not already oncanonical#. Each is a migration candidate. Carry late priority and area labels ontocanonical#if it lacks them, and say in the migration comment where the label change came from. When the caller says the substance is already migrated (a merge posts one consolidated comment first), confirm it is oncanonical#and skip the migration comment. -
Draft the migration comment for
canonical#, preserving the substance with attribution and linking back toclosing#. Draft the close comment forclosing#: why it's superseded, a link tocanonical#, and a note that the original thread stays readable. -
Show the user both comments and the label diff for
canonical#, and wait for confirmation before applying any of them. -
Apply:
gh issue comment <canonical#> --body "..." gh issue edit <canonical#> --add-label "..." # only if labels carry over gh issue close <closing#> --comment "..."
Done when every migration candidate is on canonical#, and each issue links
to the other.
4. Dedupe
-
Confirm the overlap is genuine, not keyword similarity.
-
The keeper is usually the older issue with more discussion. Cross-link from the keeper only when the duplicate adds context, such as a different repro or reporter.
-
Show the user the close comment, and the keeper comment if there is one, and wait for confirmation, then:
gh issue comment <keeper#> --body "..." # only if the duplicate adds context gh issue close <duplicate#> --comment "Duplicate of #<keeper>. <Optional: what's preserved>"
Done when the duplicate is closed pointing at the keeper, and any context it added is linked from the keeper.
Related
issue-create— file a new issue.issue-update— reopen, edit the body, comment, retag.issue-restructure— split or merge issues.pr-comments— the same discipline for PR review threads.
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.