Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    safenode policies

    1

    Design and generate JSON security policies for SafeNode MCP Gateway and SDKs to control AI agent actions.

    Free

    1 useSecurity scanned
    safenode policies

    safenode policies

    Example session with this skill installed

    I need a SafeNode policy for my agent. It uses an MCP gateway. I want to allow file reading, but any file writes or deletes need human approval. Also, block any credit card numbers.

    • Read your context and instructions
    • Compiled the safenode policies

    I have mapped your requirements to a SafeNode policy. Since you are using the MCP Gateway, we will use context_match for the tool allowlist and redaction_metadata for sensitive data, as the gateway redacts cards before the policy engine sees them.

    SafeNode MCP Gateway Policy

    {
      "version": 1,
      "hard_rules": [
        {
          "id": "mcp-tool-allowlist",
          "type": "context_match",
          "params": {
            "context_key": "tool_name",
            "values": ["read_file", "list_directory", "search_files", "write_file", "delete_file"],
            "message": "Tool not in approved manifest."
          }
        },
        {
          "id": "block-financial-data",
          "type": "redaction_metadata",
          "params": {
            "forbidden_types": ["credit_card"],
            "message": "Action denied: payload contains credit card patterns."
          }
        }
      ],
      "soft_rules": [
        {
          "id": "review-write-delete",
          "type": "action_type_context_threshold",
          "weight": 100,
          "params": {
            "action_types": ["mcp_tool_call"],
            "context_key": "tool_name",
            "values": ["write_file", "delete_file"],
            "message": "Write or delete operations require human oversight."
          }
        }
      ],
      "default_decision": "allow"
    }
    

    Next steps

    1. Tag tools: Ensure your gateway config includes the appropriate tool_name values for the allowlist to match.
    2. Test bands: Trigger a write_file call and verify it lands in the Review band (score 75+) in the dashboard.
    3. Monitor logs: Check the logFile for redaction_metadata hits to ensure card blocking is firing correctly.

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

    About this skill

    AI agents with tool access often pose security risks, from accidental data deletion to unauthorized financial transactions. This skill provides the logic to design and implement SafeNode policies, ensuring your agents operate within strict guardrails.

    What it does

    • Action Tiering categorizes agent tools into read-only, reversible, costly, or destructive buckets to determine baseline risk.
    • MCP Gateway Mapping handles the specific context requirements of tools behind the SafeNode gateway using tool_name and tags.
    • Rule Selection identifies the correct JSON rule types like context_match, sensitive_data, or spend_threshold for specific security goals.
    • Policy Drafting generates paste-ready JSON definitions for both hard rules (immediate denial) and soft rules (risk-based scoring).
    • Redaction Logic configures policies to act on client-side redaction metadata for credit cards and API keys.

    How it works

    1. Inventory the agent's available tools and assign them to risk tiers.
    2. Define the environment, whether using the SafeNode MCP Gateway or direct SDK integration, to determine how actions are identified.
    3. Select specific hard and soft rules based on requirements like business hours, geo-fencing, or payload inspection.
    4. Deploy the generated JSON into the SafeNode dashboard and verify against the decision log.

    Frameworks & tools

    This skill is designed for the SafeNode MCP Gateway and SafeNode SDKs. It generates JSON policy definitions compatible with the SafeNode dashboard.

    Why this beats prompting it yourself

    Generic prompts often fail to account for the technical distinction between action_type matches in SDKs versus context_match requirements in the MCP gateway. This skill applies specific patterns for redaction metadata that prevent "empty" matches on already-redacted strings.

    Use cases

    • Block Destructive Actions by creating hard-deny rules for tool patterns like delete_* or drop_*.
    • Enforce Human Review for high-cost tools like payment processing or bulk email sends based on count thresholds.
    • Prevent Data Leakage by monitoring for [REDACTED] tokens in tool arguments through redaction_metadata rules.
    • Geo-fence Agents to ensure data processing only occurs within approved cloud regions or countries.

    Known limitations

    Policies cannot detect prompt injection or agent reasoning, only the resulting tool calls. The context_match rule only supports allowlists, not individual blocks.

    Policy evaluation counts toward monthly account quotas. Cannot detect prompt injection. context_match is allowlist-only. Gateway is not a sandbox.

    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

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Requires

    SafeNode account
    Safenode Gateway Or A SafeNode SDK MCP

    Permissions

    Write Files
    Read Files

    File Scopes

    safenode-gateway.json
    safenode-decisions.jsonl

    Reads your gateway config to list the tools your agent can call, and adds risk tags to it so policies can target specific tools. Writes policy JSON for you to review and paste into the SafeNode dashboard. It never calls the SafeNode API or changes a policy itself. Reads the local decision log to check that rules fire as intended.

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    This skill provides the logical framework to design and generate precise JSON security policies that prevent AI agents from performing unauthorized, destructive, or high-cost actions through the SafeNode ecosystem.

    The skill is purpose-built for the SafeNode MCP Gateway and SafeNode SDKs; it generates JSON configurations that can be directly applied to any AI agent or LLM integrated with these specific security layers.

    Unlike basic prompts, this skill understands the technical nuances between Gateway 'context_match' and SDK 'action_type' logic, ensuring your policies don't fail due to structural mismatches or empty redaction triggers.

    You receive a specialized design interface that inventories your agent's tools, assigns risk tiers, and outputs deployable JSON policy definitions for both hard denials and soft risk-scoring.

    No, these policies act as a gatekeeper for the tool calls themselves; they are designed to monitor and restrict outgoing actions and arguments rather than analyzing the agent's internal reasoning or input prompts.

    Setup is straightforward: you inventory your agent's tools using the skill's logic, select your desired guardrails (like geo-fencing or spend limits), and then paste the generated JSON into your SafeNode dashboard.

    New in LLM Ops