session-close

session-close is a skill for Claude Code from nirecom/agents. It costs 51 tokens per session (2,531 once invoked), scanned A, original, MIT.

A session-closing workflow that finishes issue handling and produces a final report. It supports work done in a separate worktree as well as work done directly on a branch or the main path.

In plain words
What is it for?
Use it after a work session when a merged change needs issue closure, outcome collection, and a final report.
Why use it?
Closing a coding session can involve several final actions, such as confirming a merge and collecting the outcome. This tool coordinates those actions so the final report reflects what actually happened.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md.

Good fit Use it after a work session when a merged change needs issue closure, outcome collection, and a final report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nirecom/agents/session-close
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 nirecom/agents --skill session-close
Clone the repo
git clone --depth 1 https://github.com/nirecom/agents

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 session-close

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirecom/agents/session-close/github.svg)](https://agentmods.dev/skills/nirecom/agents/session-close)
Your own site
<a href="https://agentmods.dev/skills/nirecom/agents/session-close"><img src="https://agentmods.dev/badge/skills/nirecom/agents/session-close/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 session-close

Your own site · 80×15
<a href="https://agentmods.dev/skills/nirecom/agents/session-close"><img src="https://agentmods.dev/badge/skills/nirecom/agents/session-close.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,531 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00051 $0.02531
Opus 5.5 $0.00020 $0.01012
Sonnet 5.5 $0.00010 $0.00506
Haiku 4.5 $0.00005 $0.00253

Measured today against content hash d7577ab27341, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

session-close scanned grade A 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 today.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/close-alert-phase.sh, scripts/relocate-session-state.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- `/issue-close-finalize` is invoked via the Skill tool only (never `bash`/`spawnSync`).
skills/session-close/SKILL.md · 184 lines

How it starts

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

Session close orchestrator. Drives issue-close-finalize (when applicable), collects the outcome JSON written by its ICF-K, and emits the Final Report by substituting the skeleton from hooks/lib/final-report-schema.renderSkeleton. Replaces the legacy "Step 7" emit inside /worktree-end so the Final Report reflects every terminal action.

Pre-flight

  • AGENTS_MAIN_ROOT must be set.
  • Caller context (pull_request path): /worktree-end WE-1..WE-18a have already completed (PR merged, worktree removed; <CONTROL_DIR>/final-report-env.json exists).
  • Caller context (direct: merge_to_main is complete): /merge-to-main pushed to the default branch. No worktree-end ran; the env file does not yet exist.

SC-0 — Resolve PLANS_DIR and session id

Run bash "$AGENTS_MAIN_ROOT/bin/workflow-plans-dir" once as one bare command — never assigned to a variable and echoed back. Canonical: skills/_shared/resolve-plans-dir.md.

Substitute the absolute path it prints for <PLANS_DIR> in every subsequent step. Resolve <session-id> from $CLAUDE_CODE_SESSION_ID with the fallback chain used by --from-session. If unresolvable, abort: session id unresolved — cannot render Final Report. <CONTROL_DIR> is the stdout of node "$AGENTS_MAIN_ROOT/bin/workflow-control-dir" --session <session-id> --for-write (non-zero → abort).

<PLANS_DIR>, <CONTROL_DIR> and <session-id> are LLM-substituted literals — shell variables do not persist between Bash tool calls.

SC-1 — Detect the route

Run: node "$AGENTS_MAIN_ROOT"/bin/session-close-detect-route.js --session ""

  • ROUTE=wf-meta → WF-META session. Record IS_WF_META=yes as an LLM-tracked state literal (not a shell variable — every Bash call is self-contained). Proceed to SC-2C.
  • ROUTE=pull_request → worktree path (SC-2A).
  • ROUTE=direct → direct delivery path (SC-2B).

SC-2A — Worktree path: reuse existing env JSON

test -f "<CONTROL_DIR>/final-report-env.json" \
  || { echo "ERROR: env JSON missing — /worktree-end must run first" >&2; exit 1; }

Read the full file on GitHub · 184 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today Changed d7577ab27341
  2. 7d ago Changed · -9 lines · +1 tokens per session 8b5c92bbcbfc
  3. 9d ago Changed b05f6b7490e7
  4. 11d ago Changed 67dc7eaff79c
  5. 14d ago Changed · +4 lines 028ca8f8d4f9
  6. 17d ago Changed · -1 lines 5270c508d57d
  7. 21d ago Changed 7321fc3cb86a
  8. 1mo ago Changed · -5 lines 93937ecf6b2b
  9. 1mo ago Changed · -4 lines c9c3c18f4dd0
  10. 1mo ago First seen · 199 lines · 50 tokens per session scan A e5e76205660a

Subscribe to this mod's changes

session-close is a skill published in the GitHub repository nirecom/agents (3 stars, last pushed today), licensed MIT. It adds 51 tokens to every session and 2,531 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

mcore-split-pr

Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.

NVIDIA/skills · 25 tokens

engineer-bot-ops

A workflow for carrying an engineering task from scope through implementation and reviewable delivery. It works with a repository's branch, existing changes, rules, checks, and permissions while separating completed, unverified, and next-step work.

makecindy/cindy · 57 tokens

shiplog

Recap of everything shipped since the last run - cross-repo PRs, security fixes, star deltas, and X traction, synthesized into a digest article and a ready-to-post shiplog in your voice.

aeonfun/aeon · 46 tokens

connect

Choose which wiki this session uses, the team project's pages on the Nimbalyst server or the project's local wiki of files, and connect a repository to its team project. Use at the start of a task before any wiki tool, when a wiki tool returns reponotbound, ambiguousproject, pinmismatch, projectnotaccessible…

nimbalyst/nimbalyst · 101 tokens

llxprt-issue-workflow

Use this skill when asked to address, fix, or work on a GitHub issue in the llxprt-code repository. Covers the complete issue lifecycle - branch setup, gh CLI usage, test-first planning, subagent delegation and review loops, the full verification cycle (including the zai-glm-flash smoke test), open code review (ocr)…

vybestack/llxprt-code · 88 tokens

cuga-github-issues

Create GitHub issues for cuga-agent (bugs, features, epics, designs, and related work) against origin using gh, with epic → feature → issue hierarchy and GraphQL sub-issue linking. Use when the user says create new issues, report a bug, file a bug, feature request, new feature, create an epic, GitHub issue, sub-issue…

cuga-project/cuga-agent · 88 tokens