cc-safe-setup 9.3.0 → 9.5.0

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.
@@ -0,0 +1,25 @@
1
+ # Session Snapshot (auto-generated)
2
+ Updated: 2026-03-24T18:50:26+09:00
3
+
4
+ ## Git
5
+ - Branch: `main`
6
+ - Uncommitted changes: 1 file(s)
7
+ ```
8
+ M .claude/session-snapshot.md
9
+ ```
10
+ - Last commit: 2df307b checkpoint: auto-save 18:50:25
11
+
12
+ ## Recent Files
13
+ ```
14
+ ./.claude/session-snapshot.md
15
+ ./test.sh
16
+ ./CHANGELOG.md
17
+ ./examples/debug-leftover-guard.sh
18
+ ./examples/ci-skip-guard.sh
19
+ ./README.md
20
+ ./examples/rust/destructive_guard.rs
21
+ ./examples/package-script-guard.sh
22
+ ./examples/env-drift-guard.sh
23
+ ./examples/import-cycle-warn.sh
24
+ ```
25
+
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  **One command to make Claude Code safe for autonomous operation.** [日本語](docs/README.ja.md)
8
8
 
9
- 8 built-in + 104 examples = **112 hooks**. 34 CLI commands. 457 tests. 4 languages. [**Hub**](https://yurukusa.github.io/cc-safe-setup/hub.html) · [Cheat Sheet](https://yurukusa.github.io/cc-safe-setup/hooks-cheatsheet.html) · [Builder](https://yurukusa.github.io/cc-safe-setup/builder.html) · [FAQ](https://yurukusa.github.io/cc-safe-setup/faq.html) · [Examples](https://yurukusa.github.io/cc-safe-setup/by-example.html) · [Matrix](https://yurukusa.github.io/cc-safe-setup/matrix.html) · [Playground](https://yurukusa.github.io/cc-hook-registry/playground.html)
9
+ 8 built-in + 104 examples = **112 hooks**. 35 CLI commands. 457 tests. 5 languages. [**Hub**](https://yurukusa.github.io/cc-safe-setup/hub.html) · [Cheat Sheet](https://yurukusa.github.io/cc-safe-setup/hooks-cheatsheet.html) · [Builder](https://yurukusa.github.io/cc-safe-setup/builder.html) · [FAQ](https://yurukusa.github.io/cc-safe-setup/faq.html) · [Examples](https://yurukusa.github.io/cc-safe-setup/by-example.html) · [Matrix](https://yurukusa.github.io/cc-safe-setup/matrix.html) · [Playground](https://yurukusa.github.io/cc-hook-registry/playground.html)
10
10
 
11
11
  ```bash
12
12
  npx cc-safe-setup
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+ # ci-skip-guard.sh — Warn when commit message skips CI
3
+ # TRIGGER: PreToolUse MATCHER: "Bash"
4
+ COMMAND=$(cat | jq -r '.tool_input.command // empty' 2>/dev/null)
5
+ [ -z "$COMMAND" ] && exit 0
6
+ echo "$COMMAND" | grep -qE '^\s*git\s+commit' || exit 0
7
+ if echo "$COMMAND" | grep -qiE '\[skip ci\]|\[ci skip\]|\[no ci\]|--no-verify'; then
8
+ echo "WARNING: Commit will skip CI checks." >&2
9
+ echo "Remove [skip ci] or --no-verify unless you have a good reason." >&2
10
+ fi
11
+ exit 0
@@ -0,0 +1,12 @@
1
+ #!/bin/bash
2
+ # debug-leftover-guard.sh — Detect debug code in commits
3
+ # TRIGGER: PreToolUse MATCHER: "Bash"
4
+ COMMAND=$(cat | jq -r '.tool_input.command // empty' 2>/dev/null)
5
+ [ -z "$COMMAND" ] && exit 0
6
+ echo "$COMMAND" | grep -qE '^\s*git\s+commit' || exit 0
7
+ LEFTOVERS=$(git diff --cached 2>/dev/null | grep -cE '^\+.*(debugger|console\.debug|pdb\.set_trace|binding\.pry|pp\s|var_dump|print_r)' || echo 0)
8
+ if [ "$LEFTOVERS" -gt 0 ]; then
9
+ echo "WARNING: $LEFTOVERS debug statement(s) in staged changes." >&2
10
+ echo "Remove debugger/pdb/binding.pry before committing." >&2
11
+ fi
12
+ exit 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-safe-setup",
3
- "version": "9.3.0",
3
+ "version": "9.5.0",
4
4
  "description": "One command to make Claude Code safe. 59 hooks (8 built-in + 51 examples). 26 CLI commands: dashboard, create, audit, lint, diff, migrate, compare, generate-ci. 284 tests.",
5
5
  "main": "index.mjs",
6
6
  "bin": {