clean-code

Enforces concise coding standards, naming conventions, and verification checks for AI-written code.

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill clean-code-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/.agent/skills/clean-code
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill clean-code-virahitvin8

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated code often suffers from over-engineering, excessive comments, deep nesting, and broken dependencies across files. This Skill enforces pragmatic coding standards so every code change stays concise, direct, and consistent. ## Core Features & Use Cases - Coding Standards Enforcement: Applies SRP, DRY, KISS, and YAGNI principles with concrete naming, function size, and structure rules. - Dependency-Aware Editing: Requires checking imports and dependents before modifying any file, preventing broken references. - Verification Workflow: Maps each specialist agent to its validation script and mandates a read-summarize-ask flow before fixing reported issues. - Use Case: When asking an AI to add a feature or fix a bug, this Skill ensures the response is working code without tutorial-style explanations, obvious comments, or unnecessary helper files. ## Quick Start Ask the AI to implement a feature or fix a bug and it will write concise, self-documenting code following these standards.

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 such as SRP, DRY, KISS, and YAGNI. This Skill encodes those rules as mandatory instructions so the AI writes concise, self-documenting code without obvious comments or over-engineering.

What coding principles should AI assistants follow when writing code?

Core principles include Single Responsibility, Don't Repeat Yourself, Keep It Simple, and You Aren't Gonna Need It. Functions should stay under 20 lines, 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 and what it imports, then update all dependent files in the same task. This Skill mandates that dependency check as a required pre-edit step.

Why does AI-generated code often have too many comments?

Models default to tutorial-style output explaining each line. The fix is instructing the AI to let code self-document through clear naming and to delete comments that restate obvious logic.

When should validation scripts run after code changes?

Run the validation script matching the agent's specialty immediately after completing work, then summarize errors and warnings to the user before fixing. Auto-fixing without user confirmation is not allowed.