GitHub repository documents 16 prompt injection techniques and defense strategies for public AI chats

A developer built a custom AI chat on their website as an experiment and encountered multiple security challenges when real users attempted to break it. The experience prompted the creation of a comprehensive security guide available on GitHub.
Security challenges encountered
Users attempted various attacks including:
- Prompt injection
- Roleplay attacks
- Multilingual tricks
- Base64 encoded payloads
Defense strategies implemented
The developer documented a defense-in-depth approach covering:
- Input sanitization
- Rate limiting
- Zero-trust system prompt design
- Output controls
- Cost caps
GitHub repository contents
The repository includes:
- A breakdown of 16 prompt injection techniques
- A Claude code skill that automatically tests all 16 techniques against your chatbot
- Full defense implementation details
The developer notes that users tried things they "never would have thought to test" and that the guide is intended to be useful for anyone implementing similar public AI chat systems.
📖 Read the full source: r/ClaudeAI
👀 See Also

NanoClaw's Security Model for AI Agents: Container Isolation and Minimal Code
NanoClaw implements a security architecture where each AI agent runs in its own ephemeral container with unprivileged user access, isolated filesystems, and explicit mount allowlists. The codebase is deliberately minimal at around one process and a handful of files, relying on Anthropic's Agent SDK instead of reinventing functionality.

Agent-Drift: Security Monitoring Tool for AI Agents

SCION: Switzerland's Secure Alternative to BGP Routing Protocol
SCION (Scalability, Control, and Isolation On Next-Generation Networks) is an internet routing architecture developed at ETH Zürich that replaces BGP's foundation with built-in security and multi-path routing. Unlike BGP patches like RPKI and BGPsec, SCION establishes tens or hundreds of parallel paths with millisecond rerouting when failures occur.

Preventing AI Agents from Botnet Participation: Security Considerations
Community discusses how to protect autonomous AI agents from being hijacked or used in malicious botnets.