Claude Skill

Apply rule-based guardrails to agent traces and tool flows with Invariant

Insert a trace-aware guardrail layer between agents and their tools so unsafe message patterns or tool-call sequences are blocked by explicit rules.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download agentskillexchange-skills-skills_apply-rule-based-guardrails-to-agent-traces-and-tool-flows-with-invariant-07beb56.zip · 1 KB
Part of agentskillexchange/skills — 249 skills

Install

skills CLI npx skills add https://github.com/agentskillexchange/skills/tree/main/skills/apply-rule-based-guardrails-to-agent-traces-and-tool-flows-with-invariant
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install agentskillexchange-skills@llmmart
Git git clone https://github.com/agentskillexchange/skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole agentskillexchange/skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Apply rule-based guardrails to agent traces and tool flows with Invariant

Insert a trace-aware guardrail layer between agents and their tools so unsafe message patterns or tool-call sequences are blocked by explicit rules.

Prerequisites

Python environment or Invariant Gateway deployment, target LLM or MCP-enabled agent workflow, guardrail rules or policies, sample traces or live requests to evaluate

Installation

Requirements and caveats from upstream:

  • Guardrailing rules are simple Python-inspired matching rules, that can be written to identify and prevent malicious agent behavior:
  • python
  • Here, (msg: Message) automatically is assigned every checkable message, whereas the second line executes like regular Python. To facilitate checking Guardrails comes with an extensive standard library of operations, a...

Basic usage or getting-started notes:

Documentation

Source

Files (skills)
  • SKILL.md 2 KB
    ---
    name: "Apply rule-based guardrails to agent traces and tool flows with Invariant"
    slug: "apply-rule-based-guardrails-to-agent-traces-and-tool-flows-with-invariant"
    description: "Insert a trace-aware guardrail layer between agents and their tools so unsafe message patterns or tool-call sequences are blocked by explicit rules."
    github_stars: 409
    verification: "security_reviewed"
    source: "https://github.com/invariantlabs-ai/invariant"
    author: "Invariant Labs"
    publisher_type: "organization"
    category: "Security & Verification"
    framework: "Multi-Framework"
    tool_ecosystem:
      github_repo: "invariantlabs-ai/invariant"
      github_stars: 409
      npm_package: "invariant-ai"
      npm_weekly_downloads: 1473
    ---
    
    # Apply rule-based guardrails to agent traces and tool flows with Invariant
    
    Insert a trace-aware guardrail layer between agents and their tools so unsafe message patterns or tool-call sequences are blocked by explicit rules.
    
    ## Prerequisites
    
    Python environment or Invariant Gateway deployment, target LLM or MCP-enabled agent workflow, guardrail rules or policies, sample traces or live requests to evaluate
    
    ## Installation
    
    Requirements and caveats from upstream:
    - Guardrailing rules are simple Python-inspired matching rules, that can be written to identify and prevent malicious agent behavior:
    - python
    - Here, (msg: Message) automatically is assigned every checkable message, whereas the second line executes like regular Python. To facilitate checking Guardrails comes with an extensive standard library of operations, a...
    
    Basic usage or getting-started notes:
    - <a href="https://invariantlabs-ai.github.io/docs/mcp-scan/guardrails-reference/">Getting Started</a> |
    
    - Source: https://github.com/invariantlabs-ai/invariant
    - Extracted from upstream docs: https://raw.githubusercontent.com/invariantlabs-ai/invariant/HEAD/README.md
    
    ## Documentation
    
    - https://invariantlabs-ai.github.io/docs/mcp-scan/guardrails-reference/
    
    ## Source
    
    - [Agent Skill Exchange](https://agentskillexchange.com/skills/apply-rule-based-guardrails-to-agent-traces-and-tool-flows-with-invariant/)
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related