yagni-principle/SKILL.md
Enforces the YAGNI (You Aren't Gonna Need It) principle to prevent speculative complexity while maintaining code quality. Use when evaluating whether to build a feature preemptively, deciding between extensibility and simplicity, reviewing code for over-engineering, resolving the YAGNI-SOLID tension, or assessing whether supporting practices (tests, CI, refactoring) are in place to apply YAGNI safely.
npx skillsauth add kayaman/skills yagni-principleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reference: Extreme Programming Explained (Beck), Tidy First? (Beck), Software Engineering at Google (Winters et al.)
"Always implement things when you actually need them, never when you just foresee that you need them." — Ron Jeffries
YAGNI originated from Extreme Programming in the late 1990s. Kent Beck and Chet Hendrickson, working on the Chrysler C3 project, found that every proposed future capability turned out to be unnecessary — hence, "You Aren't Gonna Need It."
Critical caveat: YAGNI requires supporting practices — continuous refactoring, automated testing, and CI. Without these, YAGNI leads to disorganized code. YAGNI means "don't build it yet," not "don't build it well."
Martin Fowler's analysis of what you pay when you build speculatively:
| Cost | Description | Impact | |------|-------------|--------| | Cost of Build | Time and effort spent on features that turn out unnecessary | Wasted development time | | Cost of Delay | Needed features are delayed while building speculative ones | Often the largest cost — opportunity cost of not shipping real value | | Cost of Carry | Added complexity makes ALL other features harder to build, test, and understand | Compounds over time; slows the entire team | | Cost of Repair | Even if eventually needed, understanding evolves; code from months ago may need reworking | The speculative code rarely matches the actual need |
Studies show only about one-third of features actually improve the metrics they target (Kohavi et al., Microsoft analysis of thousands of A/B tests).
Fowler's key distinction: "YAGNI only applies to capabilities built into the software to support a presumptive feature. It does not apply to effort to make the software easier to modify."
The apparent conflict: YAGNI says don't build what you don't need; SOLID/OCP says make things extensible.
| Concept | What It Means | YAGNI? | |---------|--------------|--------| | "Open for extension" | Good structure that MAKES future changes easy (clean interfaces, SRP, DIP) | NOT a violation — this is good design | | "Already extended" | Speculative extension points, abstract factories with one impl, unused plugin systems | YAGNI violation — premature complexity |
Being easy to extend is a property of well-structured code. Being already extended is speculative engineering.
"Imagine the refactoring you'd have to do later to add this feature. Is it significantly more expensive to add later than now?"
When tempted to build something preemptively:
Is there a confirmed, current need? If yes, build it. YAGNI doesn't apply to known requirements.
Is it structural quality or speculative capability? Clean code, tests, and good naming are NOT YAGNI violations. Only speculative features and extension points are.
Apply the refactoring thought experiment. How expensive would it be to add this later when you actually need it? If the answer is "not much more expensive," wait.
Check for supporting practices. YAGNI is safe only with automated tests, CI, and a culture of continuous refactoring. Without these, you need more upfront design.
Are you building a framework from a single use case? If so, stop. You need at least three concrete use cases to know the right abstraction.
| Pitfall | Signal | Remedy | |---------|--------|--------| | Speculative generality | Abstract classes with one subclass; interfaces with one implementation; unused parameters | Remove the abstraction; add it when the second use case arrives | | Gold plating | Feature has more options, configurations, or edge case handling than any user needs | Ship the minimal version; add complexity when users request it | | Resume-driven development | Using complex patterns to learn or showcase skills, not to solve the problem | Ask: "Would the simplest team member understand this?" | | YAGNI as excuse for poor quality | Skipping tests, error handling, or security "because YAGNI" | YAGNI applies to features, not to quality; quality is always needed | | Ignoring confirmed requirements | Dismissing known requirements as "not needed yet" | YAGNI applies to speculative features, not to confirmed ones | | Confusing "don't build" with "don't think" | Making no design decisions at all | Think ahead, but build only what's needed now |
At Google scale (Software Engineering at Google), YAGNI manifests as:
When reviewing code or proposals for YAGNI compliance, verify:
| Book | Author(s) | Publisher | Year | |------|-----------|-----------|------| | Extreme Programming Explained (2nd ed.) | Kent Beck | Addison-Wesley | 2004 | | Tidy First? | Kent Beck | O'Reilly | 2023 | | Software Engineering at Google | Winters, Manshreck, Wright | O'Reilly | 2020 | | The Pragmatic Programmer (2nd ed.) | Hunt & Thomas | Addison-Wesley | 2020 | | Refactoring (2nd ed.) | Martin Fowler | Addison-Wesley | 2018 |
tools
Guidance for designing charts, graphs, plots, dashboards, and data visualizations that communicate clearly and persuade. Use when creating or reviewing a visualization, choosing a chart type, picking a color palette, decluttering a busy graphic, fixing misleading axes or proportions, building a dashboard, annotating a figure, or turning data into a presentation, report, or data-driven story. Grounded in the standard data-visualization literature (Knaflic, Tufte, Cleveland & McGill, Cairo, Wilke, Munzner, Few, Berinato). Covers chart selection, graphical perception and encoding, color and accessibility, decluttering, graphical integrity, dashboards, and narrative. Does NOT cover building data pipelines or ETL, statistical modeling or analysis methods, BI tool/vendor selection, or general UI/UX layout (see ux-design-principles). Tool-agnostic, with optional Python recipes.
development
Architect and implement production-grade microservices systems in TypeScript (NestJS) and Python (FastAPI), including resilience, observability, testing, deployment, and migration guidance.
development
--- name: databricks-genie-spaces-best-practices description: Design, configure, curate, govern, monitor, and integrate Databricks AI/BI Genie Spaces — the natural-language-to-SQL surface over Unity Catalog. Covers space scoping, general instructions, parameterized example SQL, SQL functions, trusted assets, JOIN configuration, knowledge store, certified queries, benchmarks, monitoring tab, feedback loops, the Genie Conversation API, governance via Unity Catalog (row filters, column masks, embed
tools
Implement OTP and passwordless authentication on AWS for TypeScript projects using Cognito CUSTOM_AUTH triggers (default) or a custom DynamoDB-backed flow, with SES (email) and SNS (SMS) delivery. Use when the user mentions OTP, one-time password, passwordless login, magic link, Cognito custom auth, DefineAuthChallenge, CreateAuthChallenge, VerifyAuthChallengeResponse, SES verification email, SNS SMS code, or MFA over email/SMS. Covers architecture decision (Cognito vs custom), Lambda trigger handlers, SES/SNS notifiers, DynamoDB schema with TTL, rate limiting, constant-time comparison, threat model (enumeration, replay, brute force), and aws-sdk-client-mock testing.