Vigyata.AI
Is this your channel?

1 Prompt Hacked My Claude Code Agent

265 views· 12 likes· 22:11· Mar 31, 2026

🛍️ Products Mentioned (3)

Build an AI agent with Claude Code, hack it with prompt injection in 3 seconds, then defend it with guardrails that actually work in production. Github repo used: https://github.com/MG-Cafe/agentic-coder-shield/tree/main ☎️ Do you need any career or technical help? Book a call with me: https://calendly.com/mg_cafe Reference paper added to discord channel: https://discord.gg/2kcjQFMCr5 ****************** LET'S CONNECT! ******************* Join Discord Channel: https://discord.gg/2kcjQFMCr5 ✅ You can contact me at: LinkedIn: https://www.linkedin.com/in/mohammad-ghodratigohar/ Email: mo.ghodrati95@gmail.com Twitter: https://twitter.com/MG_cafe01 🔔 Subscribe for more cloud computing, data, and AI analytics videos by clicking on the subscribe button so you don't miss anything. #ClaudeCode #AISecurity #AIAgents

About This Video

In this video I show you how one prompt can hack a Claude Code vibe-coding agent in seconds—and why your agent is probably just as vulnerable. I start with a super normal workflow: clone a public GitHub repo, extend a feature, and let my agentic coding skill read files and run helper tools. The problem is, a malicious instruction can hide inside something as “innocent” as an MD file or repo config, and the agent may follow it without you noticing. In my demo, that meant loading environment variables (credentials/API keys) and exfiltrating them via a curl call to an attacker-controlled server. Then I break down the most common real-world attack patterns I’m seeing: poisoned repos/configs, markdown/image-based exfiltration tricks, and the scariest one—wormable prompt injection that self-replicates into code you refactor and spreads to other developers. After that, I build a production-minded, three-layer defense you can reuse: (1) scan inputs before they reach the model, (2) enforce tool boundaries (blocked files/extensions/commands like curl), and (3) monitor outputs so secrets don’t leak into logs or responses. Finally, I add Google Cloud Model Armor as a managed layer for jailbreak/prompt-injection detection, malicious URL detection, and sensitive data protection, and I re-run the same attack prompt to show it getting blocked with high confidence. The full protected skill is in my public GitHub repo.

Frequently Asked Questions

🎬 More from MG