{
  "markdown": "# 🐷 Piggy — Lazy Senior Dev Mode\n\n<p align=\"center\">\n  <img src=\"assets/logo.png\" alt=\"Piggy logo\" width=\"120\" />\n</p>\n\n> The best code is the code never written.\n\nPiggy is an AI coding skill that forces the laziest solution that actually works. It channels a senior developer who has seen every over-engineered codebase and been paged at 3am for one — and makes your AI do the same.\n\n**Works with:** Claude Code · Cursor · Windsurf · Codex · Copilot · OpenCode · Kiro · Devin · Gemini · and more.\n\n<p align=\"center\">\n  <img src=\"assets/social-preview.png\" alt=\"Piggy — Lazy Senior Dev Mode\" width=\"100%\" />\n</p>\n\n---\n\n## Why Piggy?\n\n| Metric | Without Piggy | With Piggy |\n|--------|-------------|----------|\n| Lines of code | 100% | **6–20%** (↓ 80–94%) |\n| Token cost | 100% | **23–53%** (↓ 47–77%) |\n| Speed | baseline | **3–6× faster** |\n\nBenchmark median across 5 everyday tasks (email validator, debounce, CSV sum, countdown timer, rate limiter) on three models (Haiku, Sonnet, Opus), 10 runs each.\n\n<p align=\"center\">\n  <img src=\"assets/benchmark-3model.svg\" alt=\"Lines of code benchmark across 3 models\" width=\"100%\" />\n</p>\n\n<p align=\"center\">\n  <img src=\"assets/benchmark-agentic.svg\" alt=\"Agentic benchmark — every metric vs no-skill baseline\" width=\"100%\" />\n</p>\n\n---\n\n## Install\n\n**Claude Code**\n```bash\n/plugin marketplace add adamyasingh-12/Piggy-\n```\n\n**Codex**\n```bash\ncodex plugin marketplace add adamyasingh-12/Piggy-\n```\n\n**Copilot**\n```bash\ncopilot plugin marketplace add adamyasingh-12/Piggy-\n```\n\n**Cursor / Windsurf**\nCopy `skills/piggy/SKILL.md` into your rules folder, or use the `.cursor/rules/piggy.mdc` / `.windsurf/rules/piggy.md` files included in this repo.\n\n**OpenCode**\n```bash\n/plugin marketplace add adamyasingh-12/Piggy-\n```\n\n**Pi**\n```bash\npi install git:github.com/adamyasingh-12/Piggy-\n```\n\n**Gemini**\n```bash\ngemini extensions install https://github.com/adamyasingh-12/Piggy-\n```\n\n**Devin**\n```bash\ndevin plugins install adamyasingh-12/Piggy-\n```\n\n<p align=\"center\">\n  <img src=\"assets/screenshot-github.png\" alt=\"Piggy repository on GitHub\" width=\"100%\" />\n</p>\n\n---\n\n## Usage\n\nOnce installed, Piggy is **active every session by default** at `full` intensity.\n\n```\n/piggy           → activate (full mode, default)\n/piggy lite      → suggest lazy alternatives, user decides\n/piggy ultra     → YAGNI extremist, delete before adding\n/piggy off       → deactivate\n```\n\n<!-- SCREENSHOT: terminal showing `/piggy` activation and a before/after diff. Replace this comment with:\n  <img src=\"assets/screenshot-activate.png\" alt=\"Piggy activation in terminal\" width=\"100%\" />\n-->\n\n### Commands\n\n| Command | What it does |\n|---------|-------------|\n| `/piggy` | Lazy mode. Simplest solution that works. |\n| `/piggy-review` | Over-engineering review of a diff. One line per finding. |\n| `/piggy-audit` | Whole-repo scan — ranked list of what to delete or simplify. |\n| `/piggy-debt` | Harvests all `piggy:` comments into a debt ledger. |\n| `/piggy-explain` | Explains *why* a simplification was chosen over the elaborate version. |\n| `/piggy-score` | Complexity score, 1–10, with before/after when piggy simplifies it. |\n| `/piggy-compare` | Lazy vs. verbose version of the same code, side by side. |\n| `/piggy-test` | Generates the minimal runnable test for the lazy solution. |\n| `/piggy-gain` | Shows the benchmark scoreboard: lines, cost, speed. |\n| `/piggy-help` | Quick-reference card for all modes and commands. |\n\n### New: learning & confidence commands\n\nThe four newest commands exist to make the lazy solution *trustworthy*, not\njust short — see why it was chosen, how complex it still is, what the\nroad-not-taken looked like, and the one check that proves it works.\n\n```\n/piggy-explain     → why this simplification, and where its ceiling is\n/piggy-score       → 1-10 complexity, before vs. after\n/piggy-compare     → lazy version and verbose version, side by side\n/piggy-test        → the smallest test that would catch a regression\n```\n\nFull reference: [`skills/piggy-explain`](skills/piggy-explain/SKILL.md) ·\n[`skills/piggy-score`](skills/piggy-score/SKILL.md) ·\n[`skills/piggy-compare`](skills/piggy-compare/SKILL.md) ·\n[`skills/piggy-test`](skills/piggy-test/SKILL.md)\n\n---\n\n## The Ladder\n\nBefore writing any code, Piggy stops at the first rung that holds:\n\n1. **Does this need to exist at all?** Speculative need = skip it. (YAGNI)\n2. **Already in this codebase?** Reuse the helper, util, or pattern that's already here.\n3. **Does the stdlib do it?** Use it.\n4. **Native platform feature covers it?** `<input type=\"date\">` over a picker lib. CSS over JS. DB constraint over app code.\n5. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.\n6. **Can it be one line?** One line.\n7. **Only then:** the minimum code that works.\n\nThe ladder runs *after* understanding the problem, not instead of it.\n\n---\n\n## Intensity Levels\n\n| Level | Behaviour |\n|-------|-----------|\n| **lite** | Build what's asked, name the lazier alternative in one line. You pick. |\n| **full** | Ladder enforced. Stdlib and native first. Shortest diff. *(default)* |\n| **ultra** | YAGNI extremist. Deletion before addition. Challenges the requirement in the same breath. |\n\n### Example — \"Add a cache for these API responses\"\n\n- **lite:** `Done, cache added. FYI: functools.lru_cache covers this in one line if you'd rather not own a cache class.`\n- **full:** `@lru_cache(maxsize=1000) on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short.`\n- **ultra:** `No cache until a profiler says so. When it does: @lru_cache. A hand-rolled TTL cache class is a bug farm with a hit rate.`\n\n<!-- SCREENSHOT: side-by-side showing lite vs full vs ultra output. Replace this comment with:\n  <img src=\"assets/screenshot-intensity.png\" alt=\"Piggy intensity levels comparison\" width=\"100%\" />\n-->\n\n---\n\n## Rules\n\n- No unrequested abstractions — no interface with one implementation, no factory for one product.\n- No boilerplate, no scaffolding \"for later\". Later can scaffold for itself.\n- Deletion over addition. Boring over clever.\n- Fewest files possible. Shortest working diff wins.\n- Complex request? Ship the lazy version and question it: *\"Did X; Y covers it. Need full X? Say so.\"*\n- Mark deliberate simplifications with a `piggy:` comment naming the ceiling and upgrade path:\n  ```js\n  // piggy: global lock, per-account locks if throughput matters\n  ```\n\n---\n\n## Skills Reference\n\n### `/piggy-review`\n\nCode review focused exclusively on over-engineering. One line per finding:\n\n```\nL12-38: stdlib: 27-line validator class. \"@\" in email, 1 line.\nL4:     native: moment.js for one format call. Intl.DateTimeFormat, 0 deps.\nL88:    yagni: AbstractRepository with one implementation. Inline it.\nL52-71: delete: retry wrapper on an idempotent local call. Nothing replaces it.\n```\n\nEnds with: `net: -N lines possible.`\n\nTags: `delete:` · `stdlib:` · `native:` · `yagni:` · `shrink:`\n\n### `/piggy-audit`\n\nSame as `/piggy-review` but scans the entire repo instead of a diff. Ranked biggest cut first. Read-only, applies nothing.\n\n### `/piggy-debt`\n\nHarvests every `piggy:` comment into a ledger so shortcuts don't silently rot into \"later means never\":\n\n```\nsrc/cache.js:42, global lock. ceiling: serializes all requests. upgrade: per-account locks if p95 > 200ms.\n```\n\nEnds with: `N markers, M with no trigger.`\n\n### `/piggy-explain`\n\nExplains *why* the lazy version won, for the last piggy edit or whatever you\npoint at — the elaborate alternative, the ladder rung that caught it, and\nthe ceiling where it would need to grow:\n\n```\nelaborate: token-bucket class with configurable refill, storage backend.\nrung:      stdlib — a Map of timestamps and a window check.\nceiling:   multi-instance deployment needs shared state (Redis) instead.\n```\n\n### `/piggy-score`\n\nA quick 1–10 complexity gut-check for a function or file, cheap enough to\nrun constantly before deciding whether a full `/piggy-review` is worth it:\n\n```\nscore: 7/10 — indirection layers, config nobody sets\nafter piggy: 2/10 — direct calls, no wrapper layer\n```\n\n### `/piggy-compare`\n\nShows the lazy piggy version and a genuine (not strawman) verbose version of\nthe same request side by side, with the line-count diff and what the\nverbose version buys you that the ticket didn't ask for.\n\n### `/piggy-test`\n\nGenerates the smallest runnable test that would fail if the lazy solution\nbroke — one behavior, no framework or fixtures unless the repo already has\none. Trivial one-liners get no test, on purpose.\n\n### `/piggy-gain`\n\nDisplays the benchmark scoreboard:\n\n```\n  piggy gain                     benchmark median · 5 tasks · 3 models\n\n  Lines of code   no-skill  ████████████████████  100%\n                  piggy     ██▌·················    6–20%   ▼ 80–94%\n  Cost            no-skill  ████████████████████  100%\n                  piggy     █████▌··············   23–53%  ▼ 47–77%\n  Speed           piggy     ▸ 3–6× faster\n```\n\n---\n\n## Configure Default Mode\n\n**Environment variable** (highest priority):\n```bash\nexport PIGGY_DEFAULT_MODE=ultra\n```\n\n**Config file** (`~/.config/piggy/config.json`):\n```json\n{ \"defaultMode\": \"lite\" }\n```\n\nSet `\"off\"` to disable auto-activation. Resolution order: env var → config file → `full`.\n\n---\n\n## When Piggy Does NOT Cut Corners\n\nNever simplified away:\n- Input validation at trust boundaries\n- Error handling that prevents data loss\n- Security measures\n- Accessibility basics\n- Anything explicitly requested\n\nNever lazy about **understanding the problem**. The ladder shortens the solution, never the reading. Trace the whole flow first, then be lazy.\n\nNon-trivial logic always leaves **one runnable check** behind — the smallest thing that fails if the logic breaks. No frameworks, no fixtures. Trivial one-liners need no test.\n\n---\n\n## Bug Fix Philosophy\n\nA report names a symptom. Grep every caller of the function you touch and fix the shared function once — one guard there is a smaller diff than one per caller, and patching only the path the ticket names leaves every sibling caller still broken.\n\n**Fix it once, where all callers route through.**\n\n---\n\n## Roadmap\n\nBuilt and shipping today: `/piggy`, `/piggy-review`, `/piggy-audit`,\n`/piggy-debt`, `/piggy-explain`, `/piggy-score`, `/piggy-compare`,\n`/piggy-test`, `/piggy-gain`, `/piggy-help`, across Claude Code, Cursor,\nWindsurf, Codex, Copilot, OpenCode, Kiro, Devin, Gemini, Pi, and Hermes.\n\nPlanned, not yet built — tracked here so the scope is honest:\n\n- **VS Code extension** — inline warnings when a selection looks over-engineered.\n- **GitHub Action** — auto-run `/piggy-review` on every PR and comment findings.\n- **Pre-commit hook** — block commits above a configurable complexity threshold.\n- **Laziness dashboard** — lines-saved trend per project, not just benchmark medians.\n- **Language-specific ladders** — Python stdlib vs. JS native vs. Rust idioms as distinct rung sets.\n- **Project-aware ladder** — learns a codebase's existing patterns before suggesting a rung.\n- **piggy.dev** — live demos and a leaderboard of lines deleted.\n\nWant one of these sooner? Open an issue — the ladder applies to the roadmap too: whichever of these has real demand gets built lazy and boring, not all at once.\n\n---\n\n## Deactivate\n\n```\nstop piggy\nnormal mode\n/piggy off\n```\n\nResume anytime with `/piggy`.\n\n---\n\n## License\n\nMIT © Piggy\n",
  "bytes": 11394,
  "sha": "545803f19ba3e1afc6c84d888a33687b12d8febfb3b26f884bc7e5ca63b5da6d",
  "repo_slug": "stvhanna/piggy-",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_stvhanna_piggy_9a85182f/readme"
}