Skip to content
alyn
oaustegard

Closing Issues skill

Close a GitHub issue with a synthesis comment as a flowing graph — validate the synthesis, post the closing comment, close, then run a pluggable callback (e.g. memory store) detached. Use when closing an issue should also capture the LEARNING (not just the diff log) and when the post-close work shouldn't block the close ack.

$npx skills add oaustegard/claude-skills --skill closing-issues
View this skill on GitHuboaustegard/claude-skills/closing-issues/SKILL.md
Pack stars
257
Pack installs
3.7k
Alyn Score
53/99
Updated
8 h ago
License
MIT
– views – installs via Alyn

oaustegard

Closing Issues

Install Closing Issues

Pick your agent. Every command is ready to paste.

$npx skills add oaustegard/claude-skills --skill closing-issues

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads closing-issues when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the closing-issues skill”. In Codex, type $closing-issues.

The skill itself

SKILL.md

FolderGitHub

Closing Issues

A flowing graph that turns "close GitHub issue + capture what I learned" into a structural DAG. The synthesis text is validated upfront, the close happens against the GitHub API, and an optional post-close callback runs detached so the close ack is unblocked.

from closing_issues import close_issue

result = close_issue(
    repo="owner/repo",
    number=42,
    synthesis=(
        "Pattern X works because of Y. Constraint: don't apply to Z. "
        "Future note: revisit when feature Q lands."
    ),
)

print(result["issue_url"])    # https://github.com/.../issues/42
print(result["comment_url"])  # ...#issuecomment-...

Why a synthesis, not a "done" comment

Closing an issue produces two artifacts:

  • The Issue itself — implementation log. The diff and commit history already show what was done.
  • The closing comment / synthesis — what was learned. Lasts longer than the diff in mental cache.

Good closing comments lead with why, not what. Failure modes, constraints discovered, alternatives rejected. The synthesis is the seed of an institutional memory.

Internal shape

prepare_synthesis ──▶ close_github_issue           [terminal]
                              │
                              └──▶ post_close_callback  [detached, when=callback]
  • validate=must_have_synthesis_text runs against the raw input string. Empty or whitespace-only → FAILED with no GitHub API call. This is structural: callers can't accidentally close-with-no-text.

  • close_github_issue posts the synthesis as a comment, then PATCHes the issue to state=closed, state_reason=completed. Returns the issue URL and comment URL.

  • post_close_callback (optional) runs detached. Caller plugs in any extra work — store synthesis in a memory system, ping a tracker, emit a webhook. Failure here lands in result["detached_failures"] and does NOT bubble up as a close failure. Skipped via when= if the callback isn't provided.

Pluggable post-close callback

def store_in_my_memory(synthesis: str, issue_url: str, repo: str, number: int):
    # Whatever your memory layer is — Turso, sqlite, a JSON file, etc.
    db.execute("INSERT INTO learnings (issue, synthesis) VALUES (?, ?)",
               (issue_url, synthesis))
    return {"stored": True}

result = close_issue(
    repo="owner/repo",
    number=42,
    synthesis="...",
    post_close_callback=store_in_my_memory,
)

if result["callback_result"] is None and result["detached_failures"]:
    # The callback failed but the issue is still closed.
    print("Memory store failed:", result["detached_failures"])

The callback receives keyword arguments: synthesis, issue_url, repo, number. Anything it returns goes into result["callback_result"].

Result shape

{
    "issue_url":        "https://github.com/owner/repo/issues/N",
    "comment_url":      "https://github.com/.../issues/N#issuecomment-...",
    "comment_id":       12345,
    "callback_result":  <whatever the callback returned, or None>,
    "detached_failures": [],   # populated if callback raised
}

Raises RuntimeError only if the GitHub close itself fails. Callback failures are detached.

Auth

Requires GH_TOKEN (or GITHUB_TOKEN) in the environment. Classic PAT or fine-grained PAT with repo scope (specifically issues:write).

When NOT to use

  • Closing an issue without a synthesis. If you genuinely have nothing to say beyond "done," just gh issue close N directly. This skill is for the synthesis use case.
  • Closing many issues at once (use a script that calls this in a loop — fine, but the flow setup cost per call is small but not zero).

See also

  • flowing — the DAG runner this skill is built on
  • opening-prs — the symmetric "open and merge" flow

Tips for Closing Issues

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • This skill ships scripts. Read them before the first run, and run it in a project without secrets first.
  • • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Closing Issues

What does the Closing Issues skill do?

Close a GitHub issue with a synthesis comment as a flowing graph — validate the synthesis, post the closing comment, close, then run a pluggable callback (e.g. memory store) detached. Use when closing an issue should also capture the LEARNING (not just the diff log) and when the post-close work shouldn't block the close ack.

How do I install Closing Issues?

Run "npx skills add oaustegard/claude-skills --skill closing-issues" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Closing Issues work in Cursor and Codex?

Yes. Closing Issues uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is Closing Issues free?

Closing Issues is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Closing Issues?

Closing Issues is published by oaustegard in the oaustegard/claude-skills repository, together with 29 other skills.

Similar skills. From other creators.