# ButterFence

- **Event:** [Built with Opus 4.6: a Claude Code hackathon](https://cerebralvalley.ai/e/claude-code-hackathon)
- **When:** Feb 10 at 12:00 PM – Feb 17 at 10:00 AM (EST)
- **Where:** Location TBA
- **Team:** [AYUSHMAN Mukherjee](https://cerebralvalley.ai/u/Ayushman)
- **GitHub:** https://github.com/ayush585/ButterFence
- **Demo video:** https://www.youtube.com/watch?v=WM6_JolSBSA
- **Gallery:** https://cerebralvalley.ai/e/claude-code-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/claude-code-hackathon/hackathon/gallery/45

ButterFence is a Claude Code-native safety harness that red-teams your repo against destructive and secret-leaking AI agent behavior, then auto-generates
enforceable hooks to prevent it.

The core innovation: Claude Opus 4.6 as the adversary. The redteam command scans your repo structure and tech stack, then asks Opus 4.6 to generate
creative attack scenarios, obfuscation, encoding tricks, variable indirection, tailored to YOUR codebase. ButterFence catches them in real-time. When
attacks get through, Opus 4.6 analyzes gaps and generates exact regex patches. One command runs the full attack-patch-verify loop.

Ships with 44 scenarios, 11 threat categories, 7 rule packs (OWASP, AWS, Docker), 5 export formats, entropy detection, obfuscation decoding, behavioral
chain detection, live dashboard, and CI/CD integration.

Claude attacks. Claude defends. Claude patches. 315 tests. 35+ modules. Open source.

---

Markdown version of https://cerebralvalley.ai/e/claude-code-hackathon/hackathon/gallery/45. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
