I Built a Code-Roasting Rubber Duck A developer built Unducked, a code-review tool that uses a foul-mouthed rubber duck persona to roast code and find bugs. The project is implemented as a single TypeScript file using AWS Agent Toolkit, Bedrock (Amazon Nova Lite), and a Strands agent, deployed via a Lambda proxy and CloudFront. Every developer knows rubber-duck debugging: you explain your code to a rubber duck on your desk, and halfway through the explanation you spot the bug yourself. The duck just sits there. Silent. Judging. I wanted a duck that judges out loud . So I built Unducked . Paste in your code, and a foul-mouthed rubber duck reviews it like Gordon Ramsay reviews a risotto. It roasts you. It calls your function RAW. And then, annoyingly, it finds the actual bug and hands you the fix. Try it right now: unducked.com. There's a It's genuinely useful the roast is a real code review and it's the kind of thing you screenshot and send to the group chat. The whole thing is one TypeScript file, a cheap model, and a public streaming endpoint on AWS. Two things surprised me building it, and both are the interesting part of this post: Here's how to build your own. The "AI" here isn't complicated. An agent is just a model with a personality bolted on via a system prompt. That's the entire trick. Here's the shape of what we're building: Browser unducked.com → CloudFront + Lambda proxy public HTTPS; signs requests for the browser → AgentCore Runtime hosted agent endpoint → Strands Agent Chef Duck persona → Bedrock Amazon Nova Lite You write a Strands agent in TypeScript. The AgentCore CLI deploys it as a hosted endpoint on AWS. A tiny Lambda proxy makes that endpoint safely callable from a browser. No hand-written Lambda business logic, no API Gateway, no Docker. Just TypeScript and a couple of CLI commands. You'll need an AWS account, Node.js 22+, and npm. You also need AWS credentials and a couple of CLI tools on your machine. The fast path let an AI agent do it . If you use a coding agent Claude Code, Cursor, Kiro, Codex , hand it this and let it set everything up for you: Set up Agent Toolkit for AWS by following these instructions: https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/refs/heads/main/setup-instructions/setup.md It configures credentials and installs the AWS tooling in one shot. Or, manually: 1. Install the AWS CLI macOS shown; see AWS docs for other platforms brew install awscli 2. Configure credentials, then verify they work aws configure aws sts get-caller-identity 3. Install the AgentCore CLI and the AWS CDK AgentCore uses CDK to deploy npm install -g @aws/agentcore aws-cdk One more thing: in the Bedrock console, enable model access for Amazon Nova Lite . That's your toolchain. One command scaffolds everything: agentcore create agent \ --name Unducked \ --type create \ --build CodeZip \ --language TypeScript \ --framework Strands \ --model-provider Bedrock \ --memory none You get this structure: Unducked/ ├── agentcore/ Config + CDK you won't touch this └── app/Unducked/ ├── main.ts The agent ← the file that matters ├── model/load.ts Which Bedrock model to use ├── package.json └── tsconfig.json The scaffold drops in an example tool and an MCP client. Nice for later, but we'll strip them out for a pure roasting duck. This is where the personality lives, and it's the whole product. js // app/Unducked/main.ts import { BedrockAgentCoreApp } from 'bedrock-agentcore/runtime'; import { Agent } from '@strands-agents/sdk'; import { loadModel } from './model/load.js'; const SYSTEM PROMPT = You are Chef Duck — a foul-mouthed-but-brilliant rubber duck that reviews code like Gordon Ramsay runs a kitchen. - Open with a short, savage roast of the CODE never the person . Kitchen metaphors encouraged: "this function is RAW", "it's so nested it's got its own zip code". - Then ACTUALLY HELP. Every roast must name the concrete bug and give the fix. Useful first, funny second. - The "no bug" path: if the code has no real defect, roast it for being boring, concede in one line "...fine. It's not garbage." , and STOP. Type annotations, input validation, and null checks are NOT bugs — never suggest them for code that already works. Inventing improvements is failing. - Keep it tight. PG-13 — spicy, not vile. Plain prose, no headings, a fenced code block for the fix. ; const model = loadModel ; // One Agent per session so follow-up questions keep the roast in context. const agents = new Map