kaji: Skill for Claude Code

.claude/skills/issue-close/SKILL.md

issue-close is a skill for Claude Code from apokamo/kaji. It costs 45 tokens per session (10,400 once invoked), scanned C, original, Apache-2.0.

A cleanup step for a completed issue after its pull request is approved and ready to merge. A pull request is a proposed code change awaiting review and merging.

In plain words
What is it for?
Use it to merge the pull request, remove the worktree, safely delete the branch, and close the issue when the work is complete.
Why use it?
It groups the final repository cleanup into one operation instead of leaving merged branches, worktrees, or issues open.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Codex.

This is apokamo/kaji's own configuration. It tells Claude Code how to work on kaji itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kaji configures →

Reuse

Borrowing it

Nothing to install: this file belongs to apokamo/kaji. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/apokamo/kaji/main/.claude/skills/issue-close/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/apokamo/kaji

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/apokamo/kaji/issue-close"><img src="https://agentmods.dev/badge/skills/apokamo/kaji/issue-close.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,400 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00045 $0.10400
Opus 5.5 $0.00018 $0.04160
Sonnet 5.5 $0.00009 $0.02080
Haiku 4.5 $0.00005 $0.01040

Measured 4d ago against content hash 732f11adc531, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

issue-close scanned grade C 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 4d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf -- "$child" || FAILED="$FAILED${FAILED:+, }$child"
.claude/skills/issue-close/SKILL.md · 745 lines

How it starts

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

Issue Close

イシュー対応完了後のクリーンアップを実行します。 PR マージ、worktree 削除、ブランチ削除、Issue クローズ、Issue の一時作業ディレクトリ削除を一括実行します。

いつ使うか

タイミング このスキルを使用
PRが承認済みでマージ可能(承認の正本は下表) ✅ 使用
PRレビュー待ち ❌ 待機
作業途中 ❌ 不要

承認の正本は起動経路で決まる。

起動経路 承認の正本 close 側の確認
ハーネス経由・review-poll が PASS review-poll の PASS と構造化証跡 review-poll-evidence.json Step 2.5 で照合する(MODE=verify)
ハーネス経由・review-poll が PASS 以外 / attempt なし workflow の遷移(review / pr-verify の PASS)。attempt なしでは close から再開した人間の判断 再判定しない(Step 2.5.1 の MODE=skip)
手動起動([verdict_path] なし) 起動した人間 再判定しない

self-PR では GitHub が自分の PR への承認レビューを受け付けないため、reviewDecision が空・reviews が 0 件に なるのは正常であり、未承認を意味しない。

ワークフロー内の位置: implement → review-code → i-dev-final-check → i-pr → close

入力

ハーネス経由(コンテキスト変数)

常に注入される変数:

変数 型 説明
issue_id str 正規化済み Issue ID(GitHub 数値)
issue_ref str 人間可読の Issue 参照(GitHub では #<issue_id>)
step_id str 現在のステップ ID

provider 解決時に追加で注入される変数:

変数 型 説明
provider_type str github(現行唯一の provider)
default_branch str ベースブランチ名(main 等)。branch 削除判定と git pull の引数に使用
branch_name str フィーチャーブランチ名(feat/<id> 等)
worktree_dir str worktree 絶対パス
verdict_path str harness 経由でのみ注入される、この step の verdict.yaml 絶対パス。Step 2.5(review-poll 承認証跡の照合)の適用判定に使う

手動実行(スラッシュコマンド)

$ARGUMENTS = <issue_id>

解決ルール

コンテキスト変数 issue_id が存在すればそちらを使用。 なければ $ARGUMENTS の第1引数を issue_id として使用。

issue_ref はハーネス経由ではプロンプトに自動注入される(prompt.py 側で provider 別に整形)。手動実行時は issue_id から #<issue_id> を導出する。

前提条件

  • /i-pr でPRが作成済みであること
  • Merge commit方式を使用(ブランチ履歴を保持)

実行手順

Step 1〜6 を順に実行する(kaji pr merge / worktree 削除 / branch 削除 / git pull / kaji issue close / tmp/kaji/[issue_id]/ 削除 / 報告)。

共通: ワークフロー完了後の確認項目の移管

親 Issue を close する直前に、provider に関係なく本手順を実行する。 正本は docs/dev/workflow_completion_criteria.md § follow-up Issue への移管、本文 template は templates/follow-up-issue.md とする。

Read the full file on GitHub · 745 lines

Files

What ships with it

1 file 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. 4d ago Changed · +15 lines 732f11adc531
  2. 9d ago Changed · -23 lines e53e4f6c39ac
  3. 10d ago Changed · +135 lines · +13 tokens per session scan A → C 9205a0283761
  4. 11d ago Changed · -165 lines ae89a4fd0097
  5. 12d ago Changed · +47 lines 7ac109640891
  6. 26d ago Changed · +182 lines dca3702dfed3
  7. 1mo ago First seen · 554 lines · 32 tokens per session scan A 70ab9bc68596

Subscribe to this mod's changes

issue-close is a skill published in the GitHub repository apokamo/kaji (15 stars, last pushed 5d ago), licensed Apache-2.0. It adds 45 tokens to every session and 10,400 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.