More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Claude Code Hooks Pro: 7 Tested Hooks + Installer

    2

    7 tested Claude Code hooks, installed in one command: block dangerous commands, protect secrets, auto-format, and run tests before Claude finishes.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Claude Code Hooks Pro: 7 Tested Hooks + Installer

    Claude Code Hooks Pro: 7 Tested Hooks + Installer

    Example session with this skill installed

    Install guardrail hooks in my project: block dangerous commands, protect secrets, auto-format on edit, add session context, and run tests before you stop.

    • Read your context and instructions
    • Compiled the claude code hooks

    Installed 5 hooks into .claude/settings.json (backup saved as settings.json.bak). All 22 tests pass.

    Install

    $ bash install.sh --scope project --hooks block-dangerous,protect-secrets,format-on-edit,session-context,tests-before-stop
    installed block-dangerous -> PreToolUse (Bash)
    installed protect-secrets -> PreToolUse (Read|Edit|Write|MultiEdit|Bash)
    installed format-on-edit -> PostToolUse (Edit|Write|MultiEdit)
    installed session-context -> SessionStart
    installed tests-before-stop -> Stop
    settings: .claude/settings.json (backup: .claude/settings.json.bak). Run /hooks in Claude Code to verify.
    

    Tests

    $ bash tests/run.sh
    passed 22, failed 0
    

    What it blocks (real output)

    $ echo '{"tool_input":{"command":"rm -rf ~"}}' | .claude/hooks/block-dangerous.sh
    Blocked by block-dangerous hook: command matches /rm.../. Use a safer alternative or ask the user to run it manually.
    exit 2
    
    $ echo '{"tool_input":{"file_path":"/app/.env.production"}}' | .claude/hooks/protect-secrets.sh
    Blocked by protect-secrets hook: '/app/.env.production' looks like a secret. Ask the user for the specific non-secret value instead.
    exit 2
    
    Command / fileResult
    rm -rf node_modulesallowed
    git push origin feature/xallowed
    git push --force origin mainblocked
    .env.exampleallowed
    ~/.ssh/id_ed25519blocked

    Next steps

    • Run /hooks in Claude Code to see them registered.
    • Add CLAUDE_TEST_CMD in settings env if your test command isn't auto-detected.
    • Put extra patterns in .claude/hooks/blocklist.txt.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    7 tested Claude Code hooks, installed in one command: block dangerous commands, protect secrets, auto-format, and run tests before Claude finishes.

    Claude Code's permission rules are a good start, but they can't format files, run your tests, or catch dangerous commands written in a dozen different ways. Hooks can, and you see every script before it runs.

    What you get

    HookEventWhat it does
    block-dangerousPreToolUse (Bash)Blocks rm -rf / or ~, sudo, curl-pipe-to-shell installs, force-push to main/master, chmod 777, mkfs/dd to disks, DROP DATABASE, git reset --hard origin. Normal commands like rm -rf node_modules still work.
    protect-secretsPreToolUse (Read/Edit/Write/Bash)Blocks .env*, SSH keys, ~/.aws credentials, *.pem/*.key, .npmrc/.pypirc/.netrc. Allows .env.example.
    format-on-editPostToolUseFormats the edited file with prettier, ruff/black, gofmt, rustfmt or shfmt, only if installed and only inside the project.
    tests-before-stopStopRuns your fast tests when there are uncommitted changes; if they fail, Claude is told to fix them. Loop-safe.
    session-contextSessionStartAdds branch, uncommitted files, last 5 commits and HANDOFF.md to context.
    notifyNotificationDesktop notification on macOS and Linux (a beep on WSL) when Claude needs you.
    precompact-handoffPreCompactSaves a git-state snapshot before context compaction.

    Plus: an installer (install.sh) that merges hooks into project, local or user settings with jq, backs up the file and never duplicates entries; a 22-case test harness; your own block/protect lists (blocklist.txt, protected.txt); templates to write new hooks.

    How it works

    1. Claude asks which hooks and which scope you want, and shows you the scripts.
    2. install.sh --scope project --hooks block-dangerous,protect-secrets,...
    3. tests/run.sh checks every hook (22/22 must pass).
    4. Run /hooks in Claude Code to confirm they're registered.

    Requirements

    Claude Code, bash and jq (macOS, Linux or WSL). Formatters and test runners are used only if your project already has them.

    Limits

    Pattern-based blocking is a safety net, not a sandbox: keep Claude Code's permission rules on too. Windows without WSL is not supported.

    Requires jq installed on the host. Scripts must execute within 2 seconds. Hooks run with user permissions.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 4 days ago

    Requires

    X
    Claude Code
    jq + bash (macOS, Linux or WSL)
    macOS only

    Permissions

    Terminal / Shell
    Network Access
    Write Files

    Allowed Hosts

    x.sh
    Listed4 days ago

    What's inside

    Frequently Asked Questions

    This skill provides a hardened layer of shell-level guardrails that physically block dangerous commands and secret leaks, which standard system prompts often fail to prevent during complex tasks.

    Claude Hooks Pro is designed specifically for the Claude Code CLI environment and requires Bash and the 'jq' utility to be installed on your host system.

    Yes, you can choose specific hooks from the library and define their scope at the project, local, or user level during the selection and deployment phase.

    The skill includes a built-in test harness that allows you to simulate payloads, ensuring your hooks are active and correctly blocking or formatting as intended.

    You receive the full library of production-ready shell hooks, the automated installer and configuration merger, and the validation test harness for your workspace.

    To maintain a snappy development experience, all hooks are optimized to execute in under 2 seconds, preventing any noticeable lag in Claude Code's responsiveness.

    New in LLM Ops