clean-code

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

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/beliciobcardoso/mcp-postgres --skill clean-code-beliciobcardoso
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/beliciobcardoso/mcp-postgres/tree/main/.agent/skills/clean-code
Command: npx skills add https://github.com/beliciobcardoso/mcp-postgres --skill clean-code-beliciobcardoso

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated code often suffers from over-engineering, excessive comments, deep nesting, and inconsistent naming, making it hard to maintain. This Skill enforces pragmatic coding standards so every code change is concise, direct, and solution-focused. ## Core Features & Use Cases - Coding Standards Enforcement: Applies SRP, DRY, KISS, YAGNI, and Boy Scout principles with concrete naming, function size, and structure rules. - Anti-Pattern Detection: Flags common mistakes like god functions, magic numbers, unnecessary helpers, and obvious comments, with fixes for each. - Dependency-Aware Editing: Requires checking imports, dependents, and tests before modifying any file, preventing broken references. - Verification Workflow: Mandates self-checks and per-agent validation scripts with a read-summarize-ask output handling protocol. - Use Case: When an AI agent implements a feature or fixes a bug, this Skill ensures the resulting code is small, well-named, free of dead abstractions, and that all dependent files are updated in the same task. ## Quick Start Apply the clean-code standards to review and refactor the code you just wrote, keeping functions small and removing unnecessary comments.

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 defines max 20-line functions, intent-revealing names, guard clauses, and a mandatory self-check before completing any task.

What are the most common AI coding anti-patterns to avoid?▼

Common anti-patterns include commenting every line, creating helpers for one-liners, factories for two objects, deep nesting, and god functions. Each should be replaced with direct fixes like inlining code, guard clauses, and splitting by responsibility.

How to safely edit a file without breaking dependent code?▼

Before editing, identify what imports the file, what it imports, and which tests cover it. Then edit the file and all dependent files in the same task so no broken imports or outdated call signatures remain.

Does this coding standard work with any programming language?▼

Yes, the principles are language-agnostic: naming conventions, small functions, guard clauses, and DRY apply universally. Language-specific verification is handled through lint and type coverage scripts run after edits.

When should validation scripts run after code changes?▼

Each agent runs only its own skill's validation script after completing work, such as lint checks or type coverage. The output must be read, summarized into errors and warnings, and the user asked before any fixes are applied.