clean-code

Enforce pragmatic clean-code conventions for readable, maintainable source code.

2|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/miptah21/skills --skill clean-code-miptah21
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/miptah21/skills/tree/main/.agents/skills/clean-code
Command: npx skills add https://github.com/miptah21/skills --skill clean-code-miptah21

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It reduces bugs and maintenance cost by enforcing pragmatic coding standards for clarity, small functions, and minimal unnecessary complexity—especially important when working with AI-generated code.

Core Features & Use Cases

  • AI-friendly clean coding rules: encourages direct solutions, concise responses, and avoiding tutorial-style output during implementation.
  • Consistent naming and structure: focuses on intention-revealing names, SRP/DRY/KISS/YAGNI, guard clauses, and flat over deeply nested logic.
  • Safe editing workflow: provides a pre-change checklist to understand imports, dependencies, and tests before modifying shared files.
  • Verification discipline: recommends running centralized compliance scripts (lint/type coverage/i18n and other domain checks) to confirm quality after changes.

Quick Start

Use the clean-code skill to update the target file while following the “Before Editing ANY File (THINK FIRST!)” checklist, then run the centralized compliance runner to confirm the change passes validation.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I enforce clean code conventions when refactoring AI-generated source code?

To enforce clean code conventions during refactoring, apply pragmatic rules for naming, small function sizes, and guard clauses to minimize common AI code smells and over-engineering. This ensures readable, maintainable source.

What is the safe editing workflow for modifying shared codebase files with dependencies?

The safe editing workflow for shared codebase files requires a pre-change checklist to analyze imports, dependencies, and tests before modifying. This dependency-aware edit plan prevents breaking existing functionality.

How do I apply SRP, DRY, and KISS principles without over-engineering software features?

Applying SRP, DRY, and KISS principles without over-engineering requires writing concise, direct code with intention-revealing names and flat logic over deeply nested structures. This minimizes unnecessary complexity.

Does the clean-code skill include scripts for linting and type safety validation?

Yes, the clean-code skill provides centralized compliance scripts to run lint, type safety, and i18n validation. Running these scripts after changes confirms your code passes required quality checks.

When should I use guard clauses to avoid deeply nested logic in my source code?

You should use guard clauses to avoid deeply nested logic when implementing features or fixing bugs, favoring flat over deeply nested structures. This produces concise, direct code that stays readable.

What is the best way to prepare changes to shared codebases while maintaining coding standards?

The best way to prepare changes to shared codebases is following a dependency and test-aware edit plan, applying clean coding rules, then running compliance scripts for validation. This ensures maintainable source.