reducing-entropy
Install this skill
npx skills add softaworks/agent-toolkitWorks across Claude Code, Cursor, Codex, Copilot & Antigravity
The reducing-entropy skill serves as an architectural gatekeeper for agentic workflows, prioritizing codebase minimization over incremental development. It operates on the principle that software complexity grows linearly with the volume of code, regardless of organizational intent. This skill forces an evaluation of every change by comparing the total line count of the codebase before and after implementation. It rejects the common trap of equating 'cleaner' abstractions or increased flexibility with quality. Instead, it mandates a aggressive deletion strategy, asking if existing structures can be condensed, merged, or entirely removed as a consequence of new logic. By measuring the final static state rather than the ease of the current implementation, this skill actively fights against the natural accumulation of technical debt in long-running projects.
When to Use This Skill
- β’Pruning feature bloat in legacy monoliths
- β’Simplifying over-engineered boilerplate before new feature integration
- β’Consolidating fragmented helper functions into unified logic
- β’Assessing pull requests for architectural drift
How to Invoke This Skill
Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:
- βReduce the codebase footprint for this module
- βWhat can we delete here to simplify the logic?
- βIdentify redundant code that this update makes obsolete
- βRefactor for minimum total lines of code
- βAnalyze if this feature addition increases entropy
Pro Tips
- π‘Always ensure robust version control and automated tests are in place before initiating significant code reduction efforts.
- π‘Work iteratively on specific modules or features, rather than attempting a complete codebase overhaul at once.
- π‘Complement this skill with code analysis tools to identify potential dead code or overly complex sections for targeted reduction.
What this skill does
- β’Quantifying net changes in codebase line counts
- β’Identifying redundant logic for aggressive refactoring
- β’Evaluating existing abstractions against YAGNI criteria
- β’Rationalizing file structures to reduce cognitive overhead
- β’Justifying deletions as the primary form of improvement
When not to use it
- βWorking within rigid framework-enforced file patterns
- βProjects requiring strict regulatory or audit-trail documentation
Example workflow
- Select a mindset from the references directory
- Inventory the current lines of code in target modules
- Propose a solution that replaces current logic with a more compact implementation
- Execute the deletion of obsolete files and functions
- Verify the final count confirms a net decrease in total lines
Prerequisites
- βActive session in softaworks/agent-toolkit
- βLoaded mindset from references/
Pitfalls & limitations
- !Mistaking shorter code for improved readability
- !Over-optimizing at the cost of essential runtime stability
- !Ignoring necessary documentation required for team maintenance
FAQ
How it compares
Unlike manual refactoring which often focuses on organization, this skill enforces a strict mathematical constraint where the result must literally be smaller to be considered successful.
π Full skill instructions β original source: softaworks/agent-toolkit
More code begets more code. Entropy accumulates. This skill biases toward the smallest possible codebase.
**Core question:** "What does the codebase look like *after*?"
## Before You Begin
**Load at least one mindset from
references/**1. List the files in the reference directory
2. Read frontmatter descriptions to pick which applies
3. Load at least one
4. State which you loaded and its core principle
**Do not proceed until you've done this.**
## The Goal
The goal is **less total code in the final codebase** - not less code to write right now.
- Writing 50 lines that delete 200 lines = net win
- Keeping 14 functions to avoid writing 2 = net loss
- "No churn" is not a goal. Less code is the goal.
**Measure the end state, not the effort.**
## Three Questions
### 1. What's the smallest codebase that solves this?
Not "what's the smallest change" - what's the smallest *result*.
- Could this be 2 functions instead of 14?
- Could this be 0 functions (delete the feature)?
- What would we delete if we did this?
### 2. Does the proposed change result in less total code?
Count lines before and after. If after > before, reject it.
- "Better organized" but more code = more entropy
- "More flexible" but more code = more entropy
- "Cleaner separation" but more code = more entropy
### 3. What can we delete?
Every change is an opportunity to delete. Ask:
- What does this make obsolete?
- What was only needed because of what we're replacing?
- What's the maximum we could remove?
## Red Flags
- **"Keep what exists"** - Status quo bias. The question is total code, not churn.
- **"This adds flexibility"** - Flexibility for what? YAGNI.
- **"Better separation of concerns"** - More files/functions = more code. Separation isn't free.
- **"Type safety"** - Worth how many lines? Sometimes runtime checks in less code wins.
- **"Easier to understand"** - 14 things are not easier than 2 things.
## When This Doesn't Apply
- The codebase is already minimal for what it does
- You're in a framework with strong conventions (don't fight it)
- Regulatory/compliance requirements mandate certain structures
## Reference Mindsets
See
references/ for philosophical grounding.To add new mindsets, see
adding-reference-mindsets.md.---
**Bias toward deletion. Measure the end state.**
How to Use This Skill Unit
Option A: Project-Specific (Recommended)
- Click "Download" above
- In your project, create the directory:
.agent/skills/reducing-entropy/ - Save the file as
SKILL.md - The agent will automatically discover the skill based on its description.
Option B: Global Installation (All Agents)
Save the file to these locations to make it available across all projects:
- Claude Code:
~/.claude/skills/softaworks/agent-toolkit/reducing-entropy/SKILL.md - Cursor:
~/.cursor/skills/softaworks/agent-toolkit/reducing-entropy/SKILL.md - Antigravity:
~/.gemini/antigravity/skills/softaworks/agent-toolkit/reducing-entropy/SKILL.md
π Install with CLI:npx skills add softaworks/agent-toolkit