gh-close-plan

gh-close-plan is a skill for Claude Code from gjoranv/claude-plan-skills. It costs 28 tokens per session (1,014 once invoked), scanned A, original, MIT.

A command for closing a GitHub plan issue, which is a GitHub issue used to track planned work.

In plain words
What is it for?
Use it when a tracked plan is finished and you need to close its GitHub issue using its URL or repository-and-issue number.
Why use it?
It provides a consistent way to record the work summary and close the issue without requiring manual editing of the issue and its comments.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it when a tracked plan is finished and you need to close its GitHub issue using its URL or repository-and-issue number.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gjoranv/claude-plan-skills/gh-close-plan
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gjoranv/claude-plan-skills --skill gh-close-plan
Clone the repo
git clone --depth 1 https://github.com/gjoranv/claude-plan-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gh-close-plan

README.md
[![agentmods](https://agentmods.dev/badge/skills/gjoranv/claude-plan-skills/gh-close-plan/github.svg)](https://agentmods.dev/skills/gjoranv/claude-plan-skills/gh-close-plan)
Your own site
<a href="https://agentmods.dev/skills/gjoranv/claude-plan-skills/gh-close-plan"><img src="https://agentmods.dev/badge/skills/gjoranv/claude-plan-skills/gh-close-plan/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-close-plan

Your own site · 80×15
<a href="https://agentmods.dev/skills/gjoranv/claude-plan-skills/gh-close-plan"><img src="https://agentmods.dev/badge/skills/gjoranv/claude-plan-skills/gh-close-plan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,014 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.01014
Opus 5 $0.00014 $0.00507
Sonnet 5 $0.00006 $0.00203
Haiku 4.5 $0.00003 $0.00101

Measured 11d ago against content hash 9a8117f43263, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

gh-close-plan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

gh-close-plan/SKILL.md · 45 lines

How it starts

The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Never @mention other users in plan issues or comments.

Close the GitHub issue $ARGUMENTS (issue URL or owner/repo#number). If no argument is given, use the issue referenced earlier in this conversation. If no issue can be determined, ask the user.

Workflow for editing issue bodies and comments:

  1. Create a unique temp directory: mktemp -d /tmp/plan-close-XXXXX
  2. Fetch content from GitHub using gh api and capture the output. Use the Write tool to save it to files in the temp directory (e.g. body.md, comment-COMMENTID.md). Do NOT use shell redirects (>) to write files, as this triggers permission prompts.
  3. Use the Read and Edit tools to modify the temp files (not shell commands like sed/awk).
  4. Upload using --input with jq to properly JSON-encode the content:
  • Edit issue body: jq -Rs '{body: .}' <tempdir>/body.md | gh api repos/OWNER/REPO/issues/NUMBER -X PATCH --input -
  • Create comment: jq -Rs '{body: .}' <tempdir>/comment.md | gh api repos/OWNER/REPO/issues/NUMBER/comments --input -
  • Edit comment: jq -Rs '{body: .}' <tempdir>/comment-COMMENTID.md | gh api repos/OWNER/REPO/issues/comments/COMMENT_ID -X PATCH --input -

Never embed content directly in shell arguments or use -f body=@file (it uploads the literal string, not the file contents). Always fetch the latest from GitHub before making changes. Do not rely on previously fetched copies that may be stale.

  1. Read the issue and its comments to understand the full history of the work.

  2. Check off completed steps (- [x]) based on the work done. Steps may be in a separate Steps comment (new format) or in the issue body (old format). Check both locations.

  3. Verify that all steps are checked off. If any are incomplete, ask the user whether to proceed or leave the issue open.

  4. Finalize the PRs comment as a table: | PR | What | Agent session |. PR column: org/repo#N as a link. What column: brief description. Agent session column: the session that added the PR. If the existing comment uses a different format (bullet list, old-style table), reformat it to this table structure.

  5. Clean up comments: Non-structural comments fall into two categories based on their heading:

    • ### Session: prefix: These are session summaries. Delete them and consolidate into a single Session Log comment with dated sections (### YYYY-MM-DD). Keep only key findings, decisions, and insights. Drop sessions with nothing noteworthy.
    • Any other heading (e.g. "Research:", "Considered:", "Implementation notes:", "Verification:"): These are standalone findings with lasting value. Keep them as separate comments, or merge into the Design comment if they are design decisions. Never delete structural comments (Steps, Design, Diagram, Links, Useful commands, Agent sessions, PRs). See gh-create-plan for the canonical list and order.
  6. Capture learnings: Before closing, review the work for non-obvious discoveries worth persisting. If a durable-memory CLI is configured, offer its capture flow. Otherwise, ask the user "Anything worth capturing?" and propose where each belongs:

    • Instructions file (CLAUDE.md, AGENTS.md, or similar): conventions, gotchas, build quirks
    • Repo docs (docs/ or similar): architecture insights, design rationale
    • Memory: cross-project patterns, user preferences

    For a company-shareable plan (opened in the teamRepo from ~/.claude/skills/plan-config.json), distill a frozen team record summarizing what was decided and why, so the closed plan carries no unique living knowledge and becomes safely archival. One record per independently citable outcome (usually one per plan). Skip this step if no teamRepo is configured or the plan is not in that repo.

    Apply confirmed items. If the user says nothing to capture, move on.

  7. Add a closing comment summarizing:

    • What was accomplished
    • Links to the final PR(s)
    • Any follow-up work or known limitations
  8. Close the issue.

Read the full file on GitHub · 45 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 45 lines · 28 tokens per session scan A 9a8117f43263

Subscribe to this mod's changes

gh-close-plan is a skill published in the GitHub repository gjoranv/claude-plan-skills (5 stars, last pushed 10d ago), licensed MIT. It adds 28 tokens to every session and 1,014 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.