issue-close

A command that marks a tracked GitHub issue as complete in the local project files and on GitHub.

In plain words
What is it for?
Use it to close an issue, add completion notes, mark related progress as 100%, and update the task list for its larger work item.
Why use it?
It keeps the local task records, progress notes, and GitHub issue status aligned when work is finished.

Command for Claude Code

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.

agentmods
npx agentmods add commands/kamiazya/scopes/issue-close
Clone the repo
git clone --depth 1 https://github.com/kamiazya/scopes

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 648 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00000 $0.00648
Opus 5 $0.00000 $0.00324
Sonnet 5 $0.00000 $0.00130
Haiku 4.5 $0.00000 $0.00065

Measured 2d ago against content hash 1e23fcc0a6fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

issue-close scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

epic_issue=$(grep 'github:' .claude/epics/$epic_name/epic.md | grep -oE '[0-9]+$')
.claude/commands/pm/issue-close.md · 103 lines

How it starts

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

Issue Close

Mark an issue as complete and close it on GitHub.

Usage

/pm:issue-close <issue_number> [completion_notes]

Instructions

1. Find Local Task File

First check if .claude/epics/*/$ARGUMENTS.md exists (new naming). If not found, search for task file with github:.*issues/$ARGUMENTS in frontmatter (old naming). If not found: "❌ No local task for issue #$ARGUMENTS"

2. Update Local Status

Get current datetime: date -u +"%Y-%m-%dT%H:%M:%SZ"

Update task file frontmatter:

status: closed
updated: {current_datetime}

3. Update Progress File

If progress file exists at .claude/epics/{epic}/updates/$ARGUMENTS/progress.md:

  • Set completion: 100%
  • Add completion note with timestamp
  • Update last_sync with current datetime

4. Close on GitHub

Add completion comment and close:

# Add final comment
echo "✅ Task completed

$ARGUMENTS

---
Closed at: {timestamp}" | gh issue comment $ARGUMENTS --body-file -

# Close the issue
gh issue close $ARGUMENTS

5. Update Epic Task List on GitHub

Check the task checkbox in the epic issue:

# Get epic name from local task file path
epic_name={extract_from_path}

# Get epic issue number from epic.md
epic_issue=$(grep 'github:' .claude/epics/$epic_name/epic.md | grep -oE '[0-9]+$')

if [ ! -z "$epic_issue" ]; then
  # Get current epic body
  gh issue view $epic_issue --json body -q .body > /tmp/epic-body.md
  
  # Check off this task
  sed -i "s/- \[ \] #$ARGUMENTS/- [x] #$ARGUMENTS/" /tmp/epic-body.md
  
  # Update epic issue
  gh issue edit $epic_issue --body-file /tmp/epic-body.md
  
  echo "✓ Updated epic progress on GitHub"
fi

6. Update Epic Progress

  • Count total tasks in epic
  • Count closed tasks
  • Calculate new progress percentage
  • Update epic.md frontmatter progress field

7. Output

✅ Closed issue #$ARGUMENTS
  Local: Task marked complete
  GitHub: Issue closed & epic updated
  Epic progress: {new_progress}% ({closed}/{total} tasks complete)
  
Next: Run /pm:next for next priority task

Read the full file on GitHub · 103 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. 2d ago First seen · 103 lines · 0 tokens per session scan B 1e23fcc0a6fa

Subscribe to this mod's changes

issue-close is a command published in the GitHub repository kamiazya/scopes (2 stars, last pushed 9mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 648 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.