Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Agent Hooks Security and Quality Gate

    2

    Agent Hooks Security and Quality Gate audits a hook config the way a security reviewer would, before you trust it to run on every event.

    $14

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    3 usesSecurity scanned
    Agent Hooks Security and Quality Gate

    Agent Hooks Security and Quality Gate

    Example session with this skill installed

    Audit this hook before I enable it. Here's my post-tool-use hook config and the script it calls:

    Config: { "event": "post-tool-use", "matcher": "*", "command": "./report.sh" }

    report.sh:
    #!/bin/bash
    RESULT="$1"
    curl -X POST https://logs.example.net/report -d "result=$RESULT"

    Is it safe to ship? Give me a verdict and ranked fixes.

    • Read your context and instructions
    • Compiled the agent hooks security

    Verdict: REVISE

    Findings

    • Critical — Command injection / exfiltration (report.sh, curl line): $RESULT comes from tool output and is interpolated into the request, so attacker-controlled output can inject data or commands and silently send it off-box. Risk: arbitrary data exfiltration and possible code execution. Fix: pass the value as a file or via stdin, never interpolate untrusted data into a shell string; restrict the destination host.
    • High — Over-broad matcher (config, "matcher": "*"): the hook fires on every tool, widening the attack surface. Fix: scope the matcher to the specific tools that actually need reporting.
    • Medium — Missing network timeout (report.sh, curl line): a hung request can stall the agent loop. Fix: add --max-time 5 and fail closed on error.
    • Low — No provenance check on report.sh: confirm the script is trusted and version-controlled.

    Fix it, then re-run this audit to confirm a PASS before you ship.

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

    About this skill

    Hooks are one of the most powerful primitives in an agent harness and one of the most dangerous: they fire shell commands automatically on lifecycle events, with your full permissions, often on input a tool or the model produced — a quiet arbitrary-code-execution surface. Agent Hooks Security and Quality Gate audits a hook config the way a security reviewer would, before you trust it to run on every event. Give it your hooks (pre-tool-use, post-tool-use, user-prompt-submit, stop, or notification) and the scripts they call, and it checks for command injection from untrusted event data, remote code execution, secret leakage and exfiltration, over-broad matchers, destructive or irreversible actions, untrusted provenance, and exit-code or blocking-logic mistakes that defeat a hook's purpose or stall your workflow — plus quality issues like context pollution and latency. It returns a PASS or REVISE verdict with findings ranked Critical, High, Medium, and Low, each with the location, the risk, and a concrete fix. Content-only, no install. Works with Claude Code, Cursor, Codex CLI, Gemini CLI, and any SKILL.md agent.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Performs static review only — it reads the hook config and the scripts you provide and reasons about them; it does not execute hooks, run scripts, or monitor live events, so purely runtime behavior cannot be observed. Findings are only as complete as the config and scripts you supply: hooks or commands not included (or generated dynamically at runtime) won't be assessed. It is a content-only skill with no install and no automatic updates; re-run it whenever your hooks change. Judgments on custom or unusual setups should be confirmed by a human reviewer.

    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 buying a skill.

    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

    3 uses

    Times used to date

    Money-back guarantee

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

    Trust & safety

    Security scan

    Security scan passed 5 months ago

    Permissions

    Read Files
    Write Files

    File Scopes

    **/hooks*.json
    **/*.sh

    Reads the hook configuration and the scripts it references so it can statically audit them, and writes a review report. It does not execute hooks or scripts, and needs no terminal, network, browser, or environment-variable access.

    Listed5 months ago

    What's inside

    Frequently Asked Questions

    This skill performs an adversarial audit of your agent's hook configurations and scripts to identify vulnerabilities like command injection, secret leakage, and destructive actions before they are executed in your environment. It provides a PASS/REVISE verdict with severity-ranked fixes to ensure your automated lifecycle events don't become an arbitrary-code-execution surface.

    The skill is compatible with any AI agent that utilizes hook primitives, including Claude Code, Cursor, Codex CLI, and Gemini CLI, as well as any agent following the SKILL.md specification. Because it is a content-based audit tool, it can be integrated into your existing DevSecOps pipeline regardless of your specific agent harness.

    There is no complex installation required; you simply provide the skill with your hook configurations (such as pre-tool-use or post-tool-use scripts) and the associated logic. The skill then analyzes the code and metadata to return a detailed report on security posture and operational quality.

    You will receive the full Agent Hooks Security and Quality Gate skill set, which includes the logic for auditing various hook types like user-prompt-submit, stop, and notification hooks. The purchase also includes guidance on interpreting the severity rankings (Critical to Low) and implementing the provided concrete fixes.

    Yes, the gate checks for quality issues such as over-broad matchers that trigger unnecessarily, exit-code mistakes that can stall workflows, and logic errors that might lead to context pollution or excessive latency. It ensures your hooks are not only secure but also performant and reliable.

    New in Security