guardrails

Enforces input, output, and per-tool policy checks with tripwire short-circuiting for agent runs.

3|2|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/Yoodaddy0311/artibot --skill guardrails-yoodaddy0311
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: guardrails
Source: https://github.com/Yoodaddy0311/artibot/tree/main/plugins/artibot/skills/guardrails
Command: npx skills add https://github.com/Yoodaddy0311/artibot --skill guardrails-yoodaddy0311

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LLM refusals are probabilistic, so agents processing untrusted input or calling sensitive tools (file writes, shell exec, network egress) need deterministic policy enforcement that can halt a run before damage occurs. ## Core Features & Use Cases - Input/Output Guardrails: Async checks that run in parallel against agent input and output, returning a tripwire result with an optional refusal message. - Per-Tool Guardrails: A registry for gating sensitive tool invocations with configurable behavior: reject_content (continue with refusal) or raise_exception (throw GuardrailTripped). - Use Case: An agent accepts free-form user text that may contain prompt injection or PII. Register a guardrail, run it via runAll(guardrails, ctx, input), and short-circuit the run with a refusal payload when the tripwire fires. ## Quick Start Add a guardrail that checks incoming user input for prompt injection and short-circuits the agent run with a refusal if the tripwire triggers.

Frequently Asked Questions about guardrails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add input validation guardrails to an AI agent?▼

Write a guardrail function returning { tripwireTriggered, info, refusal? } and execute it with runAll(guardrails, ctx, input). The checks run in parallel, and any single trip short-circuits the run with a refusal or a thrown GuardrailTripped error.

How do I guard a sensitive tool call like shell exec or file write?▼

Register a per-tool guardrail with registerToolGuardrail and choose a behavior: reject_content continues the run with a refusal, while raise_exception throws. Calls are evaluated through evaluateToolInput(toolName, params) before execution.

Guardrails vs Zod schema validation: which should I use?▼

Zod validates data shape and types; guardrails validate intent and policy, such as prompt injection or PII detection. Use both together: schemas for structure at the call site, guardrails for policy enforcement on untrusted content.

When should I not use guardrails?▼

Skip guardrails for trivial single-call utilities with no untrusted input, pure functions already type-checked at the call site, and operations where blocking is unsafe such as logging or telemetry stubs. They also add async overhead to hot paths.

Why is my guardrail not stopping bad outputs?▼

Common causes include guardrails that mutate input in place instead of returning a tripwire result, per-tool guardrails registered globally at module import rather than in run setup, or missing tests confirming the tripwire fires on known-bad input.