clean-code

Enforce pragmatic coding standards and verification checks for maintainable source code.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/darthlinuxer/dialectic-crew-ai --skill clean-code-darthlinuxer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/darthlinuxer/dialectic-crew-ai/tree/main/src/mcp/skills/clean-code
Command: npx skills add https://github.com/darthlinuxer/dialectic-crew-ai --skill clean-code-darthlinuxer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides pragmatic coding standards to eliminate over-engineering, unclear names, large god-functions, excessive comments, and inconsistent structure so code is easier to read, maintain, and verify by both humans and AI agents.

Core Features & Use Cases

  • Clear Principles: Enforces SRP, DRY, KISS, YAGNI and the Boy Scout rule to keep code small and focused.
  • Practical Rules: Naming conventions, function size and arg limits, guard clauses, and composition guidance to reduce bugs and cognitive load.
  • Validation Workflow: Mandatory self-check checklist and scripted verification output handling for running, parsing, summarizing, and re-running validation tools before marking work complete.
  • Use Case: Use when refactoring a legacy module, implementing a new user-facing feature, or guiding an AI agent to produce production-quality patches.

Quick Start

Refactor and simplify the touched files to follow single-responsibility, small functions with clear names, remove unnecessary comments, run the verification scripts, summarize results, and ask before fixing reported errors.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I refactor legacy code to follow clean code standards?

Clean code principles enforce SRP, DRY, KISS, and YAGNI to eliminate god-functions and unclear names. By applying naming conventions, limiting function arguments, and using guard clauses, you reduce bugs and cognitive load, producing concise, maintainable source code suitable for production.

How do I enforce coding standards during an AI agent code review?

Use a validation workflow with mandatory self-checks and structured script output handling. Run verification scripts, parse and summarize results, and re-run validation tools before marking work complete. This ensures automated agent-driven edits produce production-quality patches with minimal bugs.

What are the best practices for function size and arguments in clean code?

Best practices for function size and arguments include writing small single-purpose functions with limited arguments. Using guard clauses for early exits and following naming conventions reduces bugs and cognitive load, keeping your codebase concise, maintainable, and easier to verify by humans and AI agents.

Does this clean code approach work for automated agent-driven edits?

Yes, this clean code approach works for automated agent-driven edits. It enforces pragmatic coding standards, a mandatory self-check checklist, and structured script output handling, requiring agents to run verification scripts and summarize results before marking work complete.

When should I not use strict coding standards and naming conventions?

You should avoid strict coding standards when rapid prototyping demands speed over maintainability, or when over-engineering verification workflows adds unnecessary complexity. For production-ready source code, however, applying coding standards prevents god-functions and inconsistent structure.