clean-code

Enforces pragmatic coding standards for concise, direct, and maintainable code.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/alex-jordan547/agent-setup --skill clean-code-alex-jordan547
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/alex-jordan547/agent-setup/tree/main/archive/2026-09-10/clean-code
Command: npx skills add https://github.com/alex-jordan547/agent-setup --skill clean-code-alex-jordan547

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated code often suffers from over-engineering, excessive comments, deep nesting, and broken cross-file dependencies. This Skill enforces pragmatic coding standards so the AI writes concise, direct, solution-focused code without unnecessary abstractions or tutorials. ## Core Features & Use Cases - Coding Standards Enforcement: Applies SRP, DRY, KISS, YAGNI, and Boy Scout principles with concrete naming, function size, and structure rules. - Dependency-Aware Editing: Requires checking imports, dependents, and tests before modifying any file, ensuring all affected files are updated together. - Verification Workflow: Maps each specialist agent to its own validation script (lint, type coverage, UX audit, security scan) with a mandatory read-summarize-ask output handling protocol. - Use Case: When asking the AI to add a feature or fix a bug, it writes the code directly, updates all dependent files in the same task, runs the appropriate validation script, and reports errors before fixing them. ## Quick Start Ask the AI to implement a feature or fix a bug while following clean code principles and running the matching validation script afterward.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I make AI write cleaner code without over-engineering?

Apply explicit constraints like SRP, DRY, KISS, and YAGNI with concrete limits such as 20-line functions, maximum 3 arguments, and no more than 2 nesting levels. Banning obvious comments and unnecessary helper abstractions keeps output direct and minimal.

How to prevent broken imports when AI edits code files?

Require a dependency check before any edit: identify what imports the file, what the file imports, and which tests cover it. Then mandate that the file and all its dependents are updated within the same task so no broken imports remain.

What naming conventions should AI-generated code follow?

Variables should reveal intent like userCount, functions should use verb-plus-noun like getUserById, booleans should read as questions like isActive, and constants should use SCREAMING_SNAKE_CASE. If a name needs a comment to explain it, rename it.

Should AI agents run validation scripts after writing code?

Yes, each agent should run only its own domain's validation script, such as lint checks, type coverage, or security scans. The agent must read the output, summarize errors and warnings, and ask for confirmation before applying fixes.

When should AI not create helper functions or utility files?

Avoid helpers for one-liners, factories for only two objects, and utils files holding a single function. Inline small code where it is used and only extract abstractions when duplication or clear responsibility boundaries justify them.