One-click install
npx skills add https://github.com/Geargrindadmin/gg-agentic-harness --skill clean-code-geargrindadmin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/Geargrindadmin/gg-agentic-harness/tree/main/.agent/skills/clean-code
Command: npx skills add https://github.com/Geargrindadmin/gg-agentic-harness --skill clean-code-geargrindadmin

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

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

Core Features & Use Cases

  • Enforces Single Responsibility Principle (SRP): Ensures functions and classes do one thing well.
  • Promotes DRY (Don't Repeat Yourself): Encourages code reuse and avoids duplication.
  • Simplifies Code (KISS/YAGNI): Guides towards the simplest effective solution and avoids premature feature building.
  • Improves Readability: Establishes clear naming conventions and code structure.
  • Use Case: When refactoring a legacy module, apply these standards to simplify complex functions, rename ambiguous variables, and ensure each component has a clear purpose.

Quick Start

Apply the clean code standards to the provided UserService.ts file, focusing on simplifying functions and improving variable names.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I enforce coding standards for AI-generated code?

To enforce coding standards for AI-generated code, apply pragmatic rules that enforce the Single Responsibility Principle, DRY, and KISS. This ensures AI agents produce concise, maintainable code without unnecessary comments or over-engineering.

What is the best way to refactor complex legacy code for maintainability?

Refactoring legacy code for maintainability involves simplifying complex functions, renaming ambiguous variables, and ensuring each component has a clear purpose. Applying pragmatic coding standards promotes code reuse and avoids premature feature building.

How do I stop AI agents from over-engineering code?

To stop AI agents from over-engineering code, enforce pragmatic coding standards that guide towards the simplest effective solution. This includes mandatory verification script execution and self-check mechanisms to address complex function design.

Does this code quality guidance require Python?

Yes, this code quality guidance requires Python as a dependency to run its mandatory verification scripts. The standards themselves apply to general coding practices, but the automated enforcement mechanism relies on the Python environment.

When should I not use clean code principles during development?

You should reconsider strict clean code principles when rapid prototyping requires immediate functionality over maintainability. However, for long-term software engineering, applying these standards prevents code duplication and ensures each function does one thing well.