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.
curl -O https://raw.githubusercontent.com/apokamo/kaji/main/.claude/skills/incident-cycle/SKILL.mdgit clone --depth 1 https://github.com/apokamo/kajiWrote 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.
[](https://agentmods.dev/skills/apokamo/kaji/incident-cycle)<a href="https://agentmods.dev/skills/apokamo/kaji/incident-cycle"><img src="https://agentmods.dev/badge/skills/apokamo/kaji/incident-cycle/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.
<a href="https://agentmods.dev/skills/apokamo/kaji/incident-cycle"><img src="https://agentmods.dev/badge/skills/apokamo/kaji/incident-cycle.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.01569 |
| Opus 5 | $0.00036 | $0.00785 |
| Sonnet 5 | $0.00015 | $0.00314 |
| Haiku 4.5 | $0.00007 | $0.00157 |
Grade A, and why
incident-cycle scanned grade A with 0 findings 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 10d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Incident Cycle(slash wrapper)
kaji run .kaji/wf/official/incident.yaml <incident_issue_id> を Bash 経由で起動する slash command wrapper
skill(/review-cycle 同型)。第2層(インシデント原因調査・対応策提案)の手動起動の入口。
- 起動は手動のみ(#303 決定 C)。自動起動・自動昇格は実装しない。
- 全終端は「提案」であり、ラベル遷移・クローズ・統合の実行は人間が行う。close step は無いため
--beforeは使わない。
いつ使うか
| タイミング | このスキル |
|---|---|
| 第1層が起票したインシデントの調査サイクルを 1 コマンドで回したい | ✅ 必須 |
provider.type='github' の環境 |
✅ 前提(incident.yaml は requires_provider: github) |
provider.type='github' 以外(local 等) |
❌ workflow が requires_provider: github で exit 2 |
ワークフロー内の位置: 第1層のインシデント起票 → /incident-cycle →(人間が処遇判断)
入力
/incident-cycle <incident_issue_id>
$ARGUMENTS = <incident_issue_id>(第1層が起票したインシデントイシューの番号)。docs/dev/skill-authoring.md§ 手動実行 の規約に従い、引数は$ARGUMENTSから取得する。- 未指定(
$ARGUMENTSが空)の場合はkaji runを実行せず、stderr に usage を出して ABORT verdict を返す。
実行手順
以下の擬似コードを Claude が Bash 経由で実行する。$ARGUMENTS は slash command の引数文字列。
set -u # set -e は外す(exit code を明示的に拾う)
# Step 1: 引数チェック(引数欠落時の ABORT 経路)
read -r ISSUE_ID _REST <<<"${ARGUMENTS:-}"
if [ -z "${ISSUE_ID:-}" ]; then
echo "usage: /incident-cycle <incident_issue_id>" >&2
cat <<'VERDICT_EOF'
---VERDICT---
status: ABORT
reason: |
Missing required argument: <incident_issue_id>.
evidence: |
$ARGUMENTS was empty or did not contain an incident_issue_id token.
suggestion: |
Re-invoke as /incident-cycle <incident_issue_id> (e.g. /incident-cycle 314).
---END_VERDICT---
VERDICT_EOF
exit 2
fi
# Step 2: kaji run 起動
# stderr のみ tee で capture し、^Workflow aborted: シグナルを後で grep する。
STDERR_LOG=$(mktemp)
trap 'rm -f "$STDERR_LOG"' EXIT
kaji run .kaji/wf/official/incident.yaml "$ISSUE_ID" \
2> >(tee "$STDERR_LOG" >&2)
EXIT=$?
HAS_ABORT_MARKER=0
if grep -q '^Workflow aborted:' "$STDERR_LOG"; then
HAS_ABORT_MARKER=1
fi
# Step 3: verdict ブロック出力(exit code → verdict の縮約契約: 0 → PASS / 非 0 → ABORT)
if [ "$EXIT" -eq 0 ]; then
echo
echo "incident-cycle 完了(workflow PASS)。最終提案コメントを確認し、ラベル遷移・クローズ・バグイシュー化・統合の処遇を人間が判断してください。"
cat <<VERDICT_EOF
---VERDICT---
status: PASS
reason: |
incident workflow completed successfully (exit 0).
evidence: |
kaji run .kaji/wf/official/incident.yaml $ISSUE_ID exited with code 0.
suggestion: |
Review the final proposal comment on the incident issue and decide label transition / close / bug-issue drafting / consolidation (human judgement).
---END_VERDICT---
VERDICT_EOF
else
# exit != 0 はすべて ABORT に縮約する。
case "$EXIT" in
1)
if [ "$HAS_ABORT_MARKER" -eq 1 ]; then
REASON="workflow ABORT verdict (exit 1, 'Workflow aborted:' marker present in stderr)"
SUGG="Inspect the incident issue comments for the aborting step's verdict. Re-run with --from review --reset-cycle after human review if the review cycle exhausted."
else
REASON="exit 1 without 'Workflow aborted:' marker — possibly an unexpected exception in cli_main.py"
SUGG="Check stderr / traceback. Re-execute the failing step manually for diagnosis."
fi
;;
2)
REASON="definition error / config error (exit 2)"
SUGG="Run 'kaji validate .kaji/wf/official/incident.yaml'; verify .kaji/config.toml [provider] type is github."
;;
3)
REASON="runtime error in kaji run (exit 3)"
SUGG="Inspect stderr traceback."
;;
*)
REASON="unknown exit code $EXIT"
SUGG="Inspect kaji run stdout/stderr."
;;
esac
cat <<VERDICT_EOF
---VERDICT---
status: ABORT
reason: |
$REASON
evidence: |
kaji run .kaji/wf/official/incident.yaml $ISSUE_ID exited with code $EXIT.
Workflow aborted marker in stderr: $HAS_ABORT_MARKER (1 = present, 0 = absent).
suggestion: |
$SUGG
---END_VERDICT---
VERDICT_EOF
fi
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.
- 10d ago First seen · 139 lines · 73 tokens per session scan A d10886f03d7f
incident-cycle is a skill published in the GitHub repository apokamo/kaji (12 stars, last pushed 2d ago), licensed Apache-2.0. It adds 73 tokens to every session and 1,569 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
superpowers-systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
rust-check
Run cargo check on the current Rust project to find compile errors.
debug
Reproduce, minimize, localize, identify root cause, and distinguish diagnosis from an authorized fix. Prefer root-cause over symptom patches.
langsmith-tracing
LangSmith tracing and debugging setup for LLM applications. Configure observability, capture traces, and enable debugging for LangChain/LangGraph agents.
behavior-contract
Bug condition/postcondition formalization as testable Behavior Contracts. Defines invariants that must be preserved across fixes.
quality-hooks
Language-specific auto-lint/format/typecheck pipeline. Supports Python (ruff+pyright), TypeScript (prettier+eslint+tsc), Go (gofmt+golangci-lint). Auto-fix and convergence loops.