clean-code

Apply DRY, KISS, and YAGNI principles to write and review C# code.

4|1|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/DoubleslashSE/claude-marketplace --skill clean-code-doubleslashse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/DoubleslashSE/claude-marketplace/tree/main/Plugins/dotnet-tdd/skills/clean-code
Command: npx skills add https://github.com/DoubleslashSE/claude-marketplace --skill clean-code-doubleslashse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers produce maintainable .NET code by applying proven clean-code principles that reduce duplication, complexity, and future maintenance overhead.

Core Features & Use Cases

  • DRY enforcement: identify and remove duplicated validation, logic, and boilerplate to create a single source of truth.
  • KISS focus: promote simple, direct implementations over over-engineered solutions.
  • YAGNI discipline: avoid adding features or abstractions until they are genuinely needed.

Quick Start

Use the clean-code guidelines to review a sample UserService and refactor duplicate email validation into a single validator.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I refactor duplicated logic to improve C# .NET code maintainability?

To improve C# .NET code maintainability, you refactor duplicated logic by applying the DRY principle, consolidating repeated validation and boilerplate into a single source of truth to reduce future maintenance overhead.

What is the best way to avoid over-engineering when writing .NET code?

The best way to avoid over-engineering .NET code is to apply the KISS and YAGNI principles, promoting simple, direct implementations and avoiding unnecessary abstractions until features are genuinely needed.

Can I use clean-code principles to review an existing C# UserService?

Yes, you can use clean-code principles to review an existing C# UserService by identifying duplicate email validation and refactoring it into a single validator to enforce the DRY principle.

Do I need external runtimes beyond a typical .NET environment to apply these clean-code guidelines?

No, you do not need external runtimes beyond a typical .NET environment, because applying these clean-code guidelines requires only standard development tooling to write and review C# code.

When should I not use the YAGNI principle in C# software engineering?

The YAGNI principle in C# software engineering should be reconsidered when a specific abstraction or feature is genuinely needed now, as the discipline strictly targets avoiding premature additions that add unnecessary complexity.