clean-code

Enforces pragmatic coding standards for AI agents producing clean code.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/simoabid/ABID.Dev-Portfolio --skill clean-code-simoabid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/simoabid/ABID.Dev-Portfolio/tree/main/.agent/skills/clean-code
Command: npx skills add https://github.com/simoabid/ABID.Dev-Portfolio --skill clean-code-simoabid

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enforces pragmatic coding standards to ensure code is maintainable, efficient, and easy to understand, preventing over-engineering and unnecessary complexity.

Core Features & Use Cases

  • Enforces SOLID principles: Promotes Single Responsibility, Don't Repeat Yourself, Keep It Simple, You Ain't Gonna Need It, and the Boy Scout Rule.
  • Standardizes Naming Conventions: Ensures clear and intent-revealing names for variables, functions, and constants.
  • Optimizes Function Design: Guides the creation of small, focused functions with minimal arguments and no side effects.
  • Promotes Clean Code Structure: Encourages guard clauses, flat nesting, composition, and colocation.
  • Defines AI Coding Style: Provides clear directives for AI behavior when responding to user requests for features or bug fixes.
  • Identifies Anti-Patterns: Lists common pitfalls and their recommended fixes.
  • Mandatory Self-Checks: Includes pre-editing and pre-completion checklists for AI agents.
  • Verification Scripts: Outlines mandatory script execution for validation and linting.

Quick Start

Apply the clean-code skill to refactor the provided Python function to adhere to the Single Responsibility Principle.

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 standards to prevent over-engineering in AI-generated scripts?

To enforce clean code standards and prevent over-engineering, apply pragmatic coding rules like KISS and YAGNI. This ensures AI agents write concise, direct, and solution-focused code without unnecessary complexity.

What is the best way to refactor code to follow the Single Responsibility Principle?

The best way to refactor code for the Single Responsibility Principle is to optimize function design. Create small, focused functions with minimal arguments, no side effects, and clear, intent-revealing naming conventions.

How does the Boy Scout Rule apply to refactoring existing codebases?

The Boy Scout Rule applies to refactoring by mandating that you leave code cleaner than you found it. It promotes continuous improvement through guard clauses, flat nesting, and removing anti-patterns during routine edits.

Can I use coding standards to automate linting and type coverage checks before completion?

Yes, you can automate linting and type coverage checks by running mandatory verification scripts. Pre-completion checklists ensure code meets quality standards, structure patterns, and internationalization requirements before finalizing.

What are common anti-patterns in software engineering and how do I fix them?

Common anti-patterns include deep nesting, side effects, and poor naming. Fix them by applying DRY and KISS principles, using guard clauses, standardizing naming conventions, and creating focused functions to reduce complexity.

When do I need to apply these coding standards to my development workflow?

You need to apply these coding standards whenever you write or modify code to ensure maintainability. Defining AI coding styles and running pre-editing self-checks guarantees consistent quality and prevents unnecessary complexity.