clean-code

Enforce pragmatic coding standards for conciseness, clarity, and maintainability.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tuyenht/Antigravity-Core --skill clean-code-tuyenht
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/tuyenht/Antigravity-Core/tree/main/.agent/skills/clean-code
Command: npx skills add https://github.com/tuyenht/Antigravity-Core --skill clean-code-tuyenht

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enforces pragmatic coding standards to ensure code is concise, understandable, and avoids unnecessary complexity, leading to more maintainable and robust software.

Core Features & Use Cases

  • Enforces SOLID principles: Promotes Single Responsibility, DRY, KISS, YAGNI.
  • Standardizes Naming Conventions: Ensures variables, functions, and constants are clearly named.
  • Optimizes Function Design: Guides towards small, focused functions with minimal arguments.
  • Promotes Clean Code Structure: Encourages guard clauses, flat nesting, and composition.
  • AI Coding Style Guidelines: Directs AI agents on how to interact with users for code generation and bug fixing.
  • Pre-edit Checks: Mandates thinking about dependencies and impact before modifying files.
  • Post-completion Self-Checks: Ensures all requirements are met, code works, and tests pass.
  • Mandatory Script Verification: Defines specific scripts for agents to run for validation.

Quick Start

Follow the clean code principles to refactor the provided code snippet for better readability and maintainability.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I refactor my code for better maintainability and readability?

To refactor code for maintainability, enforce pragmatic coding standards like SRP, DRY, KISS, and YAGNI. This involves standardizing naming conventions, optimizing functions to be small and focused, and promoting flat code structures with guard clauses.

What are the core clean code principles for software development?

Core clean code principles include SOLID, DRY, KISS, and YAGNI. They enforce conciseness, clarity, and maintainability by requiring clear naming conventions, small functions with minimal arguments, and flat code structures to avoid unnecessary complexity.

How do I apply coding standards when generating or modifying code?

Apply coding standards during generation and modification by performing pre-edit checks to assess dependencies and impact. Follow AI coding style guidelines, use guard clauses, and run mandatory script verifications post-completion to ensure all tests pass.

Can I use these coding standards for any programming language or platform?

Yes, these pragmatic coding standards are language-agnostic. They focus on universal software engineering principles like Single Responsibility, clear naming conventions, and small focused functions, ensuring maintainability across all code generation and modification tasks.

What is the best way to structure functions for clean code?

The best way to structure functions for clean code is to keep them small and focused with minimal arguments. Promote a flat code structure by using guard clauses to handle edge cases early, and favor composition over deep nesting for maintainability.

Why does my refactored code still fail tests after applying clean code standards?

Refactored code may fail tests if pre-edit dependency checks or post-completion self-checks were skipped. You must run mandatory script verifications after modifications to ensure all requirements are met, the code works, and tests pass.