ClaudeHooks — Development skill for Claude Code
PowerShell helpers for writing and registering Claude Code hook scripts.
How to install ClaudeHooks
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open HeyItsGilbert/ClaudeHooks and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What ClaudeHooks does
PowerShell helpers for writing and registering Claude Code hook scripts.
Alternatives in Development
- Career-Ops For Codex — Read CLAUDE.md for all project instructions, routing, and behavioral rules 32.5k ★
- Interview Script — Create structured customer interview scripts with JTBD probing 7.8k ★
- Claude Hooks Mastery — 3,300+ Complete mastery guide for Claude Code hooks with production-ready scripts 3.4k ★
README
ClaudeHooks
PowerShell helpers for writing and registering [Claude Code](https://code.claude.com) hook scripts.
Installation
Install from the [PowerShell Gallery](https://www.powershellgallery.com/packages/ClaudeHooks):
Install-Module ClaudeHooks
Quickstart: Write a hook
Create a hook script that denies `rm -rf` commands in Bash:
# ~/.claude/hooks/block-rm-rf.ps1
Import-Module ClaudeHooks
$hook = Read-ClaudeHookInput
$base = Get-ClaudeBashBaseCommand $hook.tool_input.command
if ($base -eq 'rm' -and $hook.tool_input.command -match '-rf?') {
Write-ClaudeHookDeny -Reason 'rm -rf is not allowed. Use Remove-Item -Recurse instead.'
}
Then register it:
Add-ClaudeHookConfig -Event PreToolUse -Matcher Bash `
-ScriptPath '~/.claude/hooks/block-rm-rf.ps1' -Scope User
Quickstart: Register a hook
List all registered hooks:
Get-ClaudeHookConfig | Format-Table
Test a hook with sample input:
Test-ClaudeHookConfig -Event PreToolUse -Matcher Bash
Remove a hook:
Remove-ClaudeHookConfig -Event PreToolUse -Matcher Bash `
-ScriptPath '~/.claude/hooks/block-rm-rf.ps1' -Scope User
Decision matrix
Choose the right function based on your hook's situation:
| Situation | Use |
|---|---|
| PreToolUse - allow | Write-ClaudeHookAllow |
| PreToolUse - deny | Write-ClaudeHookDeny |
| PreToolUse - ask user | Write-ClaudeHookAsk |
| PreToolUse - allow with modified input | Write-ClaudeHookUpdatedInput |
| Stop / UserPromptSubmit / PostToolUse - block | Write-ClaudeHookBlock |
| Any event - inject context for Claude |
Related Skills
Session Start.Skill
Orient a new agent session by loading swarm state, picking the highest-priority failing feature, and registeri
Repo Sync Agents
Apply .agents/skills/sync-agents/SKILL.md: run powershell -File scripts/sync-agents.ps1 (Windows) or ./scripts
Claude Config Transfer
Two PowerShell scripts that move a full Claude Code setup (settings, permissions, personal skills, all marketp
Port
Translate scripts between bash, POSIX sh, zsh, PowerShell, and Python
Claude Code Pwsh Guard
Claude Code hook pack that stops the agent firing Bash-only syntax at a Windows PowerShell session. Detects ex
Draft Skill
Agent skill that creates a new skill from an idea: confirms the purpose before writing, checks installed sibli
Related Agents
PowerShell Windows
Escreve scripts PowerShell robustos para administração de , AD, variáveis de ambiente, deploy e diagnóstico do
Claude Skill Builder
Builds Claude Code skills in ~/.claude/skills/ / (SKILL.md, scripts, tests), incl. API helpers with secret han
Playwright E2e
Playwright E2E testing specialist. Use for writing, reviewing, debugging, and optimizing Playwright tests. Pro