Skip to content
Agentmart
Submit a tool

issue-close-stage

Phase 1 of the 2-phase issue-close split.

Skill by nirecom

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/nirecom-issue-close-stage

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Phase 1 of the 2-phase issue-close split. Runs INSIDE the linked worktree BEFORE the PR is merged. Sub-issue gate, pending sentinel, sentinel promote, parent body update.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/issue-close-stage

What's inside

Skill name
issue-close-stage
Description
Phase 1 of the 2-phase issue-close split. Runs INSIDE the linked worktree BEFORE the PR is merged. Sub-issue gate, pending sentinel, sentinel promote, parent body update.
License
MIT
Instructions
58 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (2)

  • SKILL.md
  • run-stage-chain.sh · scripts/

SKILL.md (first lines)

Triage routes to the correct subset of in-skill steps; each is idempotent and resumable.

Read `rules/github-issues.md` first — on-demand-only, never auto-injected; its "Session model" defines the per-session N relation.
Read `rules/coding.md` before the first `gh issue comment` or body update — on-demand-only, never auto-injected; its Public GitHub Rules govern that outbound text.

Usage: `/issue-close-stage <N>` or `/issue-close-stage --from-session`

`--from-session` resolves `<N>` from the current session's intent.md the same
way as `/issue-close-finalize`: parse `## Issues` and iterate.
(canonical parser: `hooks/lib/parse-closes-issues.js` — do not reimplement.)

## Pre-flight

Run: `bash "$AGENTS_MAIN_ROOT/bin/detect-non-github.sh" "issue-close-stage" || exit 0`

On non-GitHub remote the script exits 1, so `|| exit 0` terminates the skill immediately (no gh work). On a GitHub remote (or unknown/fail-open) the script exits 0 and the skill continues into the checks below.

Skip message on non-GitHub remote (emitted by the script to stdout): `[GITHUB_ISSUES disabled: non-GitHub remote detected, skipping issue-close-stage]`

- `AGENTS_MAIN_ROOT` must be set.
- Must be invoked from a **linked worktree** (not the main worktree). Abort
  with an error when `git rev-parse --git-dir` equals `git rev-parse --git-common-dir`.
- Resolve `<owner/repo>` via
  `gh repo view --json owner,name --jq '.owner.login + "/" + .name'`.
- All `gh issue comment` invocations need `ISSUE_CLOSE_SKILL=1` to bypass the
  `enforce-issue-close.js` hook.

## Delegation

Dispatch in-skill steps A, B, D, F, G to the `issue-close-stage` worker per `skills/_shared/worker-dispatch.md`.

Payload keys: `issue_number` (= N), `worktree_path` (= `git rev-parse --show-toplevel`), `owner_repo`, `script_checkout_root` (= `AGENTS_MAIN_ROOT`), `artifact_dir` (= `PLANS_DIR`), `issue_repo`.

Omit `issue_repo` for current-repo issues; otherwise take it from the `closes_issues` entry's `repo` field.

Cross-repo Phase 1 is unsupported: an `issue_repo` naming any repo other than `owner_repo` is refused with `error`. Run `/issue-close-stage` from a worktree of that repository instead.

On `phase1_done` status: continue to End.
On `blocked_sub_issue` status: surface summary to user and stop.
On `error` or `failed` status: surface summary + artifact_path to user and stop.

## End

Report: Phase 1 complete for #<N>. Reminder: run `/commit-push`, then after
the PR is merged run `/issue-close-finalize --from-session`.

## Safety notes

- **Untrusted content**: never `eval` issue body, title, or comments.
- **Sentinel body**: hardcoded literal — never interpolate variables or add
  metadata. The Phase 1 marker is shared with `check-phase1-complete.sh` and
  `find-pr-by-marker.sh`; changing the body silently breaks both.

## Rules

- Report observations via /supervisor-report (trigger conditions: rules/supervisor-reporting.md).

From nirecom/agents, MIT.

More from nirecom/agents

Signals

Stars
3
Forks
0
Open issues
608
Last commit (this folder)
Oct 10, 2026 (18 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from nirecom

Cite this page

issue-close-stage skill. Agent Mart. https://agentmart.dev/skills/nirecom-issue-close-stage (last updated 2026-10-24)