By 88plug
Simplify, then add lightness. Removes AI-generated code fat while preserving functionality, then benchmarks the speedup. Multi-pass: measure weight -> trim -> verify equivalence -> benchmark.
Removes AI-generated code fat from a single file while preserving every observable behavior, then verifies functional equivalence. Applies the three-pass trim order and the trust-boundary rule. Use for the trim phase of /addlightness. Do NOT use for read-only review (use weight-analyst) or for 3+ unrelated files at once.
Measures code weight (LOC, cyclomatic complexity, imports, functions, nesting depth) and lists removable fat candidates for one file. Read-only: never edits. Use for the measurement phase of addlightness and for /addlightness-review.
Benchmark before/after code snapshots and report the performance delta with statistical significance. Runs N=10 timed runs (hyperfine if available, else a date+awk fallback) and computes % improvement. Use when the user says "benchmark this", "is it faster", "measure the speedup", "compare before and after", "did the trim help performance", "time these two", or invokes /addlightness-bench. Triggers on /addlightness-bench.
Read-only code-weight report. Measures LOC, cyclomatic complexity, import count, function count, and nesting depth for one or more files and lists removable 'fat' candidates -- WITHOUT changing any code. Use when the user says "how heavy is this", "weight report", "what's the fat here", "review weight", "analyze complexity", "where can this be trimmed", "is this bloated", or invokes /addlightness-review. Triggers on /addlightness-review. Reports only, never edits; to actually apply trims use /addlightness.
Simplify, then add lightness. Analyzes one or more source files for AI-generated 'code fat', removes it while preserving behavior, verifies the change passes the equivalence gate (a structural signal, not a behavioral proof), then benchmarks the speedup. Multi-pass: measure -> trim -> verify -> benchmark. Use when the user says "add lightness", "trim this code", "remove the fat", "slim down", "make this leaner/faster", "simplify and benchmark", or invokes /addlightness. Also auto-triggers when the user wants sloppy first-pass AI code made trim and fast. Applies edits; for a read-only weight report with no changes use /addlightness-review.
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Simplify, then add lightness — a Claude Code plugin that strips AI-generated code fat while preserving behavior, then benchmarks the speedup.
"Simplify, then add lightness." — Colin Chapman, Lotus
From a marketplace that lists it (inside Claude Code):
/plugin marketplace add 88plug/addlightness
/plugin install addlightness
Or manually, without the marketplace flow: clone the repo and enable it in your
Claude Code settings by adding it to enabledPlugins in ~/.claude/settings.json
(using the "<plugin>@<marketplace>" form once the marketplace is resolvable), or
add its local path via the /plugin command. Then run ./install.sh, which
chmods the hooks, lib, and benchmark scripts; checks for node (required) and
python3 (optional, for accurate .py metrics); and runs a weigh.js smoke test.
Point it at a bloated file and let it work:
/addlightness src/foo.js
You get a before/after weight table and a verified, benchmarked result:
src/foo.js
metric before after
weight 142.0 78.5 (-44.7%)
LOC 61 38
cyclomatic 14 7
nesting 5 3
imports 9 5
verify: signature-match (syntax + export/signature parity held)
bench: 1.42x faster (mean 8.1ms -> 5.7ms, t=4.3, significant)
(Small files often benchmark as "not significant" — runtime is noise-dominated and the Welch gate refuses to claim a win it can't prove. See the FAQ.)
Every edit is gated by an equivalence check before it is reported, and every speedup claim is gated by a statistical-significance test. Nothing ships unless it passes both.
AI coding assistants produce code that works but carries weight: speculative abstractions, dead branches, redundant control flow, defensive checks on values that can never be malformed. addlightness measures that weight, removes it in small verified passes, gates every change against a regression check, and only claims a speedup the Welch test confirms. It's for anyone shipping AI-assisted code who wants the output trimmed without silently changing what it does.
| Command / piece | What it does |
|---|---|
/addlightness <file> | Full pipeline: measure weight, trim fat, verify equivalence, benchmark the speedup. |
/addlightness-review <file> | Read-only weight report and fat-candidate list. Modifies nothing. |
/addlightness-bench <before> <after> | Times before/after commands and reports % improvement with significance. |
weight-analyst agent | Read-only measurement of the weight metrics; emits the fat-candidate report. |
code-trimmer agent | Edit-capable trimmer bounded by the trust-boundary rule and the equivalence gate. |
| SessionStart + Stop hooks | Announce the plugin on start; gently suggest /addlightness on files you changed. |
flowchart LR
A[measure weight] --> B[trim fat<br/>3 passes]
B --> C{verify<br/>equivalence}
C -->|equivalent| D[benchmark]
C -->|regressed| E[revert + report]
D --> F[report before/after<br/>+ significance]
Trimming runs in three ordered passes so cheap mechanical cleanup happens before any judgment work:
Weight is a relative before/after metric — lower is lighter. It is not an absolute industry standard.
weight = 1.0*LOC + 2.0*cyclomatic + 1.5*imports + 1.0*functions + 3.0*nesting
% reduction = (before - after) / before * 100
Nesting (3.0) and cyclomatic complexity (2.0) are weighted highest because they discriminate fat best; imports (1.5) penalize speculative-dependency surface; LOC and function count (1.0) are baseline size. The engine also emits a token proxy and the raw component metrics so the full table can be shown.
npx claudepluginhub 88plug/claude-code-plugins --plugin addlightnessUltra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Eyes and hands on a Linux Wayland desktop: screenshot any monitor and click, type, scroll, drag, and read any visible app over xdg-desktop-portal (RemoteDesktop + ScreenCast), with optional OCR + OmniParser icon grounding. Pure-Python, CPU-only. GNOME/Wayland only. Ships the MCP server plus a drive-screen skill that encodes the locate-ground-act-confirm loop.
The sanctioned OS 'motor cortex' for an agent on a Linux box: control systemd services/timers, query journald, read host resources/processes, send desktop notifications, drive D-Bus, and manage power (suspend/reboot/poweroff) — all through structured interfaces (systemctl/loginctl/journalctl/busctl), never raw PID hacks. Pure standard library, zero pip deps. A self-preservation guard refuses severing actions on units the agent depends on (dbus, logind, sshd, network, tailscaled, the session, goosed) unless force=true. Ships the MCP server plus a control-os skill. The system-service counterpart to screen-mcp's GUI control.
Detects when Claude drifts away from your active output contract (a terse persona, hard formatting/length rules, an in-character voice) and quietly steers it back. Each assistant turn is scored by a deterministic, dependency-free engine; a status-line badge shows live drift and the next prompt gets a one-shot correction nudge when the previous reply broke contract.
Seamless context continuity across Claude Code compaction. Four background layers (continuous tool-call capture, mechanical PostCompact handoff, async Opus 4.7 enrichment at --effort max, async Stop-hook refinement, and preemptive snapshot before the next compact) keep the agent's working state intact across every compaction and resume. All summarization is isolated from CLAUDE.md/auto-memory and invisible to the user.
Harness-native ECC plugin for engineering teams - 67 agents, 277 skills, 92 legacy command shims, reusable hooks, rules, MCP conventions, and operator workflows for Claude Code plus adjacent agent harnesses
Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review
Lazy senior dev mode. Forces the simplest, shortest solution that actually works: YAGNI, stdlib first, no unrequested abstractions.
Access thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.