Armory
Source
Browse
Hooks

pre-tool-use

Run before every tool call to inspect, gate, or block the tool input (e.g. veto dangerous shell commands).

Score
Unranked
Evidence
No signals yet
Last commit
Not known
Listed

Install

armory install pre-tool-use --cli claude

writes the file to.claude/hooks/pre-tool-useListed as compatible

Configuration
# fetches the hook script into:
.claude/hooks/pre-tool-use
# then register it in your settings.json "hooks" block.

↳ Add the hook entry to settings.json, then restart the harness.

Needs the armory CLI · not on npm yet, build it from cli/ in the repository

What it is

A Claude Code hook from disler/claude-code-hooks-mastery. Run before every tool call to inspect, gate, or block the tool input (e.g. veto dangerous shell commands).

When to use it

Run before every tool call to inspect, gate, or block the tool input (e.g. veto dangerous shell commands).

How to install / invoke

# wire the script into .claude/settings.json hooks for the matching event
curl -sL https://github.com/disler/claude-code-hooks-mastery/raw/main/.claude/hooks/pre_tool_use.py -o .claude/hooks/pre-tool-use.py

Notes

Extracted from .claude/hooks/pre_tool_use.py. See the repo for the settings.json wiring and full implementation.

Source docstring: Comprehensive detection of dangerous rm commands. Matches various forms of rm -rf and similar destructive patterns.

Related

HooksPreview

notification

Run on Claude Code notification events to surface alerts (e.g. text-to-speech, desktop toast).

Harnessclaude
hookdisler
Details
HooksPreview

permission-request

Run when a permission dialog is shown, to audit, auto-approve, or deny tool permissions.

Harnessclaude
hookdisler
Details