principle-subtract-before-you-add

Guides removal of dead code and redundant logic before building additions or refactors.

1|Updated Aug 26, 2026
One-click install
npx skills add https://github.com/edivad1999/stuc-stack --skill principle-subtract-before-you-add-edivad1999
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: principle-subtract-before-you-add
Source: https://github.com/edivad1999/stuc-stack/tree/main/skills/principle-subtract-before-you-add
Command: npx skills add https://github.com/edivad1999/stuc-stack --skill principle-subtract-before-you-add-edivad1999

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding features to an already complex system compounds complexity and makes every change more brittle. This Skill enforces a subtraction-first sequencing principle so you simplify the codebase before extending it. ## Core Features & Use Cases - Removal-First Sequencing: Directs you to delete dead weight, redundant validators, and stub references before starting an addition, refactor, or rewrite. - Anti-Speculation Guardrails: Blocks speculative validators, parsers, and guards beyond what the spec demands, keeping the surface area minimal. - Prompt Simplification: Applies the same subtraction principle to prompts by removing redundant instructions and excessive templates. - Use Case: Before adding a new feature to a module, use this principle to strip unused code paths and stub references first, then build the feature on the simpler base with less risk. ## Quick Start Apply the subtract-before-you-add principle to plan my next refactor by identifying what to remove before building the new feature.

Frequently Asked Questions about principle-subtract-before-you-add

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simplify code before adding a new feature?▼

Remove dead weight, redundant validators, and stub references first, then build on the simpler base. Deletion cuts the surface area, reveals the essential structure, and usually makes the next design obvious.

What is the subtract before you add principle in software design?▼

It is a sequencing rule: remove complexity before constructing anything new. Adding to a complex system compounds complexity, while subtracting first makes the next addition smaller and less brittle.

When should I delete a stub reference instead of keeping it?▼

Delete a reference when it has no novel content. Leaving stubs drags maintenance behind them, since out-of-spec features like persistence or schema migration each need guards to defend their inputs.

Should I add validators for edge cases that might occur later?▼

No. Avoid speculative validators, parsers, or guards beyond what the spec demands. Design for observed usage, not hypothetical edge cases, and add guards only when a real feature requires them.

When is subtraction-first the wrong approach?▼

It fits additions, refactors, and rewrites where existing complexity is the bottleneck. It is less relevant for greenfield work with nothing to remove, where the focus shifts to keeping the initial design minimal.