Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Agent Guardrails: Prompt-Injection & Exfiltration Defense

    1

    Secure an LLM agent against prompt injection, data exfiltration and unsafe actions, with a deterministic allow/ask/deny policy gate, PII redaction and an EU GDPR/AI Act checklist.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Agent Guardrails: Prompt-Injection & Exfiltration Defense

    Agent Guardrails: Prompt-Injection & Exfiltration Defense

    Example session with this skill installed

    We're giving our sales assistant agent access to the CRM (read), the user's inbox (read), web browsing, and a send_email tool so it can follow up with leads automatically. Do a security review and write a tool policy. Put the review in security_review.md and the policy in policy.json.

    • Read your context and instructions
    • Compiled the agent guardrails

    security_review.md: HIGH: the toolset forms the exfiltration triad (CRM + inbox = private data; inbound email and web pages = untrusted content; send_email = outbound channel). An instruction hidden in a lead's email or web page could make the agent mail CRM data to an attacker. Threat table T1–T14 with likelihood, impact, control and owner; red-team cases added. policy.json: CRM/inbox/browse = read → allow; send_email = external-comm → ask, with an allow rule only for recipients already in the CRM lead record and a deny for any address found in untrusted content; unknown tools denied.

    security_review.md

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

    About this skill

    Assume the model will eventually follow an instruction you did not write. This skill makes that event harmless: the agent can only do what its permissions allow, risky actions need a deterministic yes, and secrets and personal data never sit where an injected instruction could reach them.

    What your agent does with it

    • Threat-models the agent with a 14-threat worksheet (direct and indirect injection, output exfiltration, excessive agency, cross-tenant access, denial of wallet, memory poisoning, supply chain…).
    • Audits the toolset for the exfiltration triad: private data + untrusted content + an outbound channel.
    • Writes a policy file and wires a deterministic allow/ask/deny gate before every tool call. Rules by tool glob and argument conditions (max, in, regex, domain allow-list, path_under…); unknown tools are denied; a missing argument never satisfies a condition.
    • Designs human approvals people actually read, and measures rubber-stamping.
    • Locks down secrets, sandboxing and logs, with a PII/secret redactor (emails, phones, checksum-validated IBANs, Luhn-validated cards, IPs, API keys).
    • Red-teams with a ready attack list and turns every successful attack into a regression eval.
    • EU compliance checklist: GDPR and AI Act engineering guidance to prepare for your DPO (not legal advice).

    Included: SKILL.md, threat-model worksheet, EU compliance checklist, policy_gate.py (check + audit CLI and importable decide()), redact.py, and an eval case. Scripts are standard-library Python.

    Part of the Production AI Agents series. Start free with Agent Architecture: Should This Be an Agent?; pair with Agent Evals to turn red-team attacks into regression tests, and with MCP Server in Production for server-side auth.

    Engineering guidance, not legal advice. The redactor is a safety net for logs (names and free-text identifiers need minimisation upstream). Does not define tool schemas (see agent-tool-design) or build logging pipelines (see agent-observability).

    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 1 day ago

    Requires

    Python 3.10+

    Permissions

    File Scopes

    Your
    project
    folder
    (writes
    the
    review
    policy
    file
    and
    red-team
    cases)

    Bundled scripts run locally with the Python standard library and make no network calls.

    Listed1 day ago

    What's inside

    Frequently Asked Questions

    No. Allow/ask/deny is decided by code from the tool name and arguments. The model never judges its own safety.

    No. Both scripts use only the Python 3.10+ standard library. PyYAML is optional if you prefer YAML policy files.

    No. It is an engineering checklist to prepare a conversation with your DPO and legal counsel.

    New in Security