Implementing LLM Guardrails for Security
Implements input and output validation guardrails for LLM-powered applications to prevent prompt injection, data leakage, toxic content generation, and hallucinated outputs. Builds a security validation pipeline using NVIDIA NeMo Guardrails Colang definitions, custom Python validators for PII detection and content policy enforcement, and the Guardrails AI framework for structured output validation. The guardrails system intercepts both user inputs (blocking injection attempts, stripping PII, enforcing topic boundaries) and model outputs (detecting hallucinations, filtering toxic content, valid
Install
npx skills add adriannoes/awesome-agentic-ai --skill implementing-llm-guardrails-for-securitygit clone --depth 1 https://github.com/adriannoes/awesome-agentic-ai.git /tmp/awesome-agentic-ai
mkdir -p ~/.claude/skills
cp -r /tmp/awesome-agentic-ai/cursor-claude-codex/skills/anthropic-cybersecurity-skills/skills/implementing-llm-guardrails-for-security ~/.claude/skills/implementing-llm-guardrails-for-securityPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Implementing LLM Guardrails for Security ## When to Use - Deploying a new LLM-powered application that processes user input and needs input/output safety controls - Adding content policy enforcement to an existing chatbot or AI agent to comply with organizational policies - Implementing PII detection and redaction in LLM pipelines handling sensitive customer data - Building topic-restricted AI assistants that must refuse off-topic or disallowed queries - Validating that LLM responses conform to expected schemas before they reach downstream systems or users - Protecting RAG pipelines from indirect prompt injection in retrieved documents **Do not use** as a replacement for proper authentication, authorization, and network security controls. Guardrails are a defense-in-depth layer, not a perimeter defense. Not suitable for real-time content moderation of user-to-user communication without LLM involvement. ## Prerequisites - Python 3.10+ with pip for installing guardrail dependencies - An OpenAI API key or local LLM endpoint for NeMo Guardrails self-check rails (set as `OPENAI_API_KEY` environment variable) - The `nemoguardrails` package for Colang-based guardrail definitions - The `guardrails-ai` package for structured output validation (optional, for JSON schema enforcement) - Familiarity with YAML configuration and basic Colang 2.0 syntax for defining rail flows ## Workflow ### Step 1: Install Guardrail Frameworks Install the required Python packages:
Details
- Skill name
implementing-llm-guardrails-for-security- Repository
- adriannoes/awesome-agentic-ai
- Path
cursor-claude-codex/skills/anthropic-cybersecurity-skills/skills/implementing-llm-guardrails-for-security/SKILL.md- License
- MIT
- Repo updated
- 2 November 2026
FAQ
What does the Implementing LLM Guardrails for Security skill do?
Implements input and output validation guardrails for LLM-powered applications to prevent prompt injection, data leakage, toxic content generation, and hallucinated outputs. Builds a security validation pipeline using NVIDIA NeMo Guardrails Colang definitions, custom Python validators for PII detection and content policy enforcement, and the Guardrails AI framework for structured output validation. The guardrails system intercepts both user inputs (blocking injection attempts, stripping PII, enforcing topic boundaries) and model outputs (detecting hallucinations, filtering toxic content, valid
How do I install the Implementing LLM Guardrails for Security skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add adriannoes/awesome-agentic-ai --skill implementing-llm-guardrails-for-security. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Implementing LLM Guardrails for Security popular?
It lives in adriannoes/awesome-agentic-ai, which has 100 GitHub stars and 27 forks, and is included in 2 curated skill lists.
Related skills
Browserstack
100adriannoes/awesome-agentic-ai
Run tests on BrowserStack. Use when user mentions "browserstack", "cross-browser", "cloud testing", "browser matrix", "test on safari", "test on firefox", or "browser compatibility".
Coverage
100adriannoes/awesome-agentic-ai
Analyze test coverage gaps. Use when user says "test coverage", "what's not tested", "coverage gaps", "missing tests", "coverage report", or "what needs testing".
Fix
100adriannoes/awesome-agentic-ai
Fix failing or flaky Playwright tests. Use when user says "fix test", "flaky test", "test failing", "debug test", "test broken", "test passes sometimes", or "intermittent failure".
Integracoes
100adriannoes/awesome-agentic-ai
Use to survey the team's tools (Jira, Confluence, Notion, GitHub, cloud, observability), connect the MCPs securely, pull read inputs, and define the write flows (repo → tool). It generates docs/engineering/integrations.md and, if approved, .mcp.json, and registers the validated MCPs in the routing (the "Connected tools (MCP)" block of CLAUDE.md + tools-aware skills). Run BEFORE /kickoff to feed the artifacts with real data (read-first), or AFTER, once the tooling is known. Re-runnable. Trigger with /integracoes.
Hunt LLM AI
100adriannoes/awesome-agentic-ai
Hunt LLM/AI feature bugs — prompt injection, indirect injection, exfiltration via tool-use, ASCII smuggling, agentic AI security framework (ASI01-ASI10). Patterns: direct prompt injection in user input (bypass system prompt with 'ignore previous instructions'), indirect injection via documents/web pages the model reads, ASCII smuggling (Unicode tag block U+E0000-U+E007F invisible to humans, visible to model), tool-use exfiltration (model has fetch_url tool, attacker injects URL, model exfils chat history), system prompt extraction (manipulate model to reveal hidden instructions), training data
Kickoff
100adriannoes/awesome-agentic-ai
Use when starting OR continuing a project with the SDD boilerplate. It first discovers the mode — greenfield (starting from scratch) or brownfield (already running) — and routes accordingly. Greenfield runs a Lean Inception interview (vision, personas, MVP). Brownfield maps the current state (as-is), identifies gaps against the SDD standard, and captures historical decisions. Both paths go through the technical kickoff on the 5 axes (tech stack, architecture, infra, quality, observability), propose the project's agentic layer (rules, subagents, skills, workflows/CI), and converge into an incre
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.