The Problem
Every AI coding agent I used wrote too much code.
Ask it to validate an email? It writes a 40-line class with regex, error types, and an interface.
Ask it to debounce a function? It returns a full utility library.
Senior developers don't do this. A senior dev who's been paged at 3am for over-engineered code writes the laziest solution that actually works β and nothing more.
So I built Piggy π· β a plugin that makes your AI agent think like that senior dev.
What is Piggy?
Piggy is a plugin/skill for AI coding agents. Once installed, it forces the simplest solution before writing any code.
The best code is the code you never wrote.
Before writing anything, Piggy checks a ladder:
Does this need to exist at all? (YAGNI β skip speculative features)
Already in this codebase? Reuse the existing helper.
Does stdlib do it? Use it, zero dependencies.
Native platform feature? over a picker lib. CSS over JS.
Already-installed dependency solves it? Use it. Never add new ones for what a few lines can do.
Can it be one line? One line.
Only then: the minimum code that works.
Benchmark Results
I tested across 5 everyday tasks (email validator, debounce, CSV sum, countdown timer, rate limiter) on 3 models (Haiku, Sonnet, Opus), 10 runs each:
MetricWithout PiggyWith PiggyLines of code100%6β20% (β 80β94%)Token cost100%23β53% (β 47β77%)Speedbaseline3β6Γ faster
Less code = fewer bugs, cheaper API calls, faster responses.
Works With Every Major AI Tool
Piggy supports all major AI coding platforms:
Claude Code β /plugin marketplace add adamyasingh-12/Piggy-
Cursor β copy .cursor/rules/piggy.mdc to your rules folder
Windsurf β copy .windsurf/rules/piggy.md
GitHub Copilot β included config
Codex, Devin, Kiro, Gemini, OpenCode β all supported
Commands
Once installed, you get 10 commands:
CommandWhat it does/piggyLazy mode β simplest solution that works/piggy-reviewScan a diff for over-engineering/piggy-auditWhole-repo scan β ranked list of what to delete/piggy-debtHarvest all piggy: comments into a debt ledger/piggy-explainWhy was this simplification chosen?/piggy-scoreComplexity score 1β10, before vs after/piggy-compareLazy vs verbose version side by side/piggy-testMinimal test for the lazy solution/piggy-gainShow the benchmark scoreboard/piggy-helpQuick reference card
3 Intensity Levels
/piggy lite β suggest lazy alternatives, you decide
/piggy β ladder enforced, stdlib first (default)
/piggy ultra β YAGNI extremist, deletion before addition
Example β "Add a cache for these API responses"
lite: Done, cache added. FYI: functools.lru_cache covers this in one line if you'd rather not own a cache class.
full: @lru_cache(maxsize=1000) on the fetch function. Skipped custom cache class.
ultra: No cache until a profiler says so. A hand-rolled TTL cache class is a bug farm with a hit rate.
Install Now
bash# Claude Code
/plugin marketplace add adamyasingh-12/Piggy-
GitHub: https://github.com/adamyasingh-12/Piggy-
MIT licensed. Stars and feedback welcome! π·β
Top comments (0)