clean-code

Enforce pragmatic coding standards for AI agents with linting and validation scripts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enforces a set of pragmatic coding standards to ensure code is concise, direct, maintainable, and avoids unnecessary complexity or verbosity.

Core Features & Use Cases

  • Enforces SOLID principles: Promotes Single Responsibility, DRY, KISS, YAGNI.
  • Standardizes Naming: Ensures clear and intent-revealing names for variables, functions, and constants.
  • Optimizes Function Design: Guides towards small functions with few arguments and no side effects.
  • Promotes Clean Structure: Encourages guard clauses, flat nesting, and composition.
  • AI-Specific Guidelines: Provides clear instructions for AI agents on how to handle user requests, bugs, and unclear requirements.
  • Pre-edit Checks: Mandates thinking about dependencies and impact before modifying files.
  • Post-task Verification: Requires self-checking for goal completion, code correctness, and absence of errors.
  • Script Execution: Defines specific validation scripts to be run by agents for linting, type coverage, and internationalization checks.
  • Use Case: An AI agent tasked with refactoring a legacy codebase would use this Skill to ensure all changes adhere to these best practices, leading to a cleaner, more robust final product.

Quick Start

Apply the clean-code skill to refactor the provided Python script, ensuring it adheres to all naming conventions and function size limits.

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 when refactoring with an AI agent?

To enforce clean code standards during AI refactoring, apply guidelines focusing on SRP, DRY, KISS, and YAGNI. This ensures functions remain small, intent-revealing, and free of unnecessary complexity or side effects during automated modifications.

What are the best practices for preventing over-engineering in AI-generated code?

Best practices for preventing over-engineering involve mandating pragmatic coding standards like KISS and YAGNI. This directs the AI agent to prioritize conciseness, avoid unnecessary comments, and strictly limit function arguments and nested structures.

How do I automate code quality checks and linting for Python projects?

Automate code quality checks by running defined validation scripts for linting and type coverage. The skill mandates post-task self-verification and script execution to validate code correctness, structure, and internationalization after modifications.

Does this clean code skill work without Python installed?

No, this clean code skill requires Python installed in your environment. Python is a necessary dependency because the skill includes specific script execution mandates for linting, type coverage validation, and post-task verification.

What should an AI agent do before modifying files to ensure clean code structure?

Before modifying files to ensure clean code structure, an AI agent must perform pre-edit checks. This involves thinking about dependencies, analyzing impact, and planning guard clauses and flat nesting before making any code changes.

How do I handle unclear requirements when an AI agent is refactoring code?

To handle unclear requirements during AI refactoring, use defined AI interaction patterns. The skill provides specific guidelines directing agents on how to manage ambiguous user requests, bugs, and unclear requirements pragmatically without over-engineering.