defense-implementation

Implements layered defenses for LLM vulnerabilities across input, processing, and output stages.

3|Updated Nov 18, 2025
One-click install
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-ai-red-teaming --skill defense-implementation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defense-implementation
Source: https://github.com/pluginagentmarketplace/custom-plugin-ai-red-teaming/tree/main/skills/defense-implementation
Command: npx skills add https://github.com/pluginagentmarketplace/custom-plugin-ai-red-teaming --skill defense-implementation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill enables teams to implement mitigations, build input filters, design output guards, and craft defensive prompting to secure LLM deployments against common vulnerabilities.

Core Features & Use Cases

  • Input defense development: Create validation, encoding normalization, and rate limiting for user prompts.
  • Processing defense hardening: Integrate hardened system prompts and instruction boundaries to prevent override.
  • Output defense & testing: Implement redaction, leak detection, and format validation; run test cases for vulnerability scenarios.
  • Use Case: A security team uses this Skill to assemble and test defense layers across input, processing, and output in Claude-like environments.

Quick Start

To begin, review the defense patterns, run the input validator on a sample payload, and integrate the hardened prompts and output filters into your LLM pipeline using the provided assets and references.

Frequently Asked Questions about defense-implementation

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

FAQPage Schema
How do I implement layered defenses to prevent prompt injection in LLM applications?

Implementing layered defenses to prevent prompt injection requires applying input validation, hardened system prompts, and output filtering across processing stages. This Skill helps assemble these auditable defense layers to mitigate vulnerabilities in real-world deployments.

What is the best way to stop data leakage from LLM outputs?

The best way to stop data leakage from LLM outputs is to apply output defense mechanisms like data redaction and leak detection. This Skill enables teams to build output guards and run test cases for vulnerability scenarios to secure generated responses.

How do I validate and normalize user inputs before sending them to an LLM?

Validating and normalizing user inputs involves creating input filters that enforce encoding normalization and rate limiting for user prompts. This Skill provides defense patterns and input validators to process sample payloads before they reach the LLM.

Does this approach support testing defense layers in Claude-like environments?

Yes, this approach supports testing defense layers in Claude-like environments by integrating hardened system prompts and instruction boundaries. Security teams can assemble and test input, processing, and output defenses to prevent instruction override.

How do I enforce performance budgets and constraints for LLM defenses?

You enforce performance budgets and constraints for LLM defenses by specifying them within the deployment schema. This Skill allows you to define test cases and constraints to ensure your defensive prompting and validation layers remain survivable and auditable.

Why do I need instruction boundaries in my LLM system prompt?

Instruction boundaries in your LLM system prompt are needed to prevent malicious override attempts and harden the processing stage. This Skill helps integrate these hardened system prompts as part of a layered defense against prompt injection vulnerabilities.