More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Block Accidental Billing and API Writes in Claude Code

    1

    - Hook templates: a PreToolUse adapter that exits 2 before a covered write, a non-blocking host-warning hook, a settings excerpt, and a numbered human decision packet.

    $25

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Block Accidental Billing and API Writes in Claude Code

    Block Accidental Billing and API Writes in Claude Code

    Example session with this skill installed

    Run the guard on the sample hook events in examples/sample_pretooluse_cases.json and show me which of the eight events it blocks and which it lets through.

    • Read your context and instructions
    • Compiled the block accidental billing

    Summary

    The guard checked 8 synthetic Claude Code hook events: 5 blocked, 3 allowed (status GUARDED).

    CaseToolDecisionWhy
    1BashBlockedbilling CLI mutation command
    2BashBlockedmutating HTTP request targets a billing or ad API
    3BashBlockedbilling CLI mutation command
    4BashBlockedinline SDK call requests a write operation
    5BashAllowedread-only HTTP GET request permitted
    6BashAllowedno covered write pattern detected
    7BashAllowedno covered write pattern detected
    8MCP form inputBlockedLuhn-valid card-like number appears in nested tool input

    Blocked by rule: billing CLI mutation 2, billing HTTP write 1, SDK write 1, card-like input 1. Allowed: 3.

    Next steps

    1. Copy the guard and the hook adapter into your project hook directory and add the settings excerpt.
    2. Run the test suite, then enable the hook on a working project.
    3. Keep provider credentials read-only and keep your permission deny rules as separate layers.

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

    About this skill

    For engineers running Claude Code near payment services, ad accounts, and production APIs: stop covered write actions before execution while keeping safe reads and local work moving.

    What is included

    • scripts/billing_write_guard.py reviews a Claude Code PreToolUse event or a JSON batch and prints a decision report as text, JSON, CSV, or Markdown. With --strict it exits 2 in CI if any case is blocked.
    • scripts/domain_allowlist_check.py checks one URL or command against an exact-host list. Wildcard entries are rejected; unlisted external hosts warn, or fail with --strict.
    • Hook templates: a PreToolUse adapter that exits 2 before a covered write, a non-blocking host-warning hook, a settings excerpt, and a numbered human decision packet.
    • Four architecture guides, synthetic examples, and regression tests (python3 -m unittest discover tests). Python standard library only.

    What it covers

    Selected billing CLI mutations, common curl/wget/httpie write flags, inline SDK mutations, write-named MCP tools, and Luhn-valid card-like values in tool input, including strings nested inside MCP tool input.

    Read-only boundaries

    Keep provider credentials restricted to read-only permissions and add narrowly scoped permissions.deny rules in Claude Code. The hook adds a local execution boundary on top of those layers; it does not replace them. Treat billing, payment, ad-account, production configuration, publication, and destructive work as actions that need a human decision.

    Limits

    This is a pattern-based guard, not a shell or language interpreter. A command assembled with eval, a script fetched from an external file, or a runtime-built SDK method may not be recognized. Digits inside URLs are not checked as card data. The host checker does not resolve DNS. Test both blocked writes and permitted reads on your own setup before relying on it.

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

    This is a pattern-based guard, not a shell or language interpreter. A command assembled with eval, a script fetched from an external file, or a runtime-built SDK method may not be recognized. Digits inside URLs are not checked as card data, and the host checker does not resolve DNS. Keep provider credentials read-only and your Claude Code permission deny rules as separate layers, and test blocked writes and permitted reads on your own setup.

    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

    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 today

    Software
    Python 3Claude Code with hook support

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listedtoday

    What's inside

    Frequently Asked Questions

    It reads a Claude Code PreToolUse event and checks selected billing CLI mutations, common curl, wget and httpie write flags, inline SDK mutations, write-named MCP tools, and Luhn-valid card-like values, including strings nested inside MCP tool input. A covered write is blocked with exit 2 before it runs.

    No. The hook is a local execution boundary. Keep provider credentials restricted to read-only permissions and keep narrowly scoped permissions.deny rules in Claude Code as separate layers. No single local hook guarantees that every write is stopped.

    Two Python standard-library command-line tools (the billing write guard and an exact-host allowlist checker), a PreToolUse hook adapter, a non-blocking host-warning hook, a settings excerpt, a numbered human decision packet template, four architecture guides, synthetic examples, and regression tests.

    Run the guard on the bundled sample file of eight synthetic hook events. It prints a decision report (5 blocked, 3 allowed) that you can compare byte for byte with the saved expected output. The check makes no network request and reads no account credentials. Then run the test suite with python3 -m unittest discover tests.

    No. It is pattern-based, not a shell or language interpreter. A command assembled with eval, a script fetched from an external file, or a runtime-built SDK method may not be recognized, and digits inside URLs are not checked as card data. Adapt the patterns to your own API surface and test both blocked writes and permitted reads.

    It compares a URL or command against an exact-host list, one hostname per line; wildcard entries are rejected. Unlisted external hosts produce a warning (or exit 1 with --strict). It does not resolve DNS or prove that a host exists, so verify a host through a trusted source before changing the list.

    New in LLM Ops