clean-code

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

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/singhaganesh/Urban-assist --skill clean-code-singhaganesh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/singhaganesh/Urban-assist/tree/main/.cursor/skills/clean-code
Command: npx skills add https://github.com/singhaganesh/Urban-assist --skill clean-code-singhaganesh

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 every edit stays concise, direct, and consistent with clean code principles. ## Core Features & Use Cases - Coding Standards Enforcement: Applies SRP, DRY, KISS, YAGNI, and Boy Scout rules with concrete naming, function size, and structure conventions. - Dependency-Aware Editing: Requires checking imports, dependents, and tests before modifying any file, preventing broken references. - Verification Workflow: Maps specialist agents to validation scripts (lint, type coverage, UX audit, security scan) with a mandatory read-summarize-ask output handling process. - Use Case: When refactoring a TypeScript service in a monorepo, the Skill ensures functions stay under 20 lines, guard clauses replace nesting, and all dependent files are updated in the same task. ## Quick Start Ask the AI to refactor or write code in your project and it will apply clean code principles, check file dependencies, and run the appropriate validation scripts before completing.

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 in AI-generated code?

Apply explicit rules for naming, function size, and structure that the AI must follow on every edit. This Skill enforces SRP, DRY, KISS, and YAGNI principles, limits functions to 20 lines, and bans obvious comments and unnecessary abstractions.

What coding principles should AI assistants follow when refactoring?

Core principles are Single Responsibility, DRY, KISS, YAGNI, and the Boy Scout rule of leaving code cleaner than found. Functions should do one thing, take at most 3 arguments, and use guard clauses instead of deep nesting.

How to prevent broken imports when AI edits shared files?

Before editing any file, check what imports it, what it imports, and which tests cover it. Edit the file and all its dependents in the same task so no broken imports or missing updates are left behind.

Does this coding standards approach work with TypeScript monorepos?

Yes, the standards are language-agnostic but include verification through lint checks and TypeScript type coverage scripts. The dependency-aware editing rules are especially useful in monorepos where shared packages affect multiple apps.

When should validation scripts run after code changes?

Each specialist agent runs only its own skill's scripts after completing work, such as lint_runner.py or type_coverage.py for general changes. Output must be read, summarized, and confirmed with the user before any fixes are applied.