cc-safe-setup 30.0.4 → 30.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -5
- package/SAFETY_CHECKLIST.md +8 -6
- package/action.yml +3 -3
- package/index.mjs +27 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ npx github:yurukusa/cc-safe-setup
|
|
|
9
9
|
|
|
10
10
|
The command is interactive: it shows what each hook does and lets you choose which to install into your `~/.claude/settings.json` (or a project-local `.claude/settings.json`). Nothing is installed without your confirmation. MIT licensed.
|
|
11
11
|
|
|
12
|
-
>
|
|
12
|
+
> **`npx cc-safe-setup` is current again.** The npm release sat at 29.8.0 (2026-04-20) for five months because publishing was blocked on a credential; **30.0.5 was published on 2026-09-24** and `latest` points at it. Either install command now gives you the same guards. If you installed from npm before that date you have 29.8.0, which lets twenty-five command shapes through that the current code blocks — the measurement, and how to check what you have, are in [The npm release was behind this repository](#the-npm-release-was-behind-this-repository) below.
|
|
13
13
|
|
|
14
14
|
Reading this in order, rather than by section: **[The Claude Code Safety Field Manual](https://leanpub.com/claude-code-safety-field-manual)** is this repository's documentation laid out as a path — the pre-flight checklist, what each guard actually refuses, how to make one fire on purpose so you can watch it work, and what to read in the log afterwards. The minimum price is zero.
|
|
15
15
|
|
|
@@ -28,7 +28,7 @@ links such as a gist or GitHub itself, or with no referrer recorded at all.)
|
|
|
28
28
|
| The hook runs, but never on the commands you care about | Your pattern is anchored where your commands are not | [A hook can be installed, current, registered — and still never see you](#a-hook-can-be-installed-current-registered--and-still-never-see-you) |
|
|
29
29
|
| You are not sure the hook does anything | You have not fired it on purpose yet | [Proving a hook fires](#proving-a-hook-fires) |
|
|
30
30
|
| The hooks are installed but feel out of date | Installed copies are snapshots and do not update themselves | [Your installed hooks do not update themselves](#your-installed-hooks-do-not-update-themselves) |
|
|
31
|
-
| `npx cc-safe-setup` behaves unlike this page | npm
|
|
31
|
+
| `npx cc-safe-setup` behaves unlike this page | You installed before 2026-09-24, when npm was still serving 29.8.0 | [The npm release was behind this repository](#the-npm-release-was-behind-this-repository) |
|
|
32
32
|
|
|
33
33
|
## Install as a Claude Code plugin
|
|
34
34
|
|
|
@@ -71,9 +71,13 @@ These are the exit codes, not the intent. Read them before trusting the row abov
|
|
|
71
71
|
Hooks stop a tool call before it runs. They are not a permission boundary — pair them with
|
|
72
72
|
`permissions.deny` and keep secrets outside the repository.
|
|
73
73
|
|
|
74
|
-
## The npm release
|
|
74
|
+
## The npm release was behind this repository
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
This is kept as a record, because the gap lasted five months and anyone who installed from npm in that window still has the old guards.
|
|
77
|
+
|
|
78
|
+
From 2026-04-20 to 2026-09-24, `npx cc-safe-setup` installed **29.8.0** while this repository moved on: the publishing credential had expired and the account's only second factor is a hardware key, so nothing automated could replace it. That is fixed — publishing now runs through npm trusted publishing (OIDC), and **30.0.5 went out on 2026-09-24**. `npx cc-safe-setup` and `npx github:yurukusa/cc-safe-setup` now install the same code.
|
|
79
|
+
|
|
80
|
+
If you installed before 2026-09-24, run `npx cc-safe-setup --outdated` to see which of your hooks differ from the current ones. The table below is what the difference was.
|
|
77
81
|
|
|
78
82
|
The gap is not cosmetic. I fired twenty-two command shapes at both versions on 2026-09-03, feeding each guard the same JSON on stdin and running it with `bash` — the shell the installer names when it registers the hook. The guards shipped in 29.8.0 allow **nine** of those shapes that 30.0.4 refuses. Nothing went the other way: there is no shape 29.8.0 blocks and 30.0.4 lets through, and two harmless controls (`rm -rf node_modules`, `git push origin feature`) are allowed by both. Only `exit 2` counts as blocked here; `exit 1`, `exit 127` and a crash all let the command run.
|
|
79
83
|
|
|
@@ -518,7 +522,9 @@ Contributions are welcome. Each hook should be a single shell script with a test
|
|
|
518
522
|
Every hook here exists because something broke first — a destroyed working tree, a credential
|
|
519
523
|
read that should not have happened, an overnight cost spike. The incident behind each one, what
|
|
520
524
|
the logs actually looked like, and what finally stopped it, are written up at length. Those
|
|
521
|
-
write-ups are books, and they are listed in [docs/books.md](docs/books.md).
|
|
525
|
+
write-ups are books, and they are listed in [docs/books.md](docs/books.md). In English there are
|
|
526
|
+
seven, sold together as [Claude Code Operator's Library: Complete Edition](https://leanpub.com/b/cc-operators-complete)
|
|
527
|
+
(from $39); the Field Manual linked at the top of this file is one of them and its minimum price is zero.
|
|
522
528
|
|
|
523
529
|
## License
|
|
524
530
|
|
package/SAFETY_CHECKLIST.md
CHANGED
|
@@ -53,9 +53,11 @@ Use this checklist before running Claude Code autonomously. Copy to your project
|
|
|
53
53
|
| Commit without tests | verify-before-commit | `--install-example verify-before-commit` |
|
|
54
54
|
| Session crash data loss | session-checkpoint | `--install-example session-checkpoint` |
|
|
55
55
|
|
|
56
|
-
##
|
|
57
|
-
|
|
58
|
-
The npm entry
|
|
59
|
-
current code blocks — measured 2026-09-03 across twenty-two shapes,
|
|
60
|
-
the other direction. The table is in the README.
|
|
61
|
-
|
|
56
|
+
## `github:` and the bare package name now install the same thing
|
|
57
|
+
|
|
58
|
+
The npm entry was frozen at 29.8.0 (2026-04-20) for five months and let twenty-five command
|
|
59
|
+
shapes through that the current code blocks — measured 2026-09-03 across twenty-two shapes,
|
|
60
|
+
with nothing failing in the other direction. The table is in the README. **30.0.5 was published
|
|
61
|
+
on 2026-09-24**, so either install command now gives you the guards this checklist describes.
|
|
62
|
+
If you installed before that date, run `npx cc-safe-setup --outdated` before you trust what you
|
|
63
|
+
have.
|
package/action.yml
CHANGED
|
@@ -29,9 +29,9 @@ runs:
|
|
|
29
29
|
shell: bash
|
|
30
30
|
run: |
|
|
31
31
|
echo "::group::Claude Code Safety Audit"
|
|
32
|
-
# Run the repository, not the npm entry.
|
|
33
|
-
# 29.8.0
|
|
34
|
-
#
|
|
32
|
+
# Run the repository, not the npm entry. npm caught up on 2026-09-24 (30.0.5
|
|
33
|
+
# after five months on 29.8.0), but the repository is still the newest code by
|
|
34
|
+
# definition: it needs no publish step, so this action cannot fall behind it.
|
|
35
35
|
npx -y github:yurukusa/cc-safe-setup --audit --json 2>/dev/null > /tmp/audit-json.txt || true
|
|
36
36
|
npx -y github:yurukusa/cc-safe-setup --audit 2>&1 | tee /tmp/audit-output.txt
|
|
37
37
|
echo "::endgroup::"
|
package/index.mjs
CHANGED
|
@@ -219,8 +219,8 @@ if (HELP) {
|
|
|
219
219
|
npx github:yurukusa/cc-safe-setup Install 8 safety hooks (30 sec)
|
|
220
220
|
npx github:yurukusa/cc-safe-setup --shield Maximum safety — one command
|
|
221
221
|
npx github:yurukusa/cc-safe-setup --doctor Diagnose hook problems
|
|
222
|
-
(
|
|
223
|
-
|
|
222
|
+
(npm serves 30.0.6 as of 2026-09-25; it sat at 29.8.0 / 2026-04-20 for five
|
|
223
|
+
months, so run --outdated if you installed before 2026-09-24)
|
|
224
224
|
|
|
225
225
|
Protect:
|
|
226
226
|
--protect .env Block edits to a specific file
|
|
@@ -7474,11 +7474,30 @@ async function main() {
|
|
|
7474
7474
|
// 旧価格の派生値として腐っていた(6冊 × ¥700 = ¥4,200 のずれ)。¥19,800 へ更新はしない。
|
|
7475
7475
|
// 次の値上げでも次の1冊でも同じように腐るうえ、この額は「売れた当時の値段の合計」ではないので、
|
|
7476
7476
|
// 社会的証明として掲げると買い手に実態より大きく見せることになる。冊数だけなら腐らない。
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7477
|
+
// 2026-09-25: この面(14日で clone 971回・607人が通る)が案内していた本は、
|
|
7478
|
+
// 日本語の Zenn だけだった。npx を走らせる人の大半は英語圏で、同じ事故の記録の
|
|
7479
|
+
// 英語版が Leanpub に7冊 在るのに1本もリンクが無かった。実測の裏づけ=
|
|
7480
|
+
// 9月の売上 ¥15,173 の100%が Leanpub の束で、Zenn は2か月 ¥0。
|
|
7481
|
+
// 並べ替えの原則=(1)いちばん役に立つ無料の物を先頭に置く
|
|
7482
|
+
// (2)有料は「読む前に判断できる材料」(頁数と無料見本)だけ添えて1段 下げる。
|
|
7483
|
+
// 全文=~/ops/economics/leanpub-who-actually-paid-2026-09-25.md
|
|
7484
|
+
console.log(' ' + c.blue + 'Field Manual (free):' + c.reset + ' this repository\'s documentation laid out as a path');
|
|
7485
|
+
console.log(' ' + c.dim + ' The pre-flight checklist, what each guard actually refuses, how to make one fire on' + c.reset);
|
|
7486
|
+
console.log(' ' + c.dim + ' purpose so you can watch it work, and what to read in the log afterwards.' + c.reset);
|
|
7487
|
+
console.log(' ' + c.dim + ' 124 pages, minimum price zero. Everything in it is also in this repository.' + c.reset);
|
|
7488
|
+
console.log(' ' + c.dim + ' https://leanpub.com/claude-code-safety-field-manual' + c.reset);
|
|
7489
|
+
console.log();
|
|
7490
|
+
console.log(' ' + c.blue + 'Longer write-ups (EN):' + c.reset + ' the incident behind each hook, at length — six more titles');
|
|
7491
|
+
console.log(' ' + c.dim + ' Safety Mastery 66p / Migration Playbook 251p / Token Savings 89p /' + c.reset);
|
|
7492
|
+
console.log(' ' + c.dim + ' AGENTS.md Interop 49p / CLAUDE.md Under Test 86p / Claude Code Safety 68p.' + c.reset);
|
|
7493
|
+
console.log(' ' + c.dim + ' Every one has a free sample you can read before deciding.' + c.reset);
|
|
7494
|
+
console.log(' ' + c.dim + ' https://leanpub.com/b/cc-operators-complete (all seven together, from $39)' + c.reset);
|
|
7495
|
+
console.log();
|
|
7496
|
+
console.log(' ' + c.blue + 'Japanese editions:' + c.reset + ' 13 purchases since March 2026 — https://zenn.dev/yurukusa');
|
|
7497
|
+
console.log(' ' + c.dim + ' Anthropic公式ガイドにない事故防止 (97 chapters, free Chapters 1-3)' + c.reset);
|
|
7498
|
+
console.log(' ' + c.dim + ' https://zenn.dev/yurukusa/books/6076c23b1cb18b' + c.reset);
|
|
7499
|
+
console.log(' ' + c.dim + ' Claude Codeのトークン消費を半分にする (¥2,500, free Chapter 1)' + c.reset);
|
|
7500
|
+
console.log(' ' + c.dim + ' https://zenn.dev/yurukusa/books/token-savings-guide' + c.reset);
|
|
7482
7501
|
// 2026-08-13: 12冊の露出と実売を突き合わせたら、いちばん高い ¥3,000 の企業パックは
|
|
7483
7502
|
// Qiita 234本のうち0本からしか指されておらず、この面でも名前が出ず「10 more titles」に埋もれていた。
|
|
7484
7503
|
// 生涯0件は市場の答えではなく、一度も機会を与えていないだけ。
|
|
@@ -7487,7 +7506,7 @@ async function main() {
|
|
|
7487
7506
|
// 実測=~/ops/economics/exposure-vs-sales-2026-08-13.md
|
|
7488
7507
|
console.log(' ' + c.dim + ' Claude Code チーム/企業導入 安全パック (¥3,000, 9 chapters — for whoever has to sign off on team use)' + c.reset);
|
|
7489
7508
|
console.log(' ' + c.dim + ' https://zenn.dev/yurukusa/books/cc-team-safety-pack' + c.reset);
|
|
7490
|
-
console.log(' ' + c.dim + ' 9 more titles at
|
|
7509
|
+
console.log(' ' + c.dim + ' 9 more titles at the same place (Skills recipes, 800h log, AGENTS.md interop)' + c.reset);
|
|
7491
7510
|
console.log();
|
|
7492
7511
|
console.log(' ' + c.blue + 'Recurring track:' + c.reset + ' CC Safety Lab Founder (¥500/mo, Ko-fi, grandfathered)');
|
|
7493
7512
|
console.log(' ' + c.dim + ' Monthly digest of new failure clusters + cc-safe-setup hooks shipped that month.' + c.reset);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-safe-setup",
|
|
3
|
-
"version": "30.0.
|
|
3
|
+
"version": "30.0.6",
|
|
4
4
|
"description": "Safety hooks for Claude Code: PreToolUse/PostToolUse/Stop guards that block destructive or irreversible operations at the tool boundary and surface silent failures. Interactive installer, plain shell scripts, no npm dependencies (the hooks read their JSON input with jq, python3 or node).",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"bin": {
|
|
@@ -47,4 +47,4 @@
|
|
|
47
47
|
"type": "github",
|
|
48
48
|
"url": "https://github.com/sponsors/yurukusa"
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|