cc-safe-setup 7.7.0 → 7.8.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.
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 + 72 examples = **80 hooks**. 28 CLI commands. 409 tests. [Web Tool](https://yurukusa.github.io/cc-safe-setup/) · [Hooks Cheat Sheet](https://yurukusa.github.io/cc-safe-setup/hooks-cheatsheet.html) · [Playground](https://yurukusa.github.io/cc-hook-registry/playground.html) · [Troubleshooting](TROUBLESHOOTING.md)
9
+ 8 built-in + 75 examples = **83 hooks**. 28 CLI commands. 420 tests. [Web Tool](https://yurukusa.github.io/cc-safe-setup/) · [Hooks Cheat Sheet](https://yurukusa.github.io/cc-safe-setup/hooks-cheatsheet.html) · [Playground](https://yurukusa.github.io/cc-hook-registry/playground.html) · [Troubleshooting](TROUBLESHOOTING.md)
10
10
 
11
11
  ```bash
12
12
  npx cc-safe-setup
@@ -87,7 +87,7 @@ Each hook exists because a real incident happened without it.
87
87
  | `--scan [--apply]` | Tech stack detection |
88
88
  | `--export / --import` | Team config sharing |
89
89
  | `--verify` | Test each hook |
90
- | `--install-example <name>` | Install from 71 examples |
90
+ | `--install-example <name>` | Install from 75 examples |
91
91
  | `--examples [filter]` | Browse examples by keyword |
92
92
  | `--full` | All-in-one setup |
93
93
  | `--status` | Check installed hooks |
@@ -0,0 +1,33 @@
1
+ #!/bin/bash
2
+ # ================================================================
3
+ # revert-helper.sh — Show revert command when session ends badly
4
+ # ================================================================
5
+ # PURPOSE:
6
+ # When a Claude Code session ends (Stop event), check if there
7
+ # are uncommitted changes and show a one-line revert command.
8
+ # Makes it easy to undo everything Claude did if it went wrong.
9
+ #
10
+ # TRIGGER: Stop MATCHER: ""
11
+ # ================================================================
12
+
13
+ # Check if we're in a git repo
14
+ git rev-parse --git-dir &>/dev/null || exit 0
15
+
16
+ # Check for uncommitted changes
17
+ DIRTY=$(git status --porcelain 2>/dev/null)
18
+ [ -z "$DIRTY" ] && exit 0
19
+
20
+ COUNT=$(echo "$DIRTY" | wc -l)
21
+ LAST_COMMIT=$(git log --oneline -1 2>/dev/null | head -c 50)
22
+
23
+ echo "" >&2
24
+ echo "Session ended with $COUNT uncommitted change(s)." >&2
25
+ echo "Last commit: $LAST_COMMIT" >&2
26
+ echo "" >&2
27
+ echo "To undo all changes:" >&2
28
+ echo " git checkout -- . && git clean -fd" >&2
29
+ echo "" >&2
30
+ echo "To review changes:" >&2
31
+ echo " git diff --stat" >&2
32
+
33
+ exit 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-safe-setup",
3
- "version": "7.7.0",
3
+ "version": "7.8.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": {