Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Llm Guardrails?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-llm-guardrails)
---
description: Enforce input and output safety checks around LLM calls using schemas, PII scrubbing, policy checks, and graceful fallbacks
profile: standard
tags: ai, llm, security, guardrails
---
# LLM guardrails
Use when filtering untrusted inputs, validating model responses, or enforcing safety/policy constraints in production AI apps.
## Defense layers
- Treat guardrails as fast, deterministic checks before and after model calls: length/token caps, PII/secret redaction, schema validation, and domain blocklists/classifiers.
- Run cheap deterministic checks (regex/length/JSON schema) synchronously before costly LLM-judge classifiers, and parallelize independent input checks to protect latency.
- Enforce tool/action authorization in application code based on user session—never let an LLM response trigger privileged writes directly without RBAC checks.
## Graceful failures
- Define safe, non-leaky fallback responses when a guardrail trips, logging trigger category and prompt version without storing raw sensitive inputs.
- Monitor false-positive and false-negative trigger rates continuously against curated edge-case evaluation sets.
## Verify
Run adversarial prompt tests, malformed output tests, and benign edge cases verifying latency overhead stays within budget.