clean-code-principles

Apply DRY, KISS, YAGNI, Fail Fast, SRP, and DIP principles to code generation, review, and refactoring.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/fyuuki0jp/rise --skill clean-code-principles-fyuuki0jp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code-principles
Source: https://github.com/fyuuki0jp/rise/tree/main/.opencode/skills/clean-code-principles
Command: npx skills add https://github.com/fyuuki0jp/rise --skill clean-code-principles-fyuuki0jp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Language-agnostic coding principles help teams produce cleaner, more maintainable code by reducing defects and churn.

Core Features & Use Cases

  • DRY: Extract duplicated logic into reusable utilities and modules.
  • KISS: Favor readability over cleverness and premature optimization.
  • YAGNI: Avoid implementing features until needed.
  • Fail Fast: Validate inputs at public boundaries to catch errors early.
  • SRP & DIP: Promote single responsibility and dependency inversion for modular design.
  • Use Case: A team refactors a legacy module by applying SRP and DRY across services.

Quick Start

Begin applying clean-code-principles during code generation, review, and refactoring by auditing for DRY, SRP, and proper validation.

Frequently Asked Questions about clean-code-principles

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

FAQPage Schema
How do I apply clean code principles when refactoring a legacy module?

To refactor legacy code for maintainability, apply DRY to extract duplicated logic into reusable modules and SRP to ensure each service has a single responsibility, reducing defects and churn.

What is the best way to review code for maintainability across different programming languages?

Language-agnostic clean code review checks for DRY, KISS, and YAGNI violations, enforcing structured guidance and corrective recommendations across projects of varying sizes from scripts to services.

When should I use dependency inversion and fail fast principles in software design?

Use dependency inversion (DIP) to promote modular design and fail fast to validate inputs at public boundaries, catching errors early before they propagate through the system architecture.

Can I use these clean code guidelines for both small scripts and large services?

Yes, these language-agnostic clean code principles guide code generation, review, and refactoring tasks effectively across projects of varying sizes, from standalone scripts to complex modular services.

Why does premature optimization make code harder to maintain?

Premature optimization violates the KISS principle by favoring cleverness over readability, and YAGNI by adding unnecessary complexity, which increases defects and code churn over time.

How do I start applying clean code principles during code generation?

Begin code generation by auditing for DRY, SRP, and proper input validation, using structured guidance and examples to enforce maintainable coding standards from the start.