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

Three Email-Based Attack Vectors Against AI Agents That Read Email
A Reddit post details three specific methods attackers can use to hijack AI agents that process email: Instruction Override, Data Exfiltration, and Token Smuggling. These exploit the agent's inability to distinguish legitimate instructions from malicious ones embedded in email text.

MCPwner AI Pentesting Tool Finds Multiple 0-Day Vulnerabilities in OpenClaw
MCPwner, an MCP server that orchestrates AI agents for automated penetration testing, identified several critical 0-day vulnerabilities in OpenClaw including environment variable injection, permission bypass, and information disclosure flaws that standard scanners missed.

Using Claude to audit OpenClaw setup reveals security issues
A developer used Claude to review their OpenClaw installation and discovered the bot was writing API keys in clear text in memory and JSON files, along with other security concerns.

Practical Security Practices for OpenClaw Agents
A Reddit post outlines specific security practices for OpenClaw users, including scheduled commands for updates and audits, managing agent access in shared channels, and securing API keys and skills.