principle-subtract-before-you-add

Guides removal of dead code and redundant validators before adding features or refactors.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding features to an already complex system compounds complexity and makes every subsequent change more brittle. This Skill provides a sequencing principle for evolving software: remove dead weight, redundant validators, and stub references first, then build on the simpler base. ## Core Features & Use Cases - Subtraction-First Sequencing: Orders removal before construction so the next addition lands on a smaller, clearer surface. - Speculative Code Elimination: Cuts validators, parsers, and guards that go beyond what the specification actually demands. - Prompt and Reference Simplification: Removes redundant instructions, excessive templates, and stub references with no novel content. - Use Case: Before adding a new feature to a module, apply this principle to delete unused persistence guards and retry logic, then implement the feature against the reduced surface. ## Quick Start Apply the subtract-before-you-add principle to review this module and remove dead code and speculative validators before I add 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 reduce complexity before adding a new feature?▼

Remove dead code, redundant validators, and stub references first, then build the feature on the simplified base. Deletion cuts the surface area 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 subtraction reveals the essential structure and keeps the design smaller and less brittle.

When should I delete speculative validators and guards?▼

Delete validators, parsers, and guards that go beyond what the specification demands. Out-of-spec features like persistence or retry-on-startup drag defensive guards behind them, so cutting the feature removes the need for its guards.

When is subtraction-first refactoring not appropriate?▼

Avoid it when the code under review is actively used and covered by observed usage requirements, or when removal would break documented behavior. The principle targets dead weight and speculative edge cases, not functioning spec-required logic.

How does this principle apply to prompts and documentation?▼

Simplify prompts by removing redundant instructions and excessive templates. When a reference document contains no novel content, delete it entirely rather than leaving a stub that adds surface without value.