clean-code

Enforce pragmatic coding standards for AI agents with self-checks.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/namninhnd/PrelimStruct --skill clean-code-namninhnd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/namninhnd/PrelimStruct/tree/main/.claude/skills/clean-code
Command: npx skills add https://github.com/namninhnd/PrelimStruct --skill clean-code-namninhnd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enforces pragmatic coding standards to ensure code is concise, direct, maintainable, and avoids unnecessary complexity or over-engineering.

Core Features & Use Cases

  • Coding Principles: Adheres to SRP, DRY, KISS, YAGNI, and Boy Scout Rule.
  • Naming Conventions: Enforces clear and intent-revealing names for variables, functions, and constants.
  • Function Design: Promotes small, single-responsibility functions with minimal arguments.
  • Code Structure: Encourages guard clauses, flat nesting, and composition.
  • AI Coding Style: Guides AI agents on how to interact with users for feature requests and bug fixes.
  • Verification: Mandates self-checks and script execution for code quality and correctness.
  • Use Case: When developing new features or fixing bugs, this Skill ensures the resulting code is easy to understand, test, and extend by following established best practices.

Quick Start

Follow the clean code principles to refactor the provided code snippet.

Frequently Asked Questions about clean-code

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

FAQPage Schema
What are the key clean code principles for writing maintainable software?

Key clean code principles include SRP, DRY, KISS, YAGNI, and the Boy Scout Rule. These coding standards ensure software is concise, direct, and maintainable by enforcing clear naming conventions, small single-responsibility functions, and flat code structure to avoid unnecessary complexity.

How do I refactor code to improve maintainability and reduce complexity?

Refactor code by applying pragmatic coding standards: use guard clauses, ensure flat nesting, and design small functions with minimal arguments. This refactoring process removes over-engineering, enforces single responsibility, and produces code that is easy to understand, test, and extend.

Can I use clean code standards to guide AI agents during feature development?

Yes, these clean code standards are designed to guide AI coding agents. The guidelines direct AI agents on how to interact with users for feature requests and bug fixes, ensuring the AI generates maintainable code with clear naming and proper function design.

Do I need Python to run the clean code verification scripts?

Yes, Python is a required dependency. The skill includes verification scripts that execute to check code quality and correctness, and it mandates self-checks to ensure the generated code adheres to the established pragmatic coding standards.

What is the best way to enforce coding standards for AI-generated code?

The best way to enforce coding standards for AI-generated code is to apply mandatory self-checks and script execution. This verification process ensures the AI follows pragmatic principles like DRY and KISS, resulting in concise, direct, and maintainable code without over-engineering.

When should I avoid over-engineering code during bug fixes?

Avoid over-engineering during bug fixes by adhering to the YAGNI principle and keeping functions small with minimal arguments. The clean code standards enforce conciseness and directness, ensuring you only implement necessary complexity for maintainable and testable results.