Commit a559568
chore(hooks): dedupe .claude/.codex hooks and soften skill_guard (#594)
- .claude/hooks/* is now canonical; .codex/hooks/* are relative symlinks
pointing at the canonical files (HOOKS.md documents the layout).
- skill_guard.py: add GUARDEX_AGENT_BRANCH_PREFIXES env var so users can
recognize session-managed branches (claude/*, codex/*, ...) without
forking the hook. agent/ stays in the always-on default set.
- skill_guard.py: extend the read-only allowlist with version probes
(node/python/etc --version) so simple inspection no longer requires
ALLOW_BASH_ON_NON_AGENT_BRANCH=1.
- Add test/skill-guard-hook.test.js covering the allow/block matrix on
main and agent/* and the env-override behavior.
Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>1 parent e403486 commit a559568
11 files changed
Lines changed: 378 additions & 1082 deletions
File tree
- .claude/hooks
- .codex/hooks
- openspec/changes/agent-claude-dedupe-hooks-soften-skill-guard-2026-05-17-00-35
- specs/dedupe-hooks-soften-skill-guard
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| |||
273 | 281 | | |
274 | 282 | | |
275 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
276 | 318 | | |
277 | 319 | | |
278 | 320 | | |
| |||
288 | 330 | | |
289 | 331 | | |
290 | 332 | | |
291 | | - | |
| 333 | + | |
292 | 334 | | |
293 | 335 | | |
294 | 336 | | |
| |||
423 | 465 | | |
424 | 466 | | |
425 | 467 | | |
426 | | - | |
| 468 | + | |
427 | 469 | | |
428 | 470 | | |
429 | 471 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments