programming-best-practices

Review code against SOLID, DRY, KISS, and YAGNI principles.

2|1|Updated Feb 2, 2019
One-click install
npx skills add https://github.com/Foo-x/dotfiles --skill programming-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: programming-best-practices
Source: https://github.com/Foo-x/dotfiles/tree/main/claude/skills/programming-best-practices
Command: npx skills add https://github.com/Foo-x/dotfiles --skill programming-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to language-agnostic programming best practices, helping developers write cleaner, more maintainable, and higher-quality code.

Core Features & Use Cases

  • Code Quality Standards: Offers guidelines on principles, metrics, and common pitfalls (code smells).
  • Design Improvement: Aids in code reviews and architectural design by highlighting areas for improvement.
  • Use Case: When reviewing a new feature implementation, consult this Skill to ensure adherence to SOLID principles and identify potential code smells before merging.

Quick Start

Review the provided code snippet against the programming principles and best practices outlined in this skill.

Frequently Asked Questions about programming-best-practices

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

FAQPage Schema
What are the core programming principles for improving code quality?

Core programming principles for improving code quality include SOLID, DRY, KISS, and YAGNI. These language-agnostic guidelines help developers create cleaner, more maintainable code by establishing clear standards for program design and architectural structure.

How do I identify common code smells during a code review?

To identify common code smells during a code review, evaluate the implementation against language-agnostic guidelines and metrics. Look for violations of SOLID principles and check quantitative metrics like cyclomatic complexity and cohesion to find areas for design improvement.

What is cyclomatic complexity and how does it measure code maintainability?

Cyclomatic complexity is a code quality metric that measures code maintainability by quantifying the number of linearly independent paths through a program's source code. High cyclomatic complexity indicates complex code that may require refactoring to reduce potential code smells.

Can I use these design principles and metrics with any programming language?

Yes, you can use these design principles and metrics with any programming language. The guidelines are explicitly language-agnostic, providing universal best practices for code creation, review, and general program design regardless of the specific tech stack.

When should I apply the YAGNI principle in software engineering?

You should apply the YAGNI (You Aren't Gonna Need It) principle in software engineering when creating new features or reviewing code. It prevents over-engineering by ensuring developers only implement functionality that is actually necessary, directly elevating overall code quality.