gh-close-plan
Skill5 starsChanged 52 days agoMITView on GitHub
Close a GitHub plan issue with a summary. Use when the user tells you to "close the github plan issue".
In this repository7 other files it gives its agents.
- gh-create-planSkill
- gh-create-prSkill
- gh-implement-planSkill
- gh-read-planSkill
- gh-update-planSkill
- handoverSkill
- prompt-sessionSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Never @mention other users in plan issues or comments.
- Very specific: line 13
Create a unique temp directory: mktemp -d /tmp/plan-close-XXXXX
- Very specific: line 22
Never embed content directly in shell arguments or use -f body=@file (it uploads the literal string, not the file contents).
- Distinctive: line 24
Read the issue and its comments to understand the full history of the work.
- Very specific: line 25
Check off completed steps (- [x]) based on the work done.
- Distinctive: line 26
Verify that all steps are checked off.
- Distinctive: line 32
Capture learnings: Before closing, review the work for non-obvious discoveries worth persisting.
- Distinctive: line 40
Add a closing comment summarizing:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
- Create a unique temp directory:
mktemp -d /tmp/plan-close-XXXXX - Fetch content from GitHub using
gh apiand save it to files in the temp directory (e.g.body.md,comment-COMMENTID.md). In Claude Code, prefer the Write tool. Do not embed fetched content directly in shell arguments. - Modify the temp files with the agent's normal file-edit mechanism. In Claude Code, prefer the Read and Edit tools. Avoid ad hoc
sed/awkrewrites. - Upload using
--inputwithjqto 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.
- Read the issue and its comments to understand the full history of the work.
- 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. - Verify that all steps are checked off. If any are incomplete, ask the user whether to proceed or leave the issue open.
- Finalize the PRs comment as a table:
| PR | What | Agent session |. PR column:org/repo#Nas 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. - 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-planfor the canonical list and order.
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
teamRepofrom~/.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). Split only when different consumers would cite different parts; never split by timeline or implementation phase. Skip this step if noteamRepois configured or the plan is not in that repo.Apply confirmed items. If the user says nothing to capture, move on.
- Add a closing comment summarizing:
- What was accomplished
- Links to the final PR(s)
- Any follow-up work or known limitations
- Close the issue.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

