clean-code

Enforce concise coding standards for maintainable software development.

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/lehoangphuc747/anki-lms-demo --skill clean-code-lehoangphuc747
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/lehoangphuc747/anki-lms-demo/tree/main/.agent/skills/clean-code
Command: npx skills add https://github.com/lehoangphuc747/anki-lms-demo --skill clean-code-lehoangphuc747

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pragmatic coding standards help teams minimize over-engineering, reduce code churn, and improve maintainability by enforcing concise, readable, and predictable patterns across projects.

Core Features & Use Cases

  • SRP: Single Responsibility Principle - each function or class has one clear purpose.
  • DRY & KISS: Avoid duplicates and unnecessary complexity; favor simple, direct solutions.
  • Naming & Style: Use descriptive identifiers and consistent formatting for readability.
  • Guard Clauses & Refactoring: Use early returns and modular helpers to reduce nesting and improve clarity.
  • Anti-Patterns: Avoid over-commenting obvious code, deep nesting, or "God" functions; encourage modular design.
  • Before Editing ANY File: Evaluate imports, dependencies, and potential side effects before making changes.

Quick Start

Provide a small, readable code sample that follows these guidelines and demonstrates a clean, maintainable result.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I reduce code complexity and improve readability in my project?

To improve readability, apply Single Responsibility Principle, DRY, and KISS patterns to favor simple, direct solutions and eliminate duplicate code. This approach minimizes over-engineering and ensures your codebase remains maintainable.

What are guard clauses and how do they help with code refactoring?

Guard clauses are early returns used during code refactoring to reduce deep nesting and improve clarity. By handling edge conditions upfront, they prevent complex conditional logic and make your functions more predictable and modular.

What are common anti-patterns to avoid when writing maintainable code?

Common anti-patterns to avoid include over-commenting obvious code, deep nesting, and creating 'God' functions that handle too many tasks. Encourage modular design and use descriptive identifiers instead of excessive comments.

How do I evaluate imports and side effects before editing a file?

Before editing any file, evaluate imports, dependencies, and potential side effects to ensure changes do not introduce unpredictable behavior. This practice maintains safety and modularity across your project during implementation work.

Does this coding standard work for all programming languages?

These pragmatic coding standards apply across development tasks, reviews, and implementation work regardless of language. They focus on universal principles like naming, style, modularity, and safety to improve code quality broadly.