code-principles

Apply SOLID, DRY, and YAGNI principles to code reviews and planning.

3|Updated Jan 14, 2014
One-click install
npx skills add https://github.com/prateek/dotfiles --skill code-principles-prateek
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-principles
Source: https://github.com/prateek/dotfiles/tree/main/.agents/skills/code-principles
Command: npx skills add https://github.com/prateek/dotfiles --skill code-principles-prateek

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Software engineers struggle to consistently apply design heuristics and best practices across codebases. This Skill provides a structured catalog of key principles (SOLID, DRY, YAGNI, and more) with concise guidance to inform reviews, planning, and learning.

Core Features & Use Cases

  • Principle catalog: SRP, OCP, LSP, ISP, DIP, DRY, YAGNI, AHA, CQS, Law of Demeter, Tell Don't Ask, POLA, Composition over Inheritance, IoC, Hexagonal Architecture, Bounded Contexts, and React/architecture references.
  • Guidance for reviews & planning: Use during code reviews to surface design issues, during planning discussions to evaluate architecture choices, and during onboarding to teach new team members.
  • Learning paths: Curated references and practical heuristics to deepen understanding and application.

Quick Start

Review the listed principles during code reviews or planning discussions to apply these guidelines to real-world code.

Frequently Asked Questions about code-principles

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

FAQPage Schema
What software engineering principles should I check during a code review?

Code reviews should check SOLID, DRY, and YAGNI principles to surface design issues. This catalog provides concise guidance on these heuristics, plus the Law of Demeter and CQS, to evaluate code structure and maintainability during reviews.

How do I apply architecture design principles to planning discussions?

Apply architecture design principles during planning by evaluating choices against Hexagonal Architecture and Bounded Contexts. This catalog provides structured guidelines to validate architecture decisions, ensuring consistent design heuristics across team planning validation sessions.

When should I use composition over inheritance in software design?

Composition over inheritance is a core software design heuristic used to build flexible code structures. It is applied alongside Inversion of Control and Dependency Inversion principles to decouple components and improve code maintainability during design discussions.

Does this catalog include React best practices for design reviews?

Yes, the software engineering principles catalog includes React best practices and architecture references. These references guide evaluation and education during code reviews, helping teams apply consistent design heuristics to React codebases.

What is the best way to teach SOLID principles during team onboarding?

The best way to teach SOLID principles during onboarding is using a curated catalog of heuristics. This resource provides structured learning paths and concise guidance on SRP, OCP, LSP, ISP, and DIP to educate new team members on consistent design guidelines.

Can I use YAGNI and AHA heuristics to prevent over-engineering?

Yes, YAGNI and AHA heuristics are included in this software engineering principles catalog to prevent over-engineering. They provide concise guidance to help teams evaluate design choices and avoid building unnecessary functionality during code planning and reviews.