AI Guardrails

Add safety layers to AI applications — input validation, prompt injection detection, output filtering, content moderation, and policy enforcement. Prevent misuse without breaking legitimate use cases.

Overview

The AI Guardrails skill, part of the TerminalSkills/skills repository, provides a structured framework for enhancing the safety and reliability of artificial intelligence applications. This security-focused tool enables developers to integrate multiple defensive layers, including input validation and prompt injection detection, to mitigate common vulnerabilities. By utilizing this skill, agents like Codex, Claude, and Gemini can perform real-time content moderation and output filtering to ensure compliance with established organizational policies. The repository, which has gained 71 stars, offers these capabilities as a Python-based solution for managing API interactions. It focuses on preventing malicious misuse while maintaining the functionality required for legitimate user requests, effectively balancing strict security enforcement with application usability across various supported AI platforms.

Use Cases

Detecting and blocking malicious prompt injection attempts in real-time.
Filtering model outputs to prevent the disclosure of sensitive or prohibited content.
Enforcing custom safety policies and content moderation standards across AI interactions.

Install Notes

# Review source first
open https://github.com/TerminalSkills/skills/blob/main/skills/ai-guardrails/SKILL.md

Copy or clone the skill folder into your agent skills directory after reviewing its instructions and scripts.

Security Notes

AI Guardrails acts as a defensive middleware layer; however, users should ensure that the underlying Python environment and API keys are properly secured. While it mitigates prompt injection and unauthorized output, it should be part of a broader defense-in-depth strategy within the TerminalSkills/skills ecosystem.

Related Skills

Security And Hardening

addyosmani/agent-skills

Security

Hardens code against vulnerabilities. Use when auditing an input handler for vulnerabilities, when handling user input, authentication, data storage, or external integrations, or when checking a login flow is safe against the OWASP Top Ten. Use when building any feature that accepts untrusted data, manages user sess...

securityreview
97,909 StarsMIT

Mermaid To Proverif

trailofbits/skills

Security

Translates Mermaid sequenceDiagrams describing cryptographic protocols into ProVerif formal verification models (.pv files). Use when generating a ProVerif model, formally verifying a protocol, converting a Mermaid diagram to ProVerif, verifying protocol security properties (secrecy, authentication, forward secrecy)...

Claude CodeClaude
securityresearch
7,190 StarsSource linked

Testing Handbook Generator

trailofbits/skills

Security

Generates Claude Code skills from the Trail of Bits Testing Handbook (appsec.guide), analyzing handbook pages and emitting SKILL.md files with the structure each skill type requires. Use when creating or refreshing a skill from handbook content, or when the user names the testing handbook or appsec.guide. Not for an...

Claude CodeClaude
securitytesting
7,190 StarsSource linked

Semgrep

trailofbits/skills

Security

Runs a Semgrep security scan over a codebase: detects languages, selects rulesets, presents the plan for explicit approval, then runs every approved ruleset through scripts/run-scans.sh, which batches the semgrep processes and writes scans.json, and merges the output to SARIF. Supports two scan modes, "run all" for...

Claude CodeClaude
pythonsecurity
7,190 StarsSource linked

Audit Augmentation

trailofbits/skills

Security

Augments Trailmark code graphs with external audit findings from SARIF static analysis results, weAudit annotation files, and version-gated Trailmark 0.4.x binary-analysis graph exports. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings wi...

Claude CodeClaude
pythonsecurity
7,190 StarsSource linked

Diagramming Code

trailofbits/skills

Security

Generates Mermaid diagrams from Trailmark code graphs. Produces call graphs, class hierarchies, module dependency maps, containment diagrams, complexity heatmaps, and attack surface data flow visualizations. Use when visualizing code architecture, drawing call graphs, generating class diagrams, creating dependency m...

Claude CodeClaude
pythonsecurity
7,190 StarsSource linked