Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By 88plugFSL-1.1-ALv2In 1 marketplace
Simplify, then add lightness. Removes AI-generated code fat while preserving functionality, then benchmarks the speedup. Multi-pass: measure weight -> trim -> verify equivalence -> benchmark.
Claude hands work to one, or you mention it with @.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
claude-code, claude, anthropic, ai, llm, ai-agents, developer-tools, automation ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
AI code fat trim for Claude Code and Grok — measure weight, trim, verify equivalence, and benchmark the speedup.
"Simplify, then add lightness." — Colin Chapman, Lotus
addlightness is a zero-dependency Claude Code plugin for developers who ship LLM-written code and want leaner output. It removes AI-generated code fat — speculative abstractions, dead branches, redundant control flow — while preserving behavior, then performance-benchmarks the change with a statistical gate.
Use it to cut technical debt and raise code quality on AI-assisted refactors. Multi-pass pipeline: measure weight → trim → verify equivalence → benchmark.
/plugin marketplace add 88plug/claude-code-plugins
/plugin install addlightness@88plug
grok plugin marketplace add 88plug/claude-code-plugins
grok plugin install addlightness@88plug --trust
Then run ./install.sh from the plugin root. It chmods hooks, lib, and benchmark scripts; checks for Node (required) and python3 (optional, for accurate .py metrics); and smoke-tests weigh.js.
Point it at a bloated file:
/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)
Every edit is gated by an equivalence check before it is reported. Every speedup claim is gated by a Welch significance test. Nothing ships unless it passes both.
[!NOTE] Small files often benchmark as "not significant" — runtime is noise-dominated and the Welch gate refuses to claim a win it cannot prove. See FAQ.
| Piece | What it does |
|---|---|
/addlightness <file> | Full pipeline: measure weight, trim fat, verify equivalence, benchmark |
/addlightness-review <file> | Read-only weight report and fat-candidate list — no edits |
/addlightness-bench <before> <after> | Times before/after commands; reports % improvement with significance |
weight-analyst agent | Read-only metrics + fat-candidate report |
code-trimmer agent | Edit-capable trimmer bounded by trust-boundary + equivalence gate |
| SessionStart + Stop hooks | Announce 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 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 for the full table.
[!WARNING] addlightness never strips defensive checks on externally-controlled inputs — public API parameters, IO, and parsed/network/env/user data are always kept. Only internally-produced, type-guaranteed values are candidates for removal. This is the #1 regression vector: tests pass with well-formed inputs even after validation is wrongly stripped.
addlightness@88plug is listed by 88plug/claude-code-plugins — review the source before installing
npx claudepluginhub 88plug/claude-code-plugins --plugin addlightnessBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground