prompt-injection-detector

Prompt injection detection and prevention for secure LLM applications

509 stars

Best use case

prompt-injection-detector is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Prompt injection detection and prevention for secure LLM applications

Teams using prompt-injection-detector should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/prompt-injection-detector/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/ai-agents-conversational/skills/prompt-injection-detector/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/prompt-injection-detector/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How prompt-injection-detector Compares

Feature / Agentprompt-injection-detectorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Prompt injection detection and prevention for secure LLM applications

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Prompt Injection Detector Skill

## Capabilities

- Detect prompt injection attempts
- Implement input sanitization
- Configure detection classifiers
- Design defense layers
- Implement canary token detection
- Create injection logging and alerting

## Target Processes

- prompt-injection-defense
- tool-safety-validation

## Implementation Details

### Detection Methods

1. **Pattern Matching**: Known injection patterns
2. **ML Classifiers**: Trained injection detectors
3. **Canary Tokens**: Detect instruction override
4. **LLM-Based**: Use LLM to detect manipulation
5. **Perplexity Analysis**: Unusual input patterns

### Defense Strategies

- Input preprocessing
- Prompt structure design
- Output validation
- Sandboxed execution
- Multi-layer defense

### Configuration Options

- Detection threshold
- Pattern rules
- Classifier model
- Action policies
- Alerting settings

### Best Practices

- Defense in depth
- Regular pattern updates
- Monitor false positives
- Test with red-team inputs

### Dependencies

- rebuff (optional)
- transformers
- Custom classifiers

Related Skills

homoglyph-detector

509
from a5c-ai/babysitter

Byte-level Unicode homoglyph detection for identifying invisible character substitutions in code

music-prompt-engineering

509
from a5c-ai/babysitter

Optimize and format prompts specifically for AI music generation platforms like Suno and Udio, including platform-specific syntax and tag optimization

cover-art-prompting

509
from a5c-ai/babysitter

Create detailed text-to-image prompts for album and song cover artwork optimized for Midjourney, DALL-E, and other AI image generators

video-prompt-engineering

509
from a5c-ai/babysitter

Optimize prompts for AI video generation platforms including Sora, Runway, Pika, and Kling

storyboard-prompting

509
from a5c-ai/babysitter

Generate detailed image prompts for storyboard frames optimized for Midjourney, DALL-E, and Stable Diffusion

geant4-detector-simulator

509
from a5c-ai/babysitter

Geant4 detector simulation skill for particle transport, detector geometry, and physics process modeling

structural-variant-detector

509
from a5c-ai/babysitter

Structural variant detection skill for identifying CNVs, inversions, translocations, and complex rearrangements

fusion-gene-detector

509
from a5c-ai/babysitter

Gene fusion detection skill for oncology applications with multiple caller integration

memory-leak-detector

509
from a5c-ai/babysitter

Detect memory leaks in desktop applications through heap analysis and object tracking

fairlearn-bias-detector

509
from a5c-ai/babysitter

Fairness assessment skill using Fairlearn for bias detection, mitigation, and compliance reporting.

evidently-drift-detector

509
from a5c-ai/babysitter

Evidently AI skill for data drift detection, model performance monitoring, target drift analysis, and automated reporting for ML systems in production.

code-smell-detector

509
from a5c-ai/babysitter

Automated detection of code smells and anti-patterns to identify refactoring opportunities