---
title: "blast-radius"
url: "https://claudemods.dev/ja/builds/blast-radius-bb4550"
source: "https://github.com/cskwork/claude-code-mods/tree/main/blast-radius"
source_type: "github"
repo: "https://github.com/cskwork/claude-code-mods/tree/main/blast-radius"
author: "cskwork"
author_handle: "cskwork"
stars: 0
category: "セキュリティ・プライバシー"
categories: ["security"]
tags: ["bash", "claude-code", "destructive-commands", "dry-run", "hooks", "plugin", "safety"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add cskwork/claude-code-mods\nclaude plugin install blast-radius@claude-code-mods"
added: "2026-10-05T15:34:12.942Z"
updated: "2026-11-06T03:14:49Z"
locale: "ja"
content_locale: "ja"
---

# blast-radius

危険な Bash コマンド（再帰削除、破壊的な git、kubectl delete、SQL の消去）を dry-run し、先に Proceed か Cancel を確認します。

## Description

# claude-code-mods

Claude Code (2.1.287+) 用の mod です。function hooks で Claude Code の動作を監視、書き換え、応答し、独自の UI を描画します。[Getting started with Claude Code mods](https://claude.dev/blog/getting-started-with-claude-code-mods/) を基にしています。

ランディングページ：https://cskwork.github.io/claude-code-mods/

| Mod | 内容 |
| --- | --- |
| [token-weather](token-weather) | プロンプト上のコンテキストウィンドウを 1 行で予測します。☀ Clear → ↯ Compact soon、使用済み token、直近 12 ターンの sparkline、直前のターンが追加した量を表示します。 |
| [blast-radius](blast-radius) | 危険な Bash コマンド（再帰 rm、git reset --hard、git clean -f、force push、git branch -D、git stash drop/clear、kubectl delete、SQL DROP/TRUNCATE、migration）の前に影響範囲を dry-run し、**Proceed** または **Cancel** を確認します。キャンセルや閉じる操作は呼び出しを拒否します。 |
| [template](template) | 未インストールの mod テンプレートです。slash command、ステータス行、band、テスト付きの $.state 契約が含まれます。 |

## インストール

Claude Code 内で：

```
/plugin marketplace add cskwork/claude-code-mods
/plugin install token-weather@claude-code-mods
/plugin install blast-radius@claude-code-mods
/reload-plugins
```

## 新しい mod を作る

```bash
scripts/new-mod.sh my-mod "One line about what it does"
claude --plugin-dir "$PWD/my-mod"     # hot-reloads on every save
```

このスクリプトは template/ をコピーして名前を変更し、.claude-plugin/marketplace.json に追加してから claude plugin validate と claude plugin test を実行します。

mod は 3 つのファイルと任意の state 契約で構成されます。

```
my-mod/
├── .claude-plugin/plugin.json   name, version, description, "types"
├── hooks/hooks.json             { "modules": ["./register.tsx"] }
├── hooks/register.tsx           export const register: Register = on => { ... }
├── types/index.d.ts             PluginState contract for $.state values
└── tests/my-mod.test.ts         claude plugin test my-mod
```

注意が必要なルール：

- すべての hook は ($, e, next) です。next(e) で通過させ、next({ ...e, x }) で書き換え、呼ばなければ応答します。
- 値は $.state（atom / read / update）に保持します。ホットリロードのたびにモジュール変数はリセットされます。
- Node と DOM は使いません。ファイル、プロセス、時計、UI は $ を通し、UI 要素は $.ui.resolve(e) から取得します。
- テストの mock も hooks です：on('process.run', ($, e) => ({ value: ... }))。
- エンジンが mod をロードすると隣に .claude-plugin/types/ を書くため、tsc -p <mod> で型チェックできます（gitignore 済み）。

## チェック

```bash
for m in token-weather blast-radius template; do claude plugin validate $m && claude plugin test $m; done
```

## Install

```
claude plugin marketplace add cskwork/claude-code-mods
claude plugin install blast-radius@claude-code-mods
```

## Original README

# claude-code-mods

Mods for Claude Code (2.1.287+): plugins of function hooks that observe, rewrite or answer
what Claude Code does and draw their own UI. Based on
[Getting started with Claude Code mods](https://claude.dev/blog/getting-started-with-claude-code-mods/).

Landing page: https://cskwork.github.io/claude-code-mods/

| Mod | What it does |
| --- | --- |
| [`token-weather`](token-weather) | A one-line forecast of the context window above the prompt: ☀ Clear → ↯ Compact soon, tokens used, a sparkline of the last 12 turns, and how much the last turn added. |
| [`blast-radius`](blast-radius) | Before a risky Bash command runs (recursive `rm`, `git reset --hard`, `git clean -f`, force push, `git branch -D`, `git stash drop/clear`, `kubectl delete`, SQL `DROP`/`TRUNCATE`, migrations), dry-runs what it would touch and asks **Proceed** or **Cancel**. Cancel or dismiss denies the call. |
| [`template`](template) | Starter mod, not installed: a slash command, a status line entry, a band, and a `$.state` contract with a test. |

## Install

Inside Claude Code:

```
/plugin marketplace add cskwork/claude-code-mods
/plugin install token-weather@claude-code-mods
/plugin install blast-radius@claude-code-mods
/reload-plugins
```

## Make a new mod

```bash
scripts/new-mod.sh my-mod "One line about what it does"
claude --plugin-dir "$PWD/my-mod"     # hot-reloads on every save
```

The script copies `template/`, renames it, adds it to `.claude-plugin/marketplace.json`,
then runs `claude plugin validate` and `claude plugin test` on it.

A mod is three files plus an optional state contract:

```
my-mod/
├── .claude-plugin/plugin.json   name, version, description, "types"
├── hooks/hooks.json             { "modules": ["./register.tsx"] }
├── hooks/register.tsx           export const register: Register = on => { ... }
├── types/index.d.ts             PluginState contract for $.state values
└── tests/my-mod.test.ts         claude plugin test my-mod
```

Rules that bite:

- Every hook is `($, e, next)`. Call `next(e)` to pass on, `next({ ...e, x })` to rewrite, return without it to answer.
- Keep values in `$.state` (`atom` / `read` / `update`); module variables reset on every hot reload.
- No Node, no DOM: files, processes, clock and UI go through `$`. UI elements come from `$.ui.resolve(e)`.
- Test mocks are hooks too: `on('process.run', ($, e) => ({ value: ... }))`.
- After the engine loads a mod it writes `.claude-plugin/types/` beside it, so `tsc -p <mod>` type-checks it (gitignored).

## Check

```bash
for m in token-weather blast-radius template; do claude plugin validate $m && claude plugin test $m; done
```
