cc-safe-setup 29.6.32 → 29.6.36

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.
Files changed (415) hide show
  1. package/COOKBOOK.md +70 -0
  2. package/README.md +6 -2
  3. package/examples/absolute-rule-enforcer.sh +42 -0
  4. package/examples/allow-claude-settings.sh +2 -0
  5. package/examples/allow-git-hooks-dir.sh +2 -0
  6. package/examples/allow-protected-dirs.sh +2 -0
  7. package/examples/allowlist.sh +2 -0
  8. package/examples/ansible-vault-guard.sh +2 -0
  9. package/examples/auto-approve-build.sh +2 -0
  10. package/examples/auto-approve-compound-git.sh +2 -0
  11. package/examples/auto-approve-docker.sh +2 -0
  12. package/examples/auto-approve-git-read.sh +2 -0
  13. package/examples/auto-approve-python.sh +2 -0
  14. package/examples/auto-approve-readonly-tools.sh +2 -0
  15. package/examples/auto-approve-ssh.sh +2 -0
  16. package/examples/auto-approve-test.sh +2 -0
  17. package/examples/auto-checkpoint.sh +2 -0
  18. package/examples/auto-git-checkpoint.sh +2 -0
  19. package/examples/auto-mode-safe-commands.sh +2 -0
  20. package/examples/auto-snapshot.sh +2 -0
  21. package/examples/backup-before-refactor.sh +2 -0
  22. package/examples/banned-command-guard.sh +3 -3
  23. package/examples/bash-domain-allowlist.sh +72 -0
  24. package/examples/bash-safety-auto-deny.sh +56 -0
  25. package/examples/bash-secret-output-detector.sh +68 -0
  26. package/examples/bash-timeout-guard.sh +2 -0
  27. package/examples/bashrc-safety-check.sh +59 -0
  28. package/examples/bg-task-cooldown-guard.sh +46 -0
  29. package/examples/block-database-wipe.sh +2 -0
  30. package/examples/branch-name-check.sh +2 -0
  31. package/examples/branch-naming-convention.sh +2 -0
  32. package/examples/cargo-publish-guard.sh +2 -0
  33. package/examples/check-abort-controller.sh +2 -0
  34. package/examples/check-accessibility.sh +2 -0
  35. package/examples/check-aria-labels.sh +2 -0
  36. package/examples/check-async-await-consistency.sh +2 -0
  37. package/examples/check-before-act-enforcer.sh +47 -0
  38. package/examples/check-charset-meta.sh +2 -0
  39. package/examples/check-cleanup-effect.sh +2 -0
  40. package/examples/check-content-type.sh +2 -0
  41. package/examples/check-controlled-input.sh +2 -0
  42. package/examples/check-cookie-flags.sh +2 -0
  43. package/examples/check-cors-config.sh +2 -0
  44. package/examples/check-csp-headers.sh +2 -0
  45. package/examples/check-csrf-protection.sh +2 -0
  46. package/examples/check-debounce.sh +2 -0
  47. package/examples/check-dependency-age.sh +2 -0
  48. package/examples/check-dependency-license.sh +2 -0
  49. package/examples/check-dockerfile-best-practice.sh +2 -0
  50. package/examples/check-error-boundaries.sh +2 -0
  51. package/examples/check-error-class.sh +2 -0
  52. package/examples/check-error-handling.sh +2 -0
  53. package/examples/check-error-logging.sh +2 -0
  54. package/examples/check-error-message.sh +2 -0
  55. package/examples/check-error-page.sh +2 -0
  56. package/examples/check-error-stack.sh +2 -0
  57. package/examples/check-favicon.sh +2 -0
  58. package/examples/check-form-validation.sh +2 -0
  59. package/examples/check-git-hooks-compat.sh +2 -0
  60. package/examples/check-https-redirect.sh +2 -0
  61. package/examples/check-image-optimization.sh +2 -0
  62. package/examples/check-input-validation.sh +2 -0
  63. package/examples/check-key-prop.sh +2 -0
  64. package/examples/check-lang-attribute.sh +2 -0
  65. package/examples/check-lazy-loading.sh +2 -0
  66. package/examples/check-loading-state.sh +2 -0
  67. package/examples/check-memo-deps.sh +2 -0
  68. package/examples/check-meta-description.sh +2 -0
  69. package/examples/check-npm-scripts-exist.sh +2 -0
  70. package/examples/check-null-check.sh +2 -0
  71. package/examples/check-package-size.sh +2 -0
  72. package/examples/check-pagination.sh +2 -0
  73. package/examples/check-port-availability.sh +2 -0
  74. package/examples/check-promise-all.sh +2 -0
  75. package/examples/check-prop-types.sh +2 -0
  76. package/examples/check-rate-limiting.sh +2 -0
  77. package/examples/check-responsive-design.sh +2 -0
  78. package/examples/check-retry-logic.sh +2 -0
  79. package/examples/check-return-types.sh +2 -0
  80. package/examples/check-semantic-html.sh +2 -0
  81. package/examples/check-semantic-versioning.sh +2 -0
  82. package/examples/check-suspense-fallback.sh +2 -0
  83. package/examples/check-test-naming.sh +2 -0
  84. package/examples/check-timeout-cleanup.sh +2 -0
  85. package/examples/check-tls-version.sh +2 -0
  86. package/examples/check-type-coercion.sh +2 -0
  87. package/examples/check-unsubscribe.sh +2 -0
  88. package/examples/check-viewport-meta.sh +2 -0
  89. package/examples/check-worker-terminate.sh +2 -0
  90. package/examples/checkpoint-tamper-guard.sh +2 -0
  91. package/examples/chmod-guard.sh +2 -0
  92. package/examples/chown-guard.sh +2 -0
  93. package/examples/ci-workflow-guard.sh +59 -0
  94. package/examples/classifier-fallback-allow.sh +2 -0
  95. package/examples/claude-cache-gc.sh +15 -0
  96. package/examples/claudeignore-enforce-guard.sh +60 -0
  97. package/examples/claudemd-enforcer.sh +2 -0
  98. package/examples/claudemd-violation-detector.sh +36 -0
  99. package/examples/clear-command-confirm-guard.sh +21 -0
  100. package/examples/commit-message-check.sh +2 -0
  101. package/examples/compact-blocker.sh +25 -0
  102. package/examples/composer-guard.sh +2 -0
  103. package/examples/compound-command-allow.sh +2 -0
  104. package/examples/consecutive-failure-circuit-breaker.sh +49 -0
  105. package/examples/console-log-count.sh +2 -0
  106. package/examples/context-compact-advisor.sh +16 -0
  107. package/examples/core-file-protect-guard.sh +91 -0
  108. package/examples/cors-star-warn.sh +2 -0
  109. package/examples/credential-exfil-guard.sh +2 -0
  110. package/examples/credential-file-cat-guard.sh +2 -0
  111. package/examples/cron-modification-guard.sh +40 -0
  112. package/examples/cwd-drift-detector.sh +47 -0
  113. package/examples/cwd-project-boundary-guard.sh +50 -0
  114. package/examples/denied-action-retry-guard.sh +41 -0
  115. package/examples/dependency-install-guard.sh +2 -0
  116. package/examples/deploy-guard.sh +2 -0
  117. package/examples/deploy-path-verify-guard.sh +62 -0
  118. package/examples/deployment-verify-guard.sh +81 -0
  119. package/examples/django-migrate-guard.sh +2 -0
  120. package/examples/docker-volume-guard.sh +2 -0
  121. package/examples/dockerfile-latest-guard.sh +2 -0
  122. package/examples/dotenv-commit-guard.sh +44 -0
  123. package/examples/dotenv-example-sync.sh +55 -0
  124. package/examples/dotnet-build-on-edit.sh +2 -0
  125. package/examples/drizzle-migrate-guard.sh +2 -0
  126. package/examples/edit-counter-test-gate.sh +44 -0
  127. package/examples/edit-error-counter.sh +2 -0
  128. package/examples/edit-guard.sh +2 -0
  129. package/examples/edit-old-string-validator.sh +37 -0
  130. package/examples/edit-retry-loop-guard.sh +2 -0
  131. package/examples/edit-verify.sh +2 -0
  132. package/examples/encoding-preserve-guard.sh +34 -0
  133. package/examples/enforce-tests.sh +2 -0
  134. package/examples/env-inherit-guard.sh +2 -0
  135. package/examples/env-inline-secret-guard.sh +36 -0
  136. package/examples/env-prod-guard.sh +2 -0
  137. package/examples/env-required-check.sh +2 -0
  138. package/examples/env-var-check.sh +2 -0
  139. package/examples/expo-eject-guard.sh +2 -0
  140. package/examples/export-overwrite-guard.sh +29 -0
  141. package/examples/file-change-tracker.sh +2 -0
  142. package/examples/file-change-undo-tracker.sh +46 -0
  143. package/examples/file-recycle-bin.sh +48 -0
  144. package/examples/file-size-limit.sh +2 -0
  145. package/examples/five-hundred-milestone.sh +2 -0
  146. package/examples/flask-debug-guard.sh +2 -0
  147. package/examples/gem-push-guard.sh +2 -0
  148. package/examples/git-checkout-safety-guard.sh +2 -0
  149. package/examples/git-config-guard.sh +2 -0
  150. package/examples/git-crypt-worktree-guard.sh +36 -0
  151. package/examples/git-hook-bypass-guard.sh +2 -0
  152. package/examples/git-merge-conflict-prevent.sh +2 -0
  153. package/examples/git-message-length.sh +2 -0
  154. package/examples/git-operations-require-approval.sh +99 -0
  155. package/examples/git-show-flag-sanitizer.sh +41 -0
  156. package/examples/git-stash-before-danger.sh +2 -0
  157. package/examples/git-submodule-guard.sh +2 -0
  158. package/examples/git-tag-guard.sh +2 -0
  159. package/examples/github-actions-secret-guard.sh +59 -0
  160. package/examples/gitignore-check.sh +2 -0
  161. package/examples/gitops-drift-guard.sh +53 -0
  162. package/examples/go-mod-tidy-warn.sh +2 -0
  163. package/examples/hallucination-url-check.sh +2 -0
  164. package/examples/hardcoded-ip-guard.sh +2 -0
  165. package/examples/headless-empty-result-guard.sh +46 -0
  166. package/examples/headless-stop-guard.sh +43 -0
  167. package/examples/helm-install-guard.sh +2 -0
  168. package/examples/issue-draft-redact-guard.sh +45 -0
  169. package/examples/java-compile-on-edit.sh +2 -0
  170. package/examples/k8s-production-guard.sh +77 -0
  171. package/examples/laravel-artisan-guard.sh +2 -0
  172. package/examples/large-file-guard.sh +2 -0
  173. package/examples/line-ending-guard.sh +30 -0
  174. package/examples/log-level-guard.sh +2 -0
  175. package/examples/magic-number-warn.sh +2 -0
  176. package/examples/max-edit-size-guard.sh +2 -0
  177. package/examples/max-file-count-guard.sh +2 -0
  178. package/examples/max-file-delete-count.sh +2 -0
  179. package/examples/max-function-length.sh +2 -0
  180. package/examples/max-import-count.sh +2 -0
  181. package/examples/max-subagent-count.sh +2 -0
  182. package/examples/mcp-orphan-process-guard.sh +39 -0
  183. package/examples/mcp-server-allowlist.sh +45 -0
  184. package/examples/mcp-tool-audit-log.sh +41 -0
  185. package/examples/mcp-tool-guard.sh +2 -0
  186. package/examples/migration-verify-guard.sh +44 -0
  187. package/examples/monorepo-scope-guard.sh +2 -0
  188. package/examples/network-exfil-guard.sh +61 -0
  189. package/examples/network-guard.sh +2 -0
  190. package/examples/nextjs-env-guard.sh +2 -0
  191. package/examples/no-absolute-import.sh +2 -0
  192. package/examples/no-alert-confirm-prompt.sh +2 -0
  193. package/examples/no-any-type.sh +2 -0
  194. package/examples/no-any-typescript.sh +2 -0
  195. package/examples/no-assignment-in-condition.sh +2 -0
  196. package/examples/no-callback-hell.sh +2 -0
  197. package/examples/no-catch-all-route.sh +2 -0
  198. package/examples/no-circular-dependency.sh +2 -0
  199. package/examples/no-class-in-functional.sh +2 -0
  200. package/examples/no-cleartext-storage.sh +2 -0
  201. package/examples/no-commented-code.sh +2 -0
  202. package/examples/no-commit-fixup.sh +2 -0
  203. package/examples/no-console-assert.sh +2 -0
  204. package/examples/no-console-error-swallow.sh +2 -0
  205. package/examples/no-console-in-prod.sh +2 -0
  206. package/examples/no-console-log.sh +2 -0
  207. package/examples/no-console-time.sh +2 -0
  208. package/examples/no-cors-wildcard.sh +2 -0
  209. package/examples/no-curl-upload.sh +2 -0
  210. package/examples/no-dangerouslySetInnerHTML.sh +2 -0
  211. package/examples/no-dangling-await.sh +2 -0
  212. package/examples/no-debug-in-commit.sh +2 -0
  213. package/examples/no-deep-nesting.sh +2 -0
  214. package/examples/no-deep-relative-import.sh +2 -0
  215. package/examples/no-default-credentials.sh +2 -0
  216. package/examples/no-deprecated-api.sh +2 -0
  217. package/examples/no-direct-dom-manipulation.sh +2 -0
  218. package/examples/no-disabled-test.sh +2 -0
  219. package/examples/no-document-cookie.sh +2 -0
  220. package/examples/no-document-write.sh +2 -0
  221. package/examples/no-empty-function.sh +2 -0
  222. package/examples/no-eval-in-template.sh +2 -0
  223. package/examples/no-eval-template.sh +2 -0
  224. package/examples/no-eval.sh +2 -0
  225. package/examples/no-exec-user-input.sh +2 -0
  226. package/examples/no-expose-internal-ids.sh +2 -0
  227. package/examples/no-floating-promises.sh +2 -0
  228. package/examples/no-force-install.sh +2 -0
  229. package/examples/no-git-rebase-public.sh +2 -0
  230. package/examples/no-global-state.sh +2 -0
  231. package/examples/no-hardcoded-port.sh +2 -0
  232. package/examples/no-hardcoded-url.sh +2 -0
  233. package/examples/no-helmet-missing.sh +2 -0
  234. package/examples/no-http-url.sh +2 -0
  235. package/examples/no-http-without-https.sh +2 -0
  236. package/examples/no-index-as-key.sh +2 -0
  237. package/examples/no-infinite-scroll-mem.sh +2 -0
  238. package/examples/no-inline-event-handler.sh +2 -0
  239. package/examples/no-inline-handler.sh +2 -0
  240. package/examples/no-inline-style.sh +2 -0
  241. package/examples/no-inline-styles.sh +2 -0
  242. package/examples/no-innerhtml.sh +2 -0
  243. package/examples/no-install-global.sh +2 -0
  244. package/examples/no-jwt-in-url.sh +2 -0
  245. package/examples/no-large-commit.sh +2 -0
  246. package/examples/no-localhost-expose.sh +2 -0
  247. package/examples/no-long-switch.sh +2 -0
  248. package/examples/no-magic-number.sh +2 -0
  249. package/examples/no-md5-sha1.sh +2 -0
  250. package/examples/no-memory-leak-interval.sh +2 -0
  251. package/examples/no-mixed-line-endings.sh +2 -0
  252. package/examples/no-mutation-in-reducer.sh +2 -0
  253. package/examples/no-mutation-observer-leak.sh +2 -0
  254. package/examples/no-nested-subscribe.sh +2 -0
  255. package/examples/no-nested-ternary.sh +2 -0
  256. package/examples/no-network-exfil.sh +2 -0
  257. package/examples/no-new-array-fill.sh +2 -0
  258. package/examples/no-object-freeze-mutation.sh +2 -0
  259. package/examples/no-open-redirect.sh +2 -0
  260. package/examples/no-output-truncation.sh +44 -0
  261. package/examples/no-package-downgrade.sh +2 -0
  262. package/examples/no-package-lock-edit.sh +2 -0
  263. package/examples/no-path-join-user-input.sh +2 -0
  264. package/examples/no-port-bind.sh +2 -0
  265. package/examples/no-process-exit.sh +2 -0
  266. package/examples/no-prototype-pollution.sh +2 -0
  267. package/examples/no-push-without-ci.sh +2 -0
  268. package/examples/no-raw-ref.sh +2 -0
  269. package/examples/no-redundant-fragment.sh +2 -0
  270. package/examples/no-render-in-loop.sh +2 -0
  271. package/examples/no-root-user-docker.sh +2 -0
  272. package/examples/no-root-write.sh +2 -0
  273. package/examples/no-secrets-in-args.sh +2 -0
  274. package/examples/no-secrets-in-logs.sh +2 -0
  275. package/examples/no-sensitive-log.sh +2 -0
  276. package/examples/no-side-effects-in-render.sh +2 -0
  277. package/examples/no-sleep-in-hooks.sh +2 -0
  278. package/examples/no-star-import-python.sh +2 -0
  279. package/examples/no-string-concat-sql.sh +2 -0
  280. package/examples/no-sudo-guard.sh +2 -0
  281. package/examples/no-sync-external-call.sh +2 -0
  282. package/examples/no-sync-fs.sh +2 -0
  283. package/examples/no-table-layout.sh +2 -0
  284. package/examples/no-throw-string.sh +2 -0
  285. package/examples/no-todo-in-merge.sh +2 -0
  286. package/examples/no-todo-in-production.sh +2 -0
  287. package/examples/no-todo-without-issue.sh +2 -0
  288. package/examples/no-triple-slash-ref.sh +2 -0
  289. package/examples/no-unreachable-code.sh +2 -0
  290. package/examples/no-unused-import.sh +2 -0
  291. package/examples/no-unused-state.sh +2 -0
  292. package/examples/no-var-keyword.sh +2 -0
  293. package/examples/no-wildcard-cors.sh +2 -0
  294. package/examples/no-wildcard-import.sh +2 -0
  295. package/examples/no-window-location.sh +2 -0
  296. package/examples/no-with-statement.sh +2 -0
  297. package/examples/no-write-outside-src.sh +2 -0
  298. package/examples/no-xml-external-entity.sh +2 -0
  299. package/examples/notify-waiting.sh +2 -0
  300. package/examples/npm-audit-warn.sh +2 -0
  301. package/examples/npm-publish-guard.sh +2 -0
  302. package/examples/npm-script-injection.sh +2 -0
  303. package/examples/npm-supply-chain-guard.sh +92 -0
  304. package/examples/nuxt-config-guard.sh +2 -0
  305. package/examples/output-secret-mask.sh +2 -0
  306. package/examples/package-json-guard.sh +2 -0
  307. package/examples/parallel-session-guard.sh +2 -0
  308. package/examples/path-traversal-guard.sh +2 -0
  309. package/examples/permission-audit-log.sh +2 -0
  310. package/examples/permission-entry-validator.sh +48 -0
  311. package/examples/permission-pattern-auto-allow.sh +50 -0
  312. package/examples/php-lint-on-edit.sh +2 -0
  313. package/examples/pip-publish-guard.sh +2 -0
  314. package/examples/plain-language-danger-warn.sh +37 -0
  315. package/examples/plan-mode-enforcer.sh +2 -0
  316. package/examples/plugin-process-cleanup.sh +50 -0
  317. package/examples/polyglot-rm-guard.sh +59 -0
  318. package/examples/pr-description-check.sh +2 -0
  319. package/examples/pre-compact-knowledge-save.sh +53 -0
  320. package/examples/pre-compact-transcript-export.sh +85 -0
  321. package/examples/prefer-builtin-tools.sh +2 -0
  322. package/examples/prefer-const.sh +2 -0
  323. package/examples/prefer-dedicated-tools.sh +55 -0
  324. package/examples/prefer-optional-chaining.sh +2 -0
  325. package/examples/prisma-migrate-guard.sh +2 -0
  326. package/examples/prompt-injection-detector.sh +2 -0
  327. package/examples/prompt-length-guard.sh +2 -0
  328. package/examples/protect-dotfiles.sh +2 -0
  329. package/examples/public-repo-push-guard.sh +58 -0
  330. package/examples/push-requires-test-pass-record.sh +2 -0
  331. package/examples/push-requires-test-pass.sh +2 -0
  332. package/examples/rails-migration-guard.sh +2 -0
  333. package/examples/rate-limit-guard.sh +2 -0
  334. package/examples/read-all-files-enforcer.sh +51 -0
  335. package/examples/read-audit-log.sh +34 -0
  336. package/examples/readme-exists-check.sh +2 -0
  337. package/examples/redis-flushall-guard.sh +2 -0
  338. package/examples/rm-safety-net.sh +2 -0
  339. package/examples/role-tool-guard.sh +69 -0
  340. package/examples/ruby-lint-on-edit.sh +2 -0
  341. package/examples/schema-migration-guard.sh +57 -0
  342. package/examples/scope-guard.sh +2 -0
  343. package/examples/secret-file-read-guard.sh +74 -0
  344. package/examples/self-modify-bypass-guard.sh +54 -0
  345. package/examples/sensitive-log-guard.sh +2 -0
  346. package/examples/session-checkpoint.sh +2 -0
  347. package/examples/session-duration-guard.sh +51 -0
  348. package/examples/session-end-logger.sh +57 -0
  349. package/examples/session-error-rate-monitor.sh +65 -0
  350. package/examples/session-health-monitor.sh +61 -0
  351. package/examples/session-memory-watchdog.sh +17 -0
  352. package/examples/session-permission-reset-guard.sh +39 -0
  353. package/examples/session-resume-env-fix.sh +49 -0
  354. package/examples/session-state-saver.sh +2 -0
  355. package/examples/session-summary-stop.sh +2 -0
  356. package/examples/session-summary.sh +2 -0
  357. package/examples/session-token-counter.sh +2 -0
  358. package/examples/settings-auto-backup.sh +53 -0
  359. package/examples/settings-mutation-detector.sh +45 -0
  360. package/examples/shell-wrapper-guard.sh +2 -0
  361. package/examples/skill-gate.sh +2 -0
  362. package/examples/skill-injection-detector.sh +41 -0
  363. package/examples/spec-file-scope-guard.sh +69 -0
  364. package/examples/spring-profile-guard.sh +2 -0
  365. package/examples/sql-injection-detect.sh +2 -0
  366. package/examples/subagent-budget-guard.sh +2 -0
  367. package/examples/subagent-claudemd-inject.sh +45 -0
  368. package/examples/subagent-context-size-guard.sh +26 -0
  369. package/examples/subagent-tool-call-limiter.sh +48 -0
  370. package/examples/svelte-lint-on-edit.sh +2 -0
  371. package/examples/swift-build-on-edit.sh +2 -0
  372. package/examples/symlink-protect.sh +12 -0
  373. package/examples/system-message-workaround.sh +44 -0
  374. package/examples/system-package-guard.sh +2 -0
  375. package/examples/temp-file-cleanup-stop.sh +28 -0
  376. package/examples/temp-file-cleanup.sh +2 -0
  377. package/examples/terminal-state-restore.sh +23 -0
  378. package/examples/test-after-edit.sh +2 -0
  379. package/examples/test-before-commit.sh +13 -14
  380. package/examples/test-before-push.sh +2 -0
  381. package/examples/test-exit-code-verify.sh +2 -0
  382. package/examples/timeout-guard.sh +2 -0
  383. package/examples/timezone-guard.sh +2 -0
  384. package/examples/tmp-output-size-guard.sh +46 -0
  385. package/examples/todo-check.sh +2 -0
  386. package/examples/todo-deadline-warn.sh +48 -0
  387. package/examples/token-budget-per-task.sh +55 -0
  388. package/examples/token-spike-alert.sh +51 -0
  389. package/examples/token-usage-tracker.sh +14 -0
  390. package/examples/turbo-cache-guard.sh +2 -0
  391. package/examples/uncommitted-changes-stop.sh +2 -0
  392. package/examples/uncommitted-work-shield.sh +37 -0
  393. package/examples/usage-warn.sh +2 -0
  394. package/examples/verify-before-commit.sh +2 -0
  395. package/examples/virtual-cwd-helper.sh +40 -0
  396. package/examples/vue-lint-on-edit.sh +2 -0
  397. package/examples/webfetch-domain-allow.sh +96 -0
  398. package/examples/worktree-delete-guard.sh +43 -0
  399. package/examples/worktree-memory-guard.sh +47 -0
  400. package/examples/worktree-path-validator.sh +42 -0
  401. package/examples/worktree-project-unify.sh +19 -0
  402. package/examples/worktree-unmerged-guard.sh +2 -0
  403. package/examples/write-overwrite-confirm.sh +40 -0
  404. package/examples/write-secret-guard.sh +2 -0
  405. package/examples/write-shrink-guard.sh +46 -0
  406. package/examples/write-test-ratio.sh +2 -0
  407. package/index.mjs +631 -138
  408. package/package.json +2 -2
  409. package/scripts/generate-categories.mjs +206 -0
  410. package/scripts.json +4 -1
  411. package/test.sh.new_tests +0 -0
  412. package/test.sh.patch +0 -0
  413. package/tests/test-core-file-protect-guard.sh +73 -0
  414. package/tests/test-deployment-verify-guard.sh +74 -0
  415. package/tests/test-git-operations-require-approval.sh +65 -0
package/index.mjs CHANGED
@@ -377,161 +377,654 @@ function examples() {
377
377
  const examplesDir = join(__dirname, 'examples');
378
378
  const CATEGORIES = {
379
379
  'Safety Guards': {
380
- 'allowlist.sh': 'Block everything not in allowlist (inverse permission model)',
381
- 'block-database-wipe.sh': 'Block destructive DB commands (migrate:fresh, DROP DATABASE, Prisma)',
382
- 'deploy-guard.sh': 'Block deploy when uncommitted changes exist',
383
- 'env-var-check.sh': 'Block hardcoded API keys in export commands',
384
- 'network-guard.sh': 'Warn on suspicious network commands (data exfiltration)',
385
- 'path-traversal-guard.sh': 'Block Edit/Write with path traversal (../../)',
386
- 'protect-dotfiles.sh': 'Block modifications to ~/.bashrc, ~/.aws/, ~/.ssh/',
387
- 'scope-guard.sh': 'Block file operations outside project directory',
388
- 'test-before-push.sh': 'Block git push when tests have not passed',
389
- 'timeout-guard.sh': 'Warn before long-running commands (servers, watchers)',
380
+ 'absolute-rule-enforcer.sh': 'Enforce CLAUDE.md "ABSOLUTE RULE" markers',
381
+ 'allowlist.sh': 'Only allow explicitly approved commands',
382
+ 'ansible-vault-guard.sh': 'Ansible Vault Guard',
383
+ 'api-endpoint-guard.sh': 'Warn on requests to internal/sensitive APIs',
384
+ 'api-key-in-url-guard.sh': 'Block API keys embedded in URLs',
385
+ 'api-overload-backoff.sh': 'Track API overload errors and enforce backoff',
386
+ 'api-rate-limit-guard.sh': 'Throttle rapid API calls to prevent rate limiting',
387
+ 'api-retry-limiter.sh': 'Limit API error retries to prevent token waste',
388
+ 'aws-production-guard.sh': 'Block dangerous AWS CLI operations',
389
+ 'aws-region-guard.sh': 'Warn when AWS commands target unexpected regions',
390
+ 'banned-command-guard.sh': 'Block commands that are explicitly banned',
391
+ 'bash-domain-allowlist.sh': 'Block curl/wget to unauthorized domains',
392
+ 'bash-timeout-guard.sh': 'Warn on commands likely to hang or run',
393
+ 'bash-trace-guard.sh': 'Block debug tracing that exposes secrets',
394
+ 'bg-task-cooldown-guard.sh': 'Cooldown after background task notifications',
395
+ 'binary-upload-guard.sh': 'Block committing binary files to git',
396
+ 'block-database-wipe.sh': 'Block destructive database commands',
397
+ 'bulk-file-delete-guard.sh': 'Block commands that delete many files at once',
398
+ 'cargo-publish-guard.sh': 'Cargo Publish Guard',
399
+ 'case-sensitive-guard.sh': 'Case-Insensitive Filesystem Safety Guard',
400
+ 'check-csrf-protection.sh': 'Check Csrf Protection',
401
+ 'chmod-guard.sh': 'Block overly permissive chmod commands',
402
+ 'chown-guard.sh': 'Block dangerous ownership changes',
403
+ 'ci-workflow-guard.sh': 'Prevent dangerous CI/CD workflow modifications',
404
+ 'claude-cache-gc.sh': 'Claude Cache Gc',
405
+ 'claudeignore-enforce-guard.sh': 'Enforce .claudeignore at the tool level',
406
+ 'claudemd-enforcer.sh': 'Claudemd Enforcer',
407
+ 'clear-command-confirm-guard.sh': 'Block accidental /clear command',
408
+ 'cloud-cli-guard.sh': 'Block destructive GCP/Azure CLI operations',
409
+ 'compact-blocker.sh': 'Block auto-compaction entirely',
410
+ 'compaction-transcript-guard.sh': 'Save conversation state before compaction',
411
+ 'composer-guard.sh': 'Block dangerous Composer operations',
412
+ 'compound-command-allow.sh': 'Auto-approve compound commands when all parts are safe',
413
+ 'compound-command-approver.sh': 'Auto-approve safe compound commands',
414
+ 'compound-inject-guard.sh': 'Block destructive commands hidden in compound statements',
415
+ 'concurrent-edit-lock.sh': 'Prevent file corruption from concurrent Claude sessions',
416
+ 'core-file-protect-guard.sh': 'Block edits to core/config/rules files',
417
+ 'credential-exfil-guard.sh': 'Block credential hunting commands',
418
+ 'credential-file-cat-guard.sh': 'Block cat/read of package manager credential files',
419
+ 'cron-modification-guard.sh': 'Block unreviewed cron job modifications',
420
+ 'crontab-guard.sh': 'Warn before modifying crontab',
421
+ 'cwd-project-boundary-guard.sh': 'Warn when cd leaves the project directory',
422
+ 'db-connect-guard.sh': 'Warn on direct database connections',
423
+ 'denied-action-retry-guard.sh': 'Block re-attempts of denied tool calls',
424
+ 'dependency-install-guard.sh': 'PreToolUse hook',
425
+ 'dependency-version-pin.sh': 'Warn on unpinned dependency versions',
426
+ 'deploy-guard.sh': 'Block deploy commands when uncommitted changes exist',
427
+ 'deploy-path-verify-guard.sh': 'Verify deployment target path before writes',
428
+ 'deployment-verify-guard.sh': 'Warn if committing without post-deploy verification',
429
+ 'disk-partition-guard.sh': 'Block disk partitioning and mount operations',
430
+ 'django-migrate-guard.sh': 'Block destructive Django DB operations',
431
+ 'dns-config-guard.sh': 'Block DNS/hosts file modifications',
432
+ 'docker-dangerous-guard.sh': 'Block dangerous Docker operations',
433
+ 'docker-prune-guard.sh': 'Warn before docker system prune',
434
+ 'docker-volume-guard.sh': 'Docker Volume Guard',
435
+ 'dockerfile-latest-guard.sh': 'Dockerfile Latest Guard',
436
+ 'dotenv-commit-guard.sh': 'Prevent committing .env files with secrets',
437
+ 'drizzle-migrate-guard.sh': 'Block destructive Drizzle ORM operations',
438
+ 'edit-guard.sh': 'Block Edit/Write to protected files',
439
+ 'edit-retry-loop-guard.sh': 'Detect Edit tool stuck retrying the same file',
440
+ 'encoding-preserve-guard.sh': 'Warn when file encoding changes',
441
+ 'env-inherit-guard.sh': 'Detect inherited production env vars in',
442
+ 'env-inline-secret-guard.sh': 'Block .env values from appearing in commands',
443
+ 'env-prod-guard.sh': 'Env Prod Guard',
444
+ 'env-source-guard.sh': 'Block sourcing .env into shell environment',
445
+ 'env-var-check.sh': 'Warn when setting environment variables with secrets',
446
+ 'expo-eject-guard.sh': 'Expo Eject Guard',
447
+ 'export-overwrite-guard.sh': 'Prevent /export from overwriting existing files',
448
+ 'file-age-guard.sh': 'Warn before editing files not modified in 30+ days',
449
+ 'firewall-guard.sh': 'Block firewall rule modifications',
450
+ 'flask-debug-guard.sh': 'Warn when Flask runs with debug=True',
451
+ 'gem-push-guard.sh': 'Gem Push Guard',
452
+ 'gh-cli-destructive-guard.sh': 'Block destructive GitHub CLI operations',
453
+ 'git-checkout-safety-guard.sh': 'Prevent file loss from careless branch switching',
454
+ 'git-checkout-uncommitted-guard.sh': 'Block branch switching with uncommitted changes',
390
455
  'git-config-guard.sh': 'Block git config --global modifications',
391
- 'case-sensitive-guard.sh': 'Detect case-insensitive FS collisions (exFAT/NTFS/HFS+)',
392
- 'compound-command-approver.sh': 'Auto-approve safe compound commands (cd && git log)',
393
- 'uncommitted-work-guard.sh': 'Block destructive git with uncommitted changes',
456
+ 'git-crypt-worktree-guard.sh': 'Block worktree creation in git-crypt repos',
457
+ 'git-history-rewrite-guard.sh': 'Block git history rewriting commands',
458
+ 'git-hook-bypass-guard.sh': 'Git Hook Bypass Guard',
459
+ 'git-index-lock-cleanup.sh': 'Remove stale .git/index.lock after git commands',
460
+ 'git-merge-conflict-prevent.sh': 'Git Merge Conflict Prevent',
461
+ 'git-operations-require-approval.sh': 'Block git write operations',
462
+ 'git-remote-guard.sh': 'Block push/fetch to unknown git remotes',
463
+ 'git-signed-commit-guard.sh': 'Warn on unsigned git commits',
464
+ 'git-submodule-guard.sh': 'Git Submodule Guard',
465
+ 'git-tag-guard.sh': 'Git Tag Guard',
466
+ 'github-actions-guard.sh': 'Validate GitHub Actions workflow changes',
467
+ 'github-actions-secret-guard.sh': 'Prevent hardcoded secrets in GitHub Actions workflows',
468
+ 'gitops-drift-guard.sh': 'Warn when editing infrastructure files without PR',
469
+ 'hardcoded-ip-guard.sh': 'Hardcoded Ip Guard',
470
+ 'headless-empty-result-guard.sh': 'Detect empty results in headless mode',
471
+ 'headless-stop-guard.sh': 'Skip Stop hooks in headless (-p) mode',
472
+ 'helm-install-guard.sh': 'Helm Install Guard',
473
+ 'hook-permission-fixer.sh': 'Auto-fix missing execute permissions on hooks',
474
+ 'hook-tamper-guard.sh': 'Prevent Claude from modifying its own hooks',
475
+ 'issue-draft-redact-guard.sh': 'Redact sensitive info from public issue drafts',
476
+ 'k8s-production-guard.sh': 'Block destructive Kubernetes operations on production',
477
+ 'kill-process-guard.sh': 'Block dangerous process termination commands',
478
+ 'kubernetes-guard.sh': 'Block destructive kubectl commands',
479
+ 'laravel-artisan-guard.sh': 'Laravel Artisan Guard',
480
+ 'large-file-guard.sh': 'Warn when Write tool creates oversized files',
481
+ 'large-file-write-guard.sh': 'Warn when writing large files',
482
+ 'line-ending-guard.sh': 'Warn on CRLF/LF mismatch',
483
+ 'log-level-guard.sh': 'Log Level Guard',
484
+ 'log-truncation-guard.sh': 'Block log file truncation/deletion',
485
+ 'max-edit-size-guard.sh': 'Max Edit Size Guard',
486
+ 'max-file-delete-count.sh': 'Max File Delete Count',
487
+ 'memory-write-guard.sh': 'Log writes to ~/.claude/ directory',
488
+ 'migration-safety.sh': 'Require backup before database migrations',
489
+ 'migration-verify-guard.sh': 'Require verification before destructive migrations',
490
+ 'monorepo-scope-guard.sh': 'Restrict edits to the current package',
491
+ 'network-exfil-guard.sh': 'Block data exfiltration via network commands',
492
+ 'network-guard.sh': 'Warn on network commands that send file contents',
493
+ 'network-interface-guard.sh': 'Block network interface modifications',
494
+ 'nextjs-env-guard.sh': 'Prevent exposing server secrets in Next.js',
495
+ 'no-absolute-import.sh': 'No Absolute Import',
496
+ 'no-alert-confirm-prompt.sh': 'No Alert Confirm Prompt',
497
+ 'no-anonymous-default-export.sh': 'No Anonymous Default Export',
498
+ 'no-any-type.sh': 'No Any Type',
499
+ 'no-any-typescript.sh': 'No Any Typescript',
500
+ 'no-ask-human.sh': 'Block commands that require human input',
501
+ 'no-assignment-in-condition.sh': 'No Assignment In Condition',
502
+ 'no-base64-exfil.sh': 'Block base64 encoding of sensitive files',
503
+ 'no-callback-hell.sh': 'No Callback Hell',
504
+ 'no-catch-all-route.sh': 'No Catch All Route',
505
+ 'no-circular-dependency.sh': 'No Circular Dependency',
506
+ 'no-class-in-functional.sh': 'No Class In Functional',
507
+ 'no-cleartext-storage.sh': 'No Cleartext Storage',
508
+ 'no-commented-code.sh': 'No Commented Code',
509
+ 'no-commit-fixup.sh': 'No Commit Fixup',
510
+ 'no-cors-wildcard.sh': 'No Cors Wildcard',
511
+ 'no-curl-upload.sh': 'No Curl Upload',
512
+ 'no-dangerouslySetInnerHTML.sh': 'No DangerouslySetInnerHTML',
513
+ 'no-dangling-await.sh': 'No Dangling Await',
514
+ 'no-debug-commit.sh': 'Block commits containing debug artifacts',
515
+ 'no-debug-in-commit.sh': 'No Debug In Commit',
516
+ 'no-deep-nesting.sh': 'No Deep Nesting',
517
+ 'no-deep-relative-import.sh': 'No Deep Relative Import',
518
+ 'no-default-credentials.sh': 'No Default Credentials',
394
519
  'no-deploy-friday.sh': 'Block deploys on Fridays',
395
- 'work-hours-guard.sh': 'Restrict risky operations outside business hours',
396
- 'symlink-guard.sh': 'Detect symlink/junction traversal in rm targets',
397
- 'env-source-guard.sh': 'Block sourcing .env files into shell',
398
- 'strict-allowlist.sh': 'Only allow explicitly permitted commands',
520
+ 'no-deprecated-api.sh': 'No Deprecated Api',
521
+ 'no-direct-dom-manipulation.sh': 'No Direct Dom Manipulation',
522
+ 'no-disabled-test.sh': 'No Disabled Test',
523
+ 'no-document-cookie.sh': 'No Document Cookie',
524
+ 'no-document-write.sh': 'No Document Write',
525
+ 'no-empty-function.sh': 'No Empty Function',
526
+ 'no-exec-user-input.sh': 'No Exec User Input',
527
+ 'no-expose-internal-ids.sh': 'No Expose Internal Ids',
528
+ 'no-exposed-port-in-dockerfile.sh': 'Warn about exposing port 22 in Dockerfile',
529
+ 'no-fixme-ship.sh': 'Block git push when FIXME/HACK comments exist',
530
+ 'no-floating-promises.sh': 'No Floating Promises',
531
+ 'no-force-flag.sh': 'Block dangerous --force flags',
532
+ 'no-force-install.sh': 'No Force Install',
533
+ 'no-git-amend-push.sh': 'Block amending already-pushed commits',
534
+ 'no-git-amend.sh': 'Block git commit --amend to prevent overwriting previous commits',
535
+ 'no-git-rebase-public.sh': 'No Git Rebase Public',
536
+ 'no-global-install.sh': 'Block global package installations',
537
+ 'no-global-state.sh': 'No Global State',
538
+ 'no-hardcoded-ip.sh': 'Detect hardcoded IP addresses in code',
539
+ 'no-hardcoded-port.sh': 'No Hardcoded Port',
540
+ 'no-hardcoded-url.sh': 'No Hardcoded Url',
541
+ 'no-hardlink.sh': 'Warn on hard link creation',
542
+ 'no-helmet-missing.sh': 'No Helmet Missing',
543
+ 'no-http-in-code.sh': 'Warn about http:// URLs in code (should be https://)',
544
+ 'no-http-url.sh': 'No Http Url',
545
+ 'no-http-without-https.sh': 'No Http Without Https',
546
+ 'no-index-as-key.sh': 'No Index As Key',
547
+ 'no-infinite-scroll-mem.sh': 'No Infinite Scroll Mem',
548
+ 'no-inline-event-handler.sh': 'No Inline Event Handler',
549
+ 'no-inline-handler.sh': 'No Inline Handler',
550
+ 'no-inline-style.sh': 'No Inline Style',
551
+ 'no-inline-styles.sh': 'No Inline Styles',
552
+ 'no-innerhtml.sh': 'No Innerhtml',
553
+ 'no-install-global.sh': 'No Install Global',
554
+ 'no-jwt-in-url.sh': 'No Jwt In Url',
555
+ 'no-large-commit.sh': 'No Large Commit',
556
+ 'no-localhost-expose.sh': 'No Localhost Expose',
557
+ 'no-long-switch.sh': 'No Long Switch',
558
+ 'no-magic-number.sh': 'No Magic Number',
559
+ 'no-md5-sha1.sh': 'No Md5 Sha1',
560
+ 'no-memory-leak-interval.sh': 'No Memory Leak Interval',
561
+ 'no-mixed-line-endings.sh': 'No Mixed Line Endings',
562
+ 'no-mutation-in-reducer.sh': 'No Mutation In Reducer',
563
+ 'no-mutation-observer-leak.sh': 'No Mutation Observer Leak',
564
+ 'no-nested-subscribe.sh': 'No Nested Subscribe',
565
+ 'no-nested-ternary.sh': 'No Nested Ternary',
566
+ 'no-network-exfil.sh': 'No Network Exfil',
567
+ 'no-new-array-fill.sh': 'No New Array Fill',
568
+ 'no-object-freeze-mutation.sh': 'No Object Freeze Mutation',
569
+ 'no-open-redirect.sh': 'No Open Redirect',
570
+ 'no-output-truncation.sh': 'Block piped tail/head that discards command output',
571
+ 'no-package-downgrade.sh': 'No Package Downgrade',
572
+ 'no-package-lock-edit.sh': 'No Package Lock Edit',
573
+ 'no-path-join-user-input.sh': 'No Path Join User Input',
574
+ 'no-port-bind.sh': 'No Port Bind',
575
+ 'no-process-exit.sh': 'No Process Exit',
576
+ 'no-prototype-pollution.sh': 'No Prototype Pollution',
577
+ 'no-push-without-ci.sh': 'No Push Without Ci',
578
+ 'no-push-without-tests.sh': 'Block git push if tests haven\'t been run',
579
+ 'no-raw-password-in-url.sh': 'No Raw Password In Url',
580
+ 'no-raw-ref.sh': 'No Raw Ref',
581
+ 'no-redundant-fragment.sh': 'No Redundant Fragment',
582
+ 'no-render-in-loop.sh': 'No Render In Loop',
583
+ 'no-root-user-docker.sh': 'No Root User Docker',
584
+ 'no-root-write.sh': 'No Root Write',
585
+ 'no-secrets-in-args.sh': 'No Secrets In Args',
586
+ 'no-secrets-in-logs.sh': 'No Secrets In Logs',
587
+ 'no-self-signed-cert.sh': 'Warn when generating self-signed certificates',
588
+ 'no-side-effects-in-render.sh': 'No Side Effects In Render',
589
+ 'no-sleep-in-hooks.sh': 'No Sleep In Hooks',
590
+ 'no-star-import-python.sh': 'No Star Import Python',
591
+ 'no-string-concat-sql.sh': 'No String Concat Sql',
592
+ 'no-sudo-guard.sh': 'No Sudo Guard',
593
+ 'no-sync-external-call.sh': 'No Sync External Call',
594
+ 'no-sync-fs.sh': 'No Sync Fs',
595
+ 'no-table-layout.sh': 'No Table Layout',
596
+ 'no-throw-string.sh': 'No Throw String',
597
+ 'no-todo-in-merge.sh': 'No Todo In Merge',
598
+ 'no-todo-in-production.sh': 'No Todo In Production',
599
+ 'no-todo-without-issue.sh': 'No Todo Without Issue',
600
+ 'no-triple-slash-ref.sh': 'No Triple Slash Ref',
601
+ 'no-unreachable-code.sh': 'No Unreachable Code',
602
+ 'no-unused-import.sh': 'No Unused Import',
603
+ 'no-unused-state.sh': 'No Unused State',
604
+ 'no-var-keyword.sh': 'No Var Keyword',
605
+ 'no-verify-blocker.sh': 'Block --no-verify on git commands',
606
+ 'no-wget-piped-bash.sh': 'Block curl/wget piped directly to bash',
607
+ 'no-window-location.sh': 'No Window Location',
608
+ 'no-with-statement.sh': 'No With Statement',
609
+ 'no-write-outside-src.sh': 'No Write Outside Src',
610
+ 'no-xml-external-entity.sh': 'No Xml External Entity',
611
+ 'npm-global-install-guard.sh': 'Block npm global installs',
612
+ 'npm-publish-guard.sh': 'Npm Publish Guard',
613
+ 'npm-script-injection.sh': 'Npm Script Injection',
614
+ 'npm-supply-chain-guard.sh': 'Detect npm supply chain attack patterns',
615
+ 'nuxt-config-guard.sh': 'Nuxt Config Guard',
616
+ 'output-credential-scan.sh': 'Detect credentials in command output',
617
+ 'output-secret-mask.sh': 'Mask secrets in tool output before Claude sees them',
399
618
  'overwrite-guard.sh': 'Warn before overwriting existing files',
400
- 'memory-write-guard.sh': 'Log writes to ~/.claude/ directory',
401
- 'worktree-guard.sh': 'Warn on destructive git in worktrees',
402
- 'no-curl-upload.sh': 'Warn on curl POST/upload commands',
403
- 'no-port-bind.sh': 'Warn on network port binding',
404
- 'docker-prune-guard.sh': 'Warn before docker system prune',
405
- 'pip-venv-guard.sh': 'Warn on pip install outside venv',
406
- 'no-git-amend-push.sh': 'Warn on amending pushed commits',
407
- 'typosquat-guard.sh': 'Detect npm/pip typosquatting attacks',
408
- 'variable-expansion-guard.sh': 'Block rm/mv with unexpanded shell variables (prevents system path deletion)',
409
- 'bash-trace-guard.sh': 'Block bash -x debug tracing that exposes secrets',
410
- 'strip-coauthored-by.sh': 'Warn on Co-Authored-By trailers in commit messages',
411
- 'session-drift-guard.sh': 'Progressive safety as session ages (warn at 200, block at 500 calls)',
412
- 'post-compact-safety.sh': 'Block irreversible commands after context compaction',
619
+ 'package-json-guard.sh': 'Package Json Guard',
620
+ 'package-lock-frozen.sh': 'Block modifications to lockfiles',
621
+ 'parallel-session-guard.sh': 'Warn when multiple Claude sessions',
622
+ 'path-deny-bash-guard.sh': 'Enforce path deny rules on Bash commands',
623
+ 'path-traversal-guard.sh': 'Block path traversal in Edit/Write operations',
624
+ 'pip-publish-guard.sh': 'Pip Publish Guard',
625
+ 'pip-requirements-guard.sh': 'Enforce pip install from requirements.txt only',
626
+ 'pip-venv-guard.sh': 'Warn when pip install runs outside a virtual environment',
627
+ 'pip-venv-required.sh': 'Block pip install outside of a virtual environment',
628
+ 'polyglot-rm-guard.sh': 'Block file deletion via any language, not just rm',
629
+ 'post-compact-safety.sh': 'Guard against autonomous actions after compaction',
630
+ 'prisma-migrate-guard.sh': 'Block destructive Prisma operations',
631
+ 'prompt-injection-guard.sh': 'Detect prompt injection in tool output',
632
+ 'protect-claudemd.sh': 'Block edits to CLAUDE.md and settings files',
633
+ 'protect-commands-dir.sh': 'Backup .claude/commands/ on session start',
634
+ 'protect-dotfiles.sh': 'Block destructive operations on home directory config files',
635
+ 'public-repo-push-guard.sh': 'Block pushing proprietary code to public repos',
636
+ 'rails-migration-guard.sh': 'Block destructive Rails migrations',
637
+ 'read-all-files-enforcer.sh': 'Track which files have been read in a directory',
413
638
  'read-budget-guard.sh': 'Limit excessive file reading to prevent token waste',
414
- 'hook-permission-fixer.sh': 'Auto-fix missing execute permissions on hooks (SessionStart)',
415
- 'response-budget-guard.sh': 'Track and limit tool calls per response (anti-loop)',
639
+ 'redis-flushall-guard.sh': 'Redis Flushall Guard',
640
+ 'registry-publish-guard.sh': 'Block publishing to package registries',
641
+ 'relative-path-guard.sh': 'Warn on relative file paths in Edit/Write',
642
+ 'response-budget-guard.sh': 'Track and limit tool calls per response',
643
+ 'resume-context-guard.sh': 'Warn when resuming large sessions',
644
+ 'rm-safety-net.sh': 'Extra layer of rm protection beyond destructive-guard',
645
+ 'role-tool-guard.sh': 'Restrict tools based on current agent role',
646
+ 'schema-migration-guard.sh': 'Warn on database schema migrations without backup',
647
+ 'scope-guard.sh': 'Block file operations outside the project directory',
648
+ 'secret-file-read-guard.sh': 'Block Read/Grep of files containing secrets',
649
+ 'self-modify-bypass-guard.sh': 'Auto-allow .claude/ writes in bypass mode',
650
+ 'sensitive-file-read-guard.sh': 'Block reading sensitive system/user files',
651
+ 'sensitive-log-guard.sh': 'Sensitive Log Guard',
652
+ 'session-drift-guard.sh': 'Progressive safety as session ages',
653
+ 'session-duration-guard.sh': 'Warn on long-running sessions',
654
+ 'session-permission-reset-guard.sh': 'Override session-cached permissions',
655
+ 'shell-wrapper-guard.sh': 'Detect destructive commands hidden in shell wrappers',
656
+ 'spec-file-scope-guard.sh': 'Restrict edits to files mentioned in a spec document',
657
+ 'spring-profile-guard.sh': 'Spring Profile Guard',
658
+ 'ssh-key-protect.sh': 'Block reading/copying SSH private keys',
659
+ 'staged-secret-scan.sh': 'Block git commit if staged diff contains secrets',
660
+ 'strict-allowlist.sh': 'Only allow explicitly permitted commands',
661
+ 'strip-coauthored-by.sh': 'Remove or warn about Co-Authored-By trailers',
662
+ 'symlink-guard.sh': 'Detect symlink/junction traversal before rm',
663
+ 'symlink-protect.sh': 'Symlink Protect',
664
+ 'system-package-guard.sh': 'Block system-level package installations',
665
+ 'systemd-service-guard.sh': 'Block dangerous systemd service operations',
666
+ 'terraform-guard.sh': 'Warn before terraform destroy/apply',
667
+ 'timeout-guard.sh': 'Warn before long-running commands',
668
+ 'timezone-guard.sh': 'Timezone Guard',
669
+ 'tmp-output-size-guard.sh': 'Monitor and warn about large tmp output files',
670
+ 'turbo-cache-guard.sh': 'Warn before clearing Turborepo cache',
671
+ 'typosquat-guard.sh': 'Detect potential typosquatting in npm install',
672
+ 'uncommitted-changes-stop.sh': 'Uncommitted Changes Stop',
673
+ 'uncommitted-discard-guard.sh': 'Block commands that discard uncommitted changes',
674
+ 'uncommitted-work-guard.sh': 'Block destructive git when dirty',
675
+ 'uncommitted-work-shield.sh': 'Auto-stash before destructive git operations',
676
+ 'user-account-guard.sh': 'Block user/group account modifications',
677
+ 'variable-expansion-guard.sh': 'Block destructive commands with shell variable expansion',
678
+ 'windows-path-guard.sh': 'Prevent NTFS junction/symlink traversal destruction',
679
+ 'work-hours-guard.sh': 'Restrict risky operations outside work hours',
680
+ 'worktree-cleanup-guard.sh': 'Warn on worktree removal with unmerged commits',
681
+ 'worktree-delete-guard.sh': 'Block git worktree removal',
682
+ 'worktree-guard.sh': 'Warn when operating in a git worktree',
683
+ 'worktree-memory-guard.sh': 'Warn when memory path resolves to main worktree',
684
+ 'worktree-path-validator.sh': 'Warn when file operations target main workspace instead of worktree',
685
+ 'worktree-project-unify.sh': 'Worktree Project Unify',
686
+ 'worktree-unmerged-guard.sh': 'Prevent worktree cleanup with unmerged commits',
687
+ 'write-overwrite-confirm.sh': 'Warn when Write tool overwrites large files',
688
+ 'write-secret-guard.sh': 'Block secrets from being written to files',
689
+ 'write-shrink-guard.sh': 'Block writes that drastically shrink files',
416
690
  },
417
691
  'Auto-Approve': {
418
- 'auto-approve-build.sh': 'Auto-approve npm/yarn/cargo/go build, test, lint',
419
- 'auto-approve-docker.sh': 'Auto-approve docker build, compose, ps, logs',
420
- 'auto-approve-git-read.sh': 'Auto-approve git status/log/diff even with -C flags',
421
- 'auto-approve-python.sh': 'Auto-approve pytest, mypy, ruff, black, isort',
422
- 'auto-approve-ssh.sh': 'Auto-approve safe SSH commands (uptime, whoami)',
423
- 'auto-approve-go.sh': 'Auto-approve go build/test/vet/fmt',
424
- 'auto-approve-cargo.sh': 'Auto-approve cargo build/test/clippy',
425
- 'auto-approve-make.sh': 'Auto-approve make build/test/lint',
426
- 'auto-approve-gradle.sh': 'Auto-approve gradle/gradlew build/test',
427
- 'auto-approve-maven.sh': 'Auto-approve mvn compile/test/verify',
428
- 'permission-cache.sh': 'Auto-approve previously approved commands in session',
429
- 'auto-approve-readonly.sh': 'Auto-approve 50+ read-only commands (cat, ls, grep, find)',
430
- 'auto-approve-compound-git.sh': 'PermissionRequest: auto-approve compound git commands (cd && git)',
431
- 'allow-git-hooks-dir.sh': 'PermissionRequest: allow writes to .git/hooks/ directory',
432
- 'allow-claude-settings.sh': 'PermissionRequest: allow writes to .claude/ (isolated environments)',
433
- 'allow-protected-dirs.sh': 'PermissionRequest: allow ALL protected directory writes (containers only)',
692
+ 'allow-claude-settings.sh': 'PermissionRequest hook',
693
+ 'allow-git-hooks-dir.sh': 'PermissionRequest hook',
694
+ 'allow-protected-dirs.sh': 'PermissionRequest hook',
695
+ 'auto-approve-build.sh': 'Auto-approve build and test commands',
696
+ 'auto-approve-cargo.sh': 'Auto-approve Rust cargo commands',
697
+ 'auto-approve-compound-git.sh': 'PermissionRequest hook',
698
+ 'auto-approve-docker.sh': 'Auto Approve Docker',
699
+ 'auto-approve-git-read.sh': 'Auto-approve read-only git commands',
700
+ 'auto-approve-go.sh': 'Auto-approve Go build/test/vet commands',
701
+ 'auto-approve-gradle.sh': 'Auto-approve Gradle build/test commands',
702
+ 'auto-approve-make.sh': 'Auto-approve common Make targets',
703
+ 'auto-approve-maven.sh': 'Auto-approve Maven build/test commands',
704
+ 'auto-approve-python.sh': 'Auto-approve Python development commands',
705
+ 'auto-approve-readonly-tools.sh': 'Auto Approve Readonly Tools',
706
+ 'auto-approve-readonly.sh': 'Auto-approve all read-only commands',
707
+ 'auto-approve-ssh.sh': 'Auto-approve safe SSH commands',
708
+ 'auto-approve-test.sh': 'Auto Approve Test',
709
+ 'auto-compact-prep.sh': 'Save checkpoint before context compaction',
710
+ 'auto-mode-safe-commands.sh': 'Fix Auto Mode false positives on safe commands',
711
+ 'auto-push-worktree.sh': 'Auto-push worktree branches before session end',
712
+ 'bash-heuristic-approver.sh': 'Auto-approve bash safety heuristic prompts',
713
+ 'bash-safety-auto-deny.sh': 'Auto-deny commands that trigger safety prompts',
714
+ 'classifier-fallback-allow.sh': 'Allow read-only commands when Auto Mode classifier is unavailable',
715
+ 'direnv-auto-reload.sh': 'Auto-reload environment when directory changes',
716
+ 'edit-always-allow.sh': 'Auto-approve all Edit prompts in configured directories',
717
+ 'gitignore-auto-add.sh': 'Suggest .gitignore entries for common patterns',
718
+ 'heredoc-backtick-approver.sh': 'Auto-approve backtick warnings in heredoc strings',
719
+ 'multiline-command-approver.sh': 'Auto-approve multiline commands by first-line matching',
720
+ 'permission-audit-log.sh': 'Log all tool invocations for permission debugging',
721
+ 'permission-cache.sh': 'Remember approved commands in session',
722
+ 'permission-entry-validator.sh': 'Clean broken permission entries from settings',
723
+ 'permission-mode-drift-guard.sh': 'Detect permission mode changes mid-session',
724
+ 'permission-pattern-auto-allow.sh': 'Auto-allow commands matching user-defined patterns',
725
+ 'quoted-flag-approver.sh': 'Auto-approve commands with quoted flag values',
726
+ 'webfetch-domain-allow.sh': 'Auto-approve WebFetch for allowed domains',
434
727
  },
435
728
  'Quality': {
436
- 'branch-name-check.sh': 'Warn on non-conventional branch names',
437
- 'commit-message-check.sh': 'Warn on non-conventional commit messages',
438
- 'edit-guard.sh': 'Block Edit/Write to protected files (.env, credentials)',
439
- 'enforce-tests.sh': 'Warn when source files change without test files',
440
- 'large-file-guard.sh': 'Warn when Write creates files over 500KB',
441
- 'todo-check.sh': 'Warn when committing files with TODO/FIXME markers',
442
- 'verify-before-commit.sh': 'Block commit unless tests passed recently',
443
- 'test-deletion-guard.sh': 'Warn when removing test assertions',
729
+ 'bash-secret-output-detector.sh': 'Warn when Bash output contains secrets',
730
+ 'bashrc-safety-check.sh': 'Warn about .bashrc lines that hang in non-interactive shells',
731
+ 'branch-name-check.sh': 'Warn when creating branches with non-standard names',
732
+ 'branch-naming-convention.sh': 'Branch Naming Convention',
733
+ 'changelog-reminder.sh': 'Remind to update CHANGELOG on version bump',
734
+ 'check-abort-controller.sh': 'Check Abort Controller',
735
+ 'check-accessibility.sh': 'Check Accessibility',
736
+ 'check-aria-labels.sh': 'Check Aria Labels',
737
+ 'check-async-await-consistency.sh': 'Check Async Await Consistency',
738
+ 'check-before-act-enforcer.sh': 'Require Read before Edit/Write',
739
+ 'check-charset-meta.sh': 'Check Charset Meta',
740
+ 'check-cleanup-effect.sh': 'Check Cleanup Effect',
741
+ 'check-content-type.sh': 'Check Content Type',
742
+ 'check-controlled-input.sh': 'Check Controlled Input',
743
+ 'check-cookie-flags.sh': 'Check Cookie Flags',
744
+ 'check-cors-config.sh': 'Check Cors Config',
745
+ 'check-csp-headers.sh': 'Check Csp Headers',
746
+ 'check-debounce.sh': 'Check Debounce',
747
+ 'check-dependency-age.sh': 'Check Dependency Age',
748
+ 'check-dependency-license.sh': 'Check Dependency License',
749
+ 'check-dockerfile-best-practice.sh': 'Check Dockerfile Best Practice',
750
+ 'check-error-boundaries.sh': 'Check Error Boundaries',
751
+ 'check-error-class.sh': 'Check Error Class',
752
+ 'check-error-handling.sh': 'Check Error Handling',
753
+ 'check-error-logging.sh': 'Check Error Logging',
754
+ 'check-error-message.sh': 'Check Error Message',
755
+ 'check-error-page.sh': 'Check Error Page',
756
+ 'check-error-stack.sh': 'Check Error Stack',
757
+ 'check-favicon.sh': 'Check Favicon',
758
+ 'check-form-validation.sh': 'Check Form Validation',
759
+ 'check-git-hooks-compat.sh': 'Check Git Hooks Compat',
760
+ 'check-gitattributes.sh': 'Check Gitattributes',
761
+ 'check-https-redirect.sh': 'Check Https Redirect',
762
+ 'check-image-optimization.sh': 'Check Image Optimization',
763
+ 'check-input-validation.sh': 'Check Input Validation',
764
+ 'check-key-prop.sh': 'Check Key Prop',
765
+ 'check-lang-attribute.sh': 'Check Lang Attribute',
766
+ 'check-lazy-loading.sh': 'Check Lazy Loading',
767
+ 'check-loading-state.sh': 'Check Loading State',
768
+ 'check-memo-deps.sh': 'Check Memo Deps',
769
+ 'check-meta-description.sh': 'Check Meta Description',
770
+ 'check-npm-scripts-exist.sh': 'Check Npm Scripts Exist',
771
+ 'check-null-check.sh': 'Check Null Check',
772
+ 'check-package-size.sh': 'Check Package Size',
773
+ 'check-pagination.sh': 'Check Pagination',
774
+ 'check-port-availability.sh': 'Check Port Availability',
775
+ 'check-promise-all.sh': 'Check Promise All',
776
+ 'check-prop-types.sh': 'Check Prop Types',
777
+ 'check-rate-limiting.sh': 'Check Rate Limiting',
778
+ 'check-responsive-design.sh': 'Check Responsive Design',
779
+ 'check-retry-logic.sh': 'Check Retry Logic',
780
+ 'check-return-types.sh': 'Check Return Types',
781
+ 'check-semantic-html.sh': 'Check Semantic Html',
782
+ 'check-semantic-versioning.sh': 'Check Semantic Versioning',
783
+ 'check-suspense-fallback.sh': 'Check Suspense Fallback',
784
+ 'check-test-exists.sh': 'Warn when editing code without a test file',
785
+ 'check-test-naming.sh': 'Check Test Naming',
786
+ 'check-timeout-cleanup.sh': 'Check Timeout Cleanup',
787
+ 'check-tls-version.sh': 'Check Tls Version',
788
+ 'check-type-coercion.sh': 'Check Type Coercion',
789
+ 'check-unsubscribe.sh': 'Check Unsubscribe',
790
+ 'check-viewport-meta.sh': 'Check Viewport Meta',
791
+ 'check-worker-terminate.sh': 'Check Worker Terminate',
792
+ 'ci-skip-guard.sh': 'Warn when commit message skips CI',
793
+ 'claudemd-violation-detector.sh': 'Remind critical CLAUDE.md rules after tool use',
794
+ 'commit-message-check.sh': 'Warn when commit messages don\'t follow conventions',
795
+ 'commit-message-quality.sh': 'Warn about low-quality commit messages',
796
+ 'commit-quality-gate.sh': 'Enforce commit message quality',
797
+ 'commit-scope-guard.sh': 'Warn when committing too many files',
798
+ 'conflict-marker-guard.sh': 'Block commits with conflict markers',
799
+ 'console-log-count.sh': 'Console Log Count',
800
+ 'context-warning-verifier.sh': 'Verify context warnings are genuine',
801
+ 'cors-star-warn.sh': 'PostToolUse matcher: Edit|Write',
802
+ 'cwd-drift-detector.sh': 'Warn when destructive commands run outside project root',
803
+ 'debug-leftover-guard.sh': 'Detect debug code in commits',
804
+ 'detect-mixed-indentation.sh': 'Warn about mixed tabs/spaces',
805
+ 'dockerfile-lint.sh': 'Basic Dockerfile validation after editing',
806
+ 'dotenv-example-sync.sh': 'Warn when .env changes but .env.example doesn\'t',
807
+ 'dotenv-validate.sh': 'Validate .env syntax after edits',
808
+ 'dotenv-watch.sh': 'Alert when .env files change on disk',
809
+ 'dotnet-build-on-edit.sh': 'Run dotnet build after C#/F# edits',
810
+ 'edit-old-string-validator.sh': 'Pre-validate Edit tool old_string exists',
811
+ 'edit-verify.sh': 'Edit Verify',
812
+ 'enforce-tests.sh': 'Warn when source files are edited without tests',
813
+ 'env-drift-guard.sh': 'Detect .env vs .env.example drift',
814
+ 'env-file-gitignore-check.sh': 'Warn if .env is not in .gitignore',
815
+ 'env-naming-convention.sh': 'Env Naming Convention',
816
+ 'env-required-check.sh': 'Env Required Check',
444
817
  'fact-check-gate.sh': 'Warn when docs reference unread source files',
445
- 'conflict-marker-guard.sh': 'Block commits with merge conflict markers',
446
- 'commit-quality-gate.sh': 'Warn on vague commit messages',
447
- 'commit-scope-guard.sh': 'Warn when committing 15+ files at once',
448
- 'require-issue-ref.sh': 'Warn when commit lacks issue reference',
449
- 'no-console-log.sh': 'Warn on console.log in production code',
450
- 'no-eval.sh': 'Warn on eval() usage (security risk)',
451
- 'no-wildcard-import.sh': 'Warn on import * patterns',
452
- 'no-todo-ship.sh': 'Warn on TODO/FIXME in commits',
453
- 'test-coverage-guard.sh': 'Warn when code grows without tests',
454
- 'ci-skip-guard.sh': 'Warn on [skip ci] and --no-verify',
455
- 'debug-leftover-guard.sh': 'Detect debugger/pdb/binding.pry in staged code',
456
- 'typescript-strict-guard.sh': 'Warn when tsconfig strict mode disabled',
457
- 'sensitive-regex-guard.sh': 'Detect ReDoS-vulnerable regex patterns',
458
- 'git-author-guard.sh': 'Verify git author is configured',
818
+ 'file-reference-check.sh': 'Verify referenced file paths exist',
819
+ 'git-author-guard.sh': 'Verify commit author is configured correctly',
459
820
  'git-blame-context.sh': 'Show file ownership before major edits',
460
- 'import-cycle-warn.sh': 'Detect circular import patterns',
461
- 'env-drift-guard.sh': 'Detect .env vs .env.example mismatch',
821
+ 'git-lfs-guard.sh': 'Suggest Git LFS for large binary files',
822
+ 'git-message-length-check.sh': 'Warn on too-short commit messages',
823
+ 'git-message-length.sh': 'Git Message Length',
824
+ 'gitignore-check.sh': 'Gitignore Check',
825
+ 'go-mod-tidy-warn.sh': 'Go Mod Tidy Warn',
826
+ 'go-vet-after-edit.sh': 'Run go vet after editing Go files',
827
+ 'hallucination-url-check.sh': 'Detect potentially hallucinated URLs',
828
+ 'hardcoded-secret-detector.sh': 'Detect hardcoded secrets in edits',
829
+ 'import-cycle-warn.sh': 'Detect potential circular imports',
830
+ 'java-compile-on-edit.sh': 'Check Java compilation after edits',
831
+ 'json-syntax-check.sh': 'Validate JSON files after editing',
832
+ 'license-check.sh': 'Warn when creating files without a license header',
833
+ 'lockfile-guard.sh': 'Warn when lockfiles are modified unexpectedly',
834
+ 'magic-number-warn.sh': 'Magic Number Warn',
835
+ 'main-branch-warn.sh': 'Warn when working directly on main/master',
836
+ 'markdown-link-check.sh': 'Verify local file links in markdown',
837
+ 'max-function-length.sh': 'Max Function Length',
838
+ 'max-import-count.sh': 'Max Import Count',
839
+ 'max-line-length-check.sh': 'Warn on lines exceeding max length after edit',
840
+ 'no-console-assert.sh': 'No Console Assert',
841
+ 'no-console-error-swallow.sh': 'No Console Error Swallow',
842
+ 'no-console-in-prod.sh': 'No Console In Prod',
843
+ 'no-console-log-commit.sh': 'Block commits containing console.log',
844
+ 'no-console-time.sh': 'No Console Time',
845
+ 'no-eval-in-template.sh': 'No Eval In Template',
846
+ 'no-eval-template.sh': 'No Eval Template',
847
+ 'no-eval.sh': 'No Eval',
848
+ 'no-todo-ship.sh': 'Block commits with TODO/FIXME/HACK markers',
849
+ 'no-wildcard-cors.sh': 'No Wildcard Cors',
850
+ 'no-wildcard-delete.sh': 'No Wildcard Delete',
851
+ 'no-wildcard-import.sh': 'No Wildcard Import',
852
+ 'npm-audit-warn.sh': 'Npm Audit Warn',
853
+ 'output-explosion-detector.sh': 'Detect abnormally large tool outputs',
854
+ 'output-pii-detect.sh': 'Detect PII/sensitive data in tool output',
855
+ 'output-token-env-check.sh': 'Warn if max output tokens is not configured',
462
856
  'package-script-guard.sh': 'Warn when package.json scripts change',
463
- 'lockfile-guard.sh': 'Warn when lockfiles modified in commits',
464
- 'git-lfs-guard.sh': 'Suggest Git LFS for large files',
465
- 'python-ruff-on-edit.sh': 'PostToolUse: lint Python files after edit (ruff/flake8/pylint)',
466
- 'typescript-lint-on-edit.sh': 'PostToolUse: type check TypeScript files after edit (tsc --noEmit)',
857
+ 'php-lint-on-edit.sh': 'Run PHP syntax check after editing PHP files',
858
+ 'plain-language-danger-warn.sh': 'Add plain-language warnings to dangerous commands',
859
+ 'port-conflict-check.sh': 'Warn before starting a server on an occupied port',
860
+ 'pr-description-check.sh': 'Pr Description Check',
861
+ 'prefer-builtin-tools.sh': 'Deny bash commands that have dedicated built-in tool equivalents',
862
+ 'prefer-const.sh': 'Prefer Const',
863
+ 'prefer-dedicated-tools.sh': 'Force use of dedicated tools instead of Bash equivalents',
864
+ 'prefer-optional-chaining.sh': 'Prefer Optional Chaining',
865
+ 'push-requires-test-pass-record.sh': 'Record when tests pass (companion to push-requires-test-pass.sh)',
866
+ 'push-requires-test-pass.sh': 'Block git push to main/production without test verification',
867
+ 'python-import-check.sh': 'Detect unused imports in Python files',
868
+ 'python-ruff-on-edit.sh': 'Run ruff lint after editing Python files',
869
+ 'react-key-warn.sh': 'Warn about missing key props in JSX lists',
870
+ 'readme-exists-check.sh': 'Readme Exists Check',
871
+ 'readme-update-reminder.sh': 'Remind to update README when APIs change',
872
+ 'require-issue-ref.sh': 'Warn when commit message lacks issue reference',
873
+ 'ruby-lint-on-edit.sh': 'Run RuboCop after editing Ruby files',
874
+ 'rust-clippy-after-edit.sh': 'Run cargo clippy after editing Rust files',
875
+ 'sandbox-write-verify.sh': 'Verify file existence before overwrite in sandbox mode',
876
+ 'sensitive-regex-guard.sh': 'Warn on ReDoS-vulnerable regex patterns',
877
+ 'session-start-safety-check.sh': 'Warn about uncommitted changes on session start',
878
+ 'settings-mutation-detector.sh': 'Detect unauthorized changes to Claude settings files',
879
+ 'skill-injection-detector.sh': 'Detect silently injected skills/plugins',
880
+ 'sql-injection-detect.sh': 'Sql Injection Detect',
881
+ 'svelte-lint-on-edit.sh': 'Svelte Lint On Edit',
882
+ 'swift-build-on-edit.sh': 'Run swift build check after editing Swift files',
883
+ 'test-after-edit.sh': 'Remind to run tests after editing test files',
884
+ 'test-before-commit.sh': 'Test Before Commit',
885
+ 'test-before-push.sh': 'Block git push when tests haven\'t passed',
886
+ 'test-coverage-guard.sh': 'Warn when code grows without tests',
887
+ 'test-coverage-reminder.sh': 'Remind to run tests after code changes',
888
+ 'test-deletion-guard.sh': 'Block deletion of test assertions',
889
+ 'test-exit-code-verify.sh': 'Verify test command exit codes match results',
890
+ 'todo-check.sh': 'Warn when committing files with TODO/FIXME/HACK comments',
891
+ 'todo-deadline-warn.sh': 'Warn about expired TODO deadlines in edited files',
892
+ 'typescript-lint-on-edit.sh': 'Run TypeScript type check after editing .ts/.tsx files',
893
+ 'typescript-strict-check.sh': 'Warn when TypeScript strict mode is disabled',
894
+ 'typescript-strict-guard.sh': 'Warn when tsconfig.json strict mode is disabled',
895
+ 'unicode-corruption-check.sh': 'Detect Unicode corruption after Edit/Write',
896
+ 'usage-warn.sh': 'Usage Warn',
897
+ 'verify-before-commit.sh': 'Block git commit unless tests passed recently',
898
+ 'verify-before-done.sh': 'Warn when committing without running tests',
899
+ 'vue-lint-on-edit.sh': 'Vue Lint On Edit',
900
+ 'write-test-ratio.sh': 'Write Test Ratio',
901
+ 'yaml-syntax-check.sh': 'Validate YAML after editing',
902
+ },
903
+ 'Monitoring': {
904
+ 'api-rate-limit-tracker.sh': 'Track API call frequency and warn on burst',
905
+ 'cost-tracker.sh': 'Estimate session token cost',
906
+ 'cross-session-error-log.sh': 'Persist error patterns across sessions',
907
+ 'daily-usage-tracker.sh': 'Track daily tool call count',
908
+ 'edit-counter-test-gate.sh': 'Require testing after N consecutive edits',
909
+ 'edit-error-counter.sh': 'Warn when Edit tool fails repeatedly',
910
+ 'file-change-monitor.sh': 'Track all files modified during a session',
911
+ 'file-change-tracker.sh': 'Track all file modifications in a session',
912
+ 'mcp-tool-audit-log.sh': 'Log all MCP tool calls for security auditing',
913
+ 'no-console-log.sh': 'No Console Log',
914
+ 'no-sensitive-log.sh': 'No Sensitive Log',
915
+ 'read-audit-log.sh': 'Log all file read operations for forensics',
916
+ 'session-budget-alert.sh': 'Show session budget status on start',
917
+ 'session-end-logger.sh': 'Log session activity at exit',
918
+ 'session-error-rate-monitor.sh': 'Detect session quality degradation',
919
+ 'session-health-monitor.sh': 'Monitor session health metrics',
920
+ 'session-memory-watchdog.sh': 'Session Memory Watchdog',
921
+ 'session-quota-tracker.sh': 'Track cumulative tool calls per session',
922
+ 'session-token-counter.sh': 'Track tool usage count per session',
923
+ 'token-usage-tracker.sh': 'Token Usage Tracker',
924
+ 'tool-call-rate-limiter.sh': 'Prevent runaway tool calls',
925
+ 'tool-file-logger.sh': 'Log file paths from Read/Write/Edit to stderr',
926
+ 'usage-cache-local.sh': 'Cache usage info locally to avoid API calls',
467
927
  },
468
928
  'Recovery': {
469
- 'auto-checkpoint.sh': 'Auto-commit after edits for rollback protection',
470
- 'auto-snapshot.sh': 'Auto-save file snapshots before edits (rollback protection)',
471
- 'session-checkpoint.sh': 'Save session state before context compaction',
929
+ 'auto-checkpoint.sh': 'Auto-commit after every edit for rollback protection',
930
+ 'auto-git-checkpoint.sh': 'Auto Git Checkpoint',
931
+ 'auto-snapshot.sh': 'Automatic file snapshots before every edit',
932
+ 'auto-stash-before-pull.sh': 'Suggest stash before git pull/merge',
933
+ 'backup-before-refactor.sh': 'Backup Before Refactor',
934
+ 'checkpoint-tamper-guard.sh': 'Block manipulation of hook state/checkpoint files',
935
+ 'context-compact-advisor.sh': 'Context Compact Advisor',
936
+ 'context-snapshot.sh': 'Save session state before context loss',
937
+ 'file-change-undo-tracker.sh': 'Track file changes for easy undo',
938
+ 'file-edit-backup.sh': 'Auto-backup files before Edit/Write overwrites them',
939
+ 'file-recycle-bin.sh': 'Move deleted files to recycle bin instead of permanent deletion',
940
+ 'git-stash-before-checkout.sh': 'Auto-stash before risky git checkouts',
941
+ 'git-stash-before-danger.sh': 'Auto-stash before risky git operations',
942
+ 'post-compact-restore.sh': 'Restore context after /compact',
943
+ 'pre-compact-checkpoint.sh': 'Auto-save before context compaction',
944
+ 'pre-compact-knowledge-save.sh': 'Save critical context before compaction',
945
+ 'pre-compact-transcript-export.sh': 'Export conversation before compaction',
946
+ 'revert-helper.sh': 'Show revert command when session ends badly',
947
+ 'session-checkpoint.sh': 'Auto-save session state on every stop',
948
+ 'session-handoff.sh': 'Auto-save session state for next session',
949
+ 'session-resume-env-fix.sh': 'Fix CLAUDE_ENV_FILE path on session resume',
950
+ 'session-resume-guard.sh': 'Verify context is loaded after session resume',
951
+ 'session-state-saver.sh': 'Session State Saver',
952
+ 'session-summary-stop.sh': 'Print session change summary on stop',
953
+ 'session-summary.sh': 'Session Summary',
954
+ 'settings-auto-backup.sh': 'Auto-backup settings on session start',
955
+ 'terminal-state-restore.sh': 'terminal-state-restore — restore terminal to clean state on session exit',
472
956
  },
473
957
  'UX': {
474
- 'prompt-length-guard.sh': 'UserPromptSubmit: warn on long prompts (>5000 chars)',
475
- 'prompt-injection-detector.sh': 'UserPromptSubmit: detect prompt injection patterns',
476
- 'auto-answer-question.sh': 'PreToolUse: auto-answer AskUserQuestion for headless mode (v2.1.85)',
477
- 'notify-waiting.sh': 'Desktop notification when Claude waits for input',
478
- 'tmp-cleanup.sh': 'Clean up /tmp/claude-*-cwd files on session end',
479
- 'hook-debug-wrapper.sh': 'Wrap any hook to log input/output/exit/timing',
958
+ 'auto-answer-question.sh': 'Auto-answer AskUserQuestion for headless/autonomous mode',
959
+ 'binary-file-guard.sh': 'Warn when Write creates binary/large files',
960
+ 'compact-reminder.sh': 'Remind to /compact when context is low',
961
+ 'consecutive-error-breaker.sh': 'Stop after N consecutive errors',
962
+ 'consecutive-failure-circuit-breaker.sh': 'Stop after repeated failures',
963
+ 'context-threshold-alert.sh': 'Alert at configurable context usage thresholds',
964
+ 'cwd-reminder.sh': 'Remind Claude of the current working directory',
965
+ 'dangling-process-guard.sh': 'Detect background processes left running',
966
+ 'dependency-audit.sh': 'Warn before installing unknown packages',
967
+ 'diff-size-guard.sh': 'Warn on large uncommitted changes',
968
+ 'disk-space-check.sh': 'Warn if disk space is low at session start',
969
+ 'disk-space-guard.sh': 'Warn when disk space is running low',
970
+ 'encoding-guard.sh': 'Warn when writing to non-UTF-8 files',
971
+ 'error-memory-guard.sh': 'Detect repeated failed commands',
972
+ 'file-size-limit.sh': 'File Size Limit',
973
+ 'fish-shell-wrapper.sh': 'Run Bash tool commands in fish shell',
974
+ 'five-hundred-milestone.sh': 'Five Hundred Milestone',
975
+ 'git-show-flag-sanitizer.sh': 'Strip invalid --no-stat from git show',
976
+ 'hook-debug-wrapper.sh': 'Debug wrapper for any Claude Code hook',
977
+ 'hook-stdout-sanitizer.sh': 'Prevent hook stdout from corrupting tool results',
978
+ 'large-read-guard.sh': 'Warn before reading large files',
979
+ 'long-session-reminder.sh': 'Warn when session runs too long',
480
980
  'loop-detector.sh': 'Detect and break command repetition loops',
481
- 'session-handoff.sh': 'Auto-save session state for next session resume',
482
- 'commit-quality-gate.sh': 'Warn on vague or too-long commit messages',
483
- 'diff-size-guard.sh': 'Warn/block on large diffs (10+ files warn, 50+ block)',
484
- 'dependency-audit.sh': 'Warn on new package installs not in manifest',
485
- 'binary-file-guard.sh': 'Warn when Write targets binary file types',
486
- 'stale-branch-guard.sh': 'Warn when branch is far behind default',
487
- 'symlink-guard.sh': 'Detect symlink/junction traversal in rm targets',
488
- 'cost-tracker.sh': 'Estimate session token cost ($1 warn, $5 alert)',
489
- 'read-before-edit.sh': 'Warn when editing files not recently read',
490
- 'no-sudo-guard.sh': 'Block all sudo commands',
491
- 'no-install-global.sh': 'Block npm -g and system-wide pip',
492
- 'no-curl-upload.sh': 'Warn on curl POST/upload',
493
- 'no-port-bind.sh': 'Warn on network port binding',
494
- 'git-tag-guard.sh': 'Block pushing all tags at once',
495
- 'npm-publish-guard.sh': 'Version check before npm publish',
496
- 'max-file-count-guard.sh': 'Warn when 20+ files created per session',
497
- 'protect-claudemd.sh': 'Block edits to CLAUDE.md and settings files',
498
- 'reinject-claudemd.sh': 'Re-inject CLAUDE.md rules after compaction',
499
- 'token-budget-guard.sh': 'Block when estimated cost exceeds budget',
500
- 'output-length-guard.sh': 'Warn when tool output exceeds 50KB',
501
- 'error-memory-guard.sh': 'Block retries of already-failed commands',
502
- 'parallel-edit-guard.sh': 'Detect concurrent edits to same file',
503
- 'large-read-guard.sh': 'Warn before catting large files',
504
- 'context-snapshot.sh': 'Auto-save session state before context loss',
505
- 'compact-reminder.sh': 'Suggest /compact after N tool calls',
506
- 'revert-helper.sh': 'Show undo command when session ends',
507
- 'hardcoded-secret-detector.sh': 'Detect AWS keys, passwords, JWT in code',
508
- 'prompt-injection-guard.sh': 'Detect injection patterns in tool output',
509
- 'verify-before-done.sh': 'Warn when committing without running tests',
510
- 'disk-space-guard.sh': 'Warn when disk space is low',
511
- 'changelog-reminder.sh': 'Remind to update CHANGELOG on version bump',
512
- 'rate-limit-guard.sh': 'Detect rapid-fire tool calls',
513
- 'stale-env-guard.sh': 'Warn when .env is 90+ days old',
514
- 'node-version-guard.sh': 'Detect .nvmrc version mismatch',
515
- 'auto-stash-before-pull.sh': 'Warn before pull/merge with dirty tree',
516
- 'license-check.sh': 'Note missing license headers in source files',
517
- 'backup-before-refactor.sh': 'Auto-stash before large refactors',
518
- 'file-size-limit.sh': 'Block creating files over 1MB',
519
- 'branch-naming-convention.sh': 'Enforce feat/fix/chore branch prefixes',
520
- 'pr-description-check.sh': 'Ensure PRs have description body',
981
+ 'max-file-count-guard.sh': 'Max File Count Guard',
521
982
  'max-session-duration.sh': 'Warn when session exceeds time limit',
522
- 'dangling-process-guard.sh': 'Detect background processes after session',
523
- 'encoding-guard.sh': 'Warn on non-UTF-8 file edits',
524
- 'post-compact-restore.sh': 'Restore context after /compact',
525
- 'ssh-key-protect.sh': 'Block reading SSH private keys',
526
- 'git-signed-commit-guard.sh': 'Warn on --no-gpg-sign',
527
- 'terraform-guard.sh': 'Block terraform destroy',
528
- 'kubernetes-guard.sh': 'Block kubectl delete namespace',
529
- 'subagent-scope-guard.sh': 'Limit subagent file access',
530
- 'git-remote-guard.sh': 'Warn on non-origin remotes',
531
- 'aws-region-guard.sh': 'Warn on unexpected AWS region',
532
- 'api-endpoint-guard.sh': 'Block cloud metadata endpoints',
533
- 'crontab-guard.sh': 'Warn before modifying crontab',
534
- 'typosquat-guard.sh': 'Detect package typosquatting',
983
+ 'node-version-check.sh': 'Warn if Node.js version is too old',
984
+ 'node-version-guard.sh': 'Warn when Node.js version doesn\'t match .nvmrc',
985
+ 'notify-waiting.sh': 'Desktop notification when Claude needs input',
986
+ 'output-length-guard.sh': 'Warn when tool output is very large',
987
+ 'parallel-edit-guard.sh': 'Detect concurrent edits to same file',
988
+ 'plan-mode-edit-guard.sh': 'Warn when editing non-plan files during plan mode',
989
+ 'plan-mode-enforcer.sh': 'Hard-enforce Plan Mode read-only constraint',
990
+ 'plan-mode-strict-guard.sh': 'Hard-block all write operations during plan mode',
991
+ 'plan-repo-sync.sh': 'Sync plan files from ~/.claude/ into your repo',
992
+ 'plugin-process-cleanup.sh': 'Kill leaked plugin subprocesses on session end',
993
+ 'prompt-injection-detector.sh': 'UserPromptSubmit hook',
994
+ 'prompt-length-guard.sh': 'UserPromptSubmit hook',
995
+ 'rate-limit-guard.sh': 'Rate Limit Guard',
996
+ 'read-before-edit.sh': 'Warn when editing files not recently read',
997
+ 'reinject-claudemd.sh': 'Re-inject CLAUDE.md content after compact',
998
+ 'session-time-limit.sh': 'Warn when session exceeds time limit',
999
+ 'skill-gate.sh': 'Skill Gate',
1000
+ 'stale-branch-guard.sh': 'Warn when working on a stale branch',
1001
+ 'stale-env-guard.sh': 'Warn when .env files are very old',
1002
+ 'system-message-workaround.sh': 'Ensure hook warnings reach both user and model',
1003
+ 'temp-file-cleanup-stop.sh': 'Clean up tmpclaude-* files on session end',
1004
+ 'temp-file-cleanup.sh': 'Stop hook',
1005
+ 'tmp-cleanup.sh': 'Clean up /tmp/claude-*-cwd temp files',
1006
+ 'token-budget-guard.sh': 'Estimate and limit session token cost',
1007
+ 'token-budget-per-task.sh': 'Track and warn on per-task token usage',
1008
+ 'virtual-cwd-helper.sh': 'Remind about virtual working directory',
1009
+ },
1010
+ 'Agent Controls': {
1011
+ 'max-concurrent-agents.sh': 'Limit number of simultaneous subagents',
1012
+ 'max-subagent-count.sh': 'Max Subagent Count',
1013
+ 'mcp-config-freeze.sh': 'Prevent MCP configuration changes during session',
1014
+ 'mcp-data-boundary.sh': 'Prevent MCP tools from accessing sensitive paths',
1015
+ 'mcp-orphan-process-guard.sh': 'Detect orphaned MCP server processes',
1016
+ 'mcp-server-allowlist.sh': 'Restrict MCP tool calls to allowed servers',
1017
+ 'mcp-server-guard.sh': 'Block unauthorized MCP server configuration changes',
1018
+ 'mcp-tool-guard.sh': 'Mcp Tool Guard',
1019
+ 'subagent-budget-guard.sh': 'Subagent Budget Guard',
1020
+ 'subagent-claudemd-inject.sh': 'Inject CLAUDE.md rules into subagent prompts',
1021
+ 'subagent-context-size-guard.sh': 'Warn on thin subagent prompts',
1022
+ 'subagent-scope-guard.sh': 'Limit subagent file access scope',
1023
+ 'subagent-scope-validator.sh': 'Validate subagent task scope before launch',
1024
+ 'subagent-tool-call-limiter.sh': 'Limit total tool calls per session',
1025
+ },
1026
+ 'Other': {
1027
+ 'token-spike-alert.sh': 'Alert on abnormal token consumption per turn',
535
1028
  },
536
1029
  };
537
1030