AI News HubLIVE
In-site rewrite5 min read

Show HN: Piggy – lazy senior dev mode for AI agents (80–94% less code)

Piggy is an AI coding skill that forces the laziest solution that actually works, reducing lines of code by 80-94%, token cost by 47-77%, and speeding up tasks by 3-6x. It works with multiple AI coding tools and includes various commands to enforce lazy but reliable coding practices.

SourceHacker News AIAuthor: piggydev

Notifications You must be signed in to change notification settings

Fork 0

Star 0

BranchesTags

Open more actions menu

Folders and files

NameName

Last commit message

Last commit date

Latest commit

History

1 Commit

1 Commit

.agents

.agents

.claude-plugin

.claude-plugin

.clinerules

.clinerules

.codex-plugin

.codex-plugin

.cursor/rules

.cursor/rules

.devin-plugin

.devin-plugin

.github

.github

.kiro/steering

.kiro/steering

.openclaw/skills

.openclaw/skills

.opencode

.opencode

.windsurf/rules

.windsurf/rules

assets

assets

benchmarks

benchmarks

commands

commands

docs

docs

examples

examples

hooks

hooks

pi-extension

pi-extension

piggy-mcp

piggy-mcp

scripts

scripts

skills

skills

tests

tests

.env.example

.env.example

.gitignore

.gitignore

AGENTS.md

AGENTS.md

LICENSE

LICENSE

README.es.md

README.es.md

README.ko.md

README.ko.md

README.md

README.md

VERIFIED.md

VERIFIED.md

init.py

init.py

after-install.md

after-install.md

gemini-extension.json

gemini-extension.json

opencode.json

opencode.json

package-lock.json

package-lock.json

package.json

package.json

plugin.yaml

plugin.yaml

Repository files navigation

The best code is the code never written.

Piggy 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.

Works with: Claude Code · Cursor · Windsurf · Codex · Copilot · OpenCode · Kiro · Devin · Gemini · and more.

Why Piggy?

Metric Without Piggy With Piggy

Lines of code 100% 6–20% (↓ 80–94%)

Token cost 100% 23–53% (↓ 47–77%)

Speed baseline 3–6× faster

Benchmark median across 5 everyday tasks (email validator, debounce, CSV sum, countdown timer, rate limiter) on three models (Haiku, Sonnet, Opus), 10 runs each.

Install

Claude Code

/plugin marketplace add adamyasingh-12/Piggy-

Codex

codex plugin marketplace add adamyasingh-12/Piggy-

Copilot

copilot plugin marketplace add adamyasingh-12/Piggy-

Cursor / Windsurf Copy skills/piggy/SKILL.md into your rules folder, or use the .cursor/rules/piggy.mdc / .windsurf/rules/piggy.md files included in this repo.

OpenCode

/plugin marketplace add adamyasingh-12/Piggy-

Pi

pi install git:github.com/adamyasingh-12/Piggy-

Gemini

gemini extensions install https://github.com/adamyasingh-12/Piggy-

Devin

devin plugins install adamyasingh-12/Piggy-

Usage

Once installed, Piggy is active every session by default at full intensity.

/piggy → activate (full mode, default) /piggy lite → suggest lazy alternatives, user decides /piggy ultra → YAGNI extremist, delete before adding /piggy off → deactivate

Commands

Command What it does

/piggy Lazy mode. Simplest solution that works.

/piggy-review Over-engineering review of a diff. One line per finding.

/piggy-audit Whole-repo scan — ranked list of what to delete or simplify.

/piggy-debt Harvests all piggy: comments into a debt ledger.

/piggy-explain Explains why a simplification was chosen over the elaborate version.

/piggy-score Complexity score, 1–10, with before/after when piggy simplifies it.

/piggy-compare Lazy vs. verbose version of the same code, side by side.

/piggy-test Generates the minimal runnable test for the lazy solution.

/piggy-gain Shows the benchmark scoreboard: lines, cost, speed.

/piggy-help Quick-reference card for all modes and commands.

New: learning & confidence commands

The four newest commands exist to make the lazy solution trustworthy, not just short — see why it was chosen, how complex it still is, what the road-not-taken looked like, and the one check that proves it works.

/piggy-explain → why this simplification, and where its ceiling is /piggy-score → 1-10 complexity, before vs. after /piggy-compare → lazy version and verbose version, side by side /piggy-test → the smallest test that would catch a regression

Full reference: skills/piggy-explain · skills/piggy-score · skills/piggy-compare · skills/piggy-test

The Ladder

Before writing any code, Piggy stops at the first rung that holds:

Does this need to exist at all? Speculative need = skip it. (YAGNI)

Already in this codebase? Reuse the helper, util, or pattern that's already here.

Does the stdlib do it? Use it.

Native platform feature covers it? over a picker lib. CSS over JS. DB constraint over app code.

Already-installed dependency solves it? Use it. Never add a new one for what a few lines can do.

Can it be one line? One line.

Only then: the minimum code that works.

The ladder runs after understanding the problem, not instead of it.

Intensity Levels

Level Behaviour

lite Build what's asked, name the lazier alternative in one line. You pick.

full Ladder enforced. Stdlib and native first. Shortest diff. (default)

ultra YAGNI extremist. Deletion before addition. Challenges the requirement in the same breath.

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, add when lru_cache measurably falls short.

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.

Rules

No unrequested abstractions — no interface with one implementation, no factory for one product.

No boilerplate, no scaffolding "for later". Later can scaffold for itself.

Deletion over addition. Boring over clever.

Fewest files possible. Shortest working diff wins.

Complex request? Ship the lazy version and question it: "Did X; Y covers it. Need full X? Say so."

Mark deliberate simplifications with a piggy: comment naming the ceiling and upgrade path:

// piggy: global lock, per-account locks if throughput matters

Skills Reference

/piggy-review

Code review focused exclusively on over-engineering. One line per finding:

L12-38: stdlib: 27-line validator class. "@" in email, 1 line. L4: native: moment.js for one format call. Intl.DateTimeFormat, 0 deps. L88: yagni: AbstractRepository with one implementation. Inline it. L52-71: delete: retry wrapper on an idempotent local call. Nothing replaces it.

Ends with: net: -N lines possible.

Tags: delete: · stdlib: · native: · yagni: · shrink:

/piggy-audit

Same as /piggy-review but scans the entire repo instead of a diff. Ranked biggest cut first. Read-only, applies nothing.

/piggy-debt

Harvests every piggy: comment into a ledger so shortcuts don't silently rot into "later means never":

src/cache.js:42, global lock. ceiling: serializes all requests. upgrade: per-account locks if p95 > 200ms.

Ends with: N markers, M with no trigger.

/piggy-explain

Explains why the lazy version won, for the last piggy edit or whatever you point at — the elaborate alternative, the ladder rung that caught it, and the ceiling where it would need to grow:

elaborate: token-bucket class with configurable refill, storage backend. rung: stdlib — a Map of timestamps and a window check. ceiling: multi-instance deployment needs shared state (Redis) instead.

/piggy-score

A quick 1–10 complexity gut-check for a function or file, cheap enough to run constantly before deciding whether a full /piggy-review is worth it:

score: 7/10 — indirection layers, config nobody sets after piggy: 2/10 — direct calls, no wrapper layer

/piggy-compare

Shows the lazy piggy version and a genuine (not strawman) verbose version of the same request side by side, with the line-count diff and what the verbose version buys you that the ticket didn't ask for.

/piggy-test

Generates the smallest runnable test that would fail if the lazy solution broke — one behavior, no framework or fixtures unless the repo already has one. Trivial one-liners get no test, on purpose.

/piggy-gain

Displays the benchmark scoreboard:

piggy gain benchmark median · 5 tasks · 3 models

Lines of code no-skill ████████████████████ 100% piggy ██▌················· 6–20% ▼ 80–94% Cost no-skill ████████████████████ 100% piggy █████▌·············· 23–53% ▼ 47–77% Speed piggy ▸ 3–6× faster

Configure Default Mode

Environment variable (highest priority):

export PIGGY_DEFAULT_MODE=ultra

Config file (~/.config/piggy/config.json):

{ "defaultMode": "lite" }

Set "off" to disable auto-activation. Resolution order: env var → config file → full.

When Piggy Does NOT Cut Corners

Never simplified away:

Input validation at trust boundaries

Error handling that prevents data loss

Security measures

Accessibility basics

Anything explicitly requested

Never lazy about understanding the problem. The ladder shortens the solution, never the reading. Trace the whole flow first, then be lazy.

Non-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.

Bug Fix Philosophy

A 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.

Fix it once, where all callers route through.

Roadmap

Built and shipping today: /piggy, /piggy-review, /piggy-audit, /piggy-debt, /piggy-explain, /piggy-score, /piggy-compare, /piggy-test, /piggy-gain, /piggy-help, across Claude Code, Cursor, Windsurf, Codex, Copilot, OpenCode, Kiro, Devin, Gemini, Pi, and Hermes.

Planned, not yet built — tracked here so the scope is honest:

VS Code extension — inline warnings when a selection looks over-engineered.

GitHub Action — auto-run /piggy-review on every PR and comment findings.

Pre-commit hook — block commits above a configurable complexity threshold.

Laziness dashboard — lines-saved trend per project, not just benchmark medians.

Language-specific ladders — Python stdlib vs. JS native vs. Rust idioms as distinct rung sets.

Project-aware ladder — learns a codebase's existing patterns before suggesting a rung.

piggy.dev — live demos and a leaderboard of lines deleted.

Want 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.

Deactivate

stop piggy normal mode /piggy off

Resume anytime with /piggy.

License

MIT © Piggy

About

🐷 Piggy — Lazy senior dev mode. Forces the simplest solution that works. 80–94% less code, 47–77% less cost, 3–6× faster.

Topics

ai-developer-tools

lazy-coding-yagni

productivity-coding-assistant

Resources

Readme

License

MIT license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks

Report repository

Releases

No releases published

Packages 0

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

JavaScript 55.2%

Python 44.3%

Other 0.5%