clean-code

Enforce pragmatic coding standards for clean, maintainable software.

4|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/marcusagm/Mundam --skill clean-code-marcusagm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/marcusagm/Mundam/tree/main/.agent/skills/clean-code
Command: npx skills add https://github.com/marcusagm/Mundam --skill clean-code-marcusagm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pragmatic coding standards help developers write maintainable, readable code by avoiding over-engineering and unnecessary boilerplate.

Core Features & Use Cases

  • SRP (Single Responsibility Principle): each function or class does one thing.
  • DRY (Don't Repeat Yourself): extract duplicates and reuse.
  • KISS (Keep It Simple): prefer simple, direct solutions.
  • YAGNI (You Aren't Gonna Need It): avoid building unused features.
  • Naming Rules: clear, descriptive identifiers over cryptic abbreviations.
  • Function Rules: small, focused functions with minimal side effects.
  • Code Structure: prefer guard clauses, flat nesting, and good composition.
  • AI Coding Style: deliver concise, direct solutions when prompted.

Quick Start

Start applying these rules in your next task:

  • Rename ambiguous variables to reveal intent.
  • Extract duplicated logic into a shared function.
  • Replace deep nesting with guard clauses and early returns.
  • Refactor to ensure each function has a single responsibility.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I refactor deep nesting to improve code maintainability?

Refactor deep nesting by replacing conditional blocks with guard clauses and early returns. This enforces clean code standards, flattens structure, reduces cyclomatic complexity, and makes functions easier to read and maintain.

What are common anti-patterns to flag during rapid code reviews?

Common anti-patterns flagged during rapid code reviews include ambiguous naming, duplicated logic, deep nesting, and functions violating the Single Responsibility Principle. Identifying these anti-patterns ensures concise, maintainable software.

How do I apply the Single Responsibility Principle when writing functions?

Apply the Single Responsibility Principle by ensuring each function or class does exactly one thing. Extract duplicated logic into shared functions to enforce DRY, keeping functions small, focused, and free of unnecessary side effects.

When should I use guard clauses instead of conditional nesting?

Use guard clauses instead of conditional nesting when you need to validate preconditions early and exit immediately. This approach prevents over-engineering, simplifies logic flow, and adheres to KISS and YAGNI principles.

Does this approach work for reviewing existing modules and components?

Yes, this approach works for reviewing existing modules and components by flagging anti-patterns for rapid code reviews. It enforces coding standards across daily development tasks, ensuring clarity, reliability, and maintainability.

Why rename ambiguous variables to reveal intent in software engineering?

Rename ambiguous variables to reveal intent because clear, descriptive identifiers prevent cryptic abbreviations. This naming rule is a core clean code standard that directly improves readability and maintainability across the software.