summaryrefslogtreecommitdiff
path: root/plugins/hookify/examples
diff options
context:
space:
mode:
authorNoah Zweben MacBook <noahz@anthropic.com>2025-11-20 11:47:24 -0800
committerNoah Zweben MacBook <noahz@anthropic.com>2025-11-20 11:47:24 -0800
commit4ca561fb8532594e7a5faef945e85096fcec0616 (patch)
tree0218e6f274b7fb9872d470da3b4dc1f6b28dd9e8 /plugins/hookify/examples
creating intital scaffolding for claude code pluginsnoahz/initial_scaffold
Diffstat (limited to 'plugins/hookify/examples')
-rw-r--r--plugins/hookify/examples/console-log-warning.local.md14
-rw-r--r--plugins/hookify/examples/dangerous-rm.local.md14
-rw-r--r--plugins/hookify/examples/require-tests-stop.local.md22
-rw-r--r--plugins/hookify/examples/sensitive-files-warning.local.md18
4 files changed, 68 insertions, 0 deletions
diff --git a/plugins/hookify/examples/console-log-warning.local.md b/plugins/hookify/examples/console-log-warning.local.md
new file mode 100644
index 00000000..c9352e75
--- /dev/null
+++ b/plugins/hookify/examples/console-log-warning.local.md
@@ -0,0 +1,14 @@
+---
+name: warn-console-log
+enabled: true
+event: file
+pattern: console\.log\(
+action: warn
+---
+
+🔍 **Console.log detected**
+
+You're adding a console.log statement. Please consider:
+- Is this for debugging or should it be proper logging?
+- Will this ship to production?
+- Should this use a logging library instead?
diff --git a/plugins/hookify/examples/dangerous-rm.local.md b/plugins/hookify/examples/dangerous-rm.local.md
new file mode 100644
index 00000000..8226eb19
--- /dev/null
+++ b/plugins/hookify/examples/dangerous-rm.local.md
@@ -0,0 +1,14 @@
+---
+name: block-dangerous-rm
+enabled: true
+event: bash
+pattern: rm\s+-rf
+action: block
+---
+
+⚠️ **Dangerous rm command detected!**
+
+This command could delete important files. Please:
+- Verify the path is correct
+- Consider using a safer approach
+- Make sure you have backups
diff --git a/plugins/hookify/examples/require-tests-stop.local.md b/plugins/hookify/examples/require-tests-stop.local.md
new file mode 100644
index 00000000..87039186
--- /dev/null
+++ b/plugins/hookify/examples/require-tests-stop.local.md
@@ -0,0 +1,22 @@
+---
+name: require-tests-run
+enabled: false
+event: stop
+action: block
+conditions:
+ - field: transcript
+ operator: not_contains
+ pattern: npm test|pytest|cargo test
+---
+
+**Tests not detected in transcript!**
+
+Before stopping, please run tests to verify your changes work correctly.
+
+Look for test commands like:
+- `npm test`
+- `pytest`
+- `cargo test`
+
+**Note:** This rule blocks stopping if no test commands appear in the transcript.
+Enable this rule only when you want strict test enforcement.
diff --git a/plugins/hookify/examples/sensitive-files-warning.local.md b/plugins/hookify/examples/sensitive-files-warning.local.md
new file mode 100644
index 00000000..ae92971d
--- /dev/null
+++ b/plugins/hookify/examples/sensitive-files-warning.local.md
@@ -0,0 +1,18 @@
+---
+name: warn-sensitive-files
+enabled: true
+event: file
+action: warn
+conditions:
+ - field: file_path
+ operator: regex_match
+ pattern: \.env$|\.env\.|credentials|secrets
+---
+
+🔐 **Sensitive file detected**
+
+You're editing a file that may contain sensitive data:
+- Ensure credentials are not hardcoded
+- Use environment variables for secrets
+- Verify this file is in .gitignore
+- Consider using a secrets manager