clean-code

Apply coding standards for readability, maintainability, and AI-specific best practices.

Updated Aug 5, 2025
One-click install
npx skills add https://github.com/lehuuhau1231/TechJobs --skill clean-code-lehuuhau1231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/lehuuhau1231/TechJobs/tree/main/tech-job-client/.agent/skills/clean-code
Command: npx skills add https://github.com/lehuuhau1231/TechJobs --skill clean-code-lehuuhau1231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps maintain clean and maintainable code by adhering to pragmatic coding standards, ensuring code quality and readability.

Core Features & Use Cases

  • Pragmatic Coding Principles: Implements the Single Responsibility Principle, Don't Repeat Yourself, Keep It Simple, You Aren't Gonna Need It, and Boy Scout Rule.
  • Naming Conventions: Provides guidelines for naming variables, functions, booleans, and constants to enhance readability.
  • Function Rules: Enforces best practices for function size, argument count, and side effects to improve maintainability.
  • Code Structure: Recommends guard clauses, flat structures, composition, and colocation for clear and manageable code.
  • AI Coding Style: Offers guidelines for AI coding, emphasizing direct implementation, immediate bug fixes, and clarity over requirements.
  • Anti-Patterns: Highlights common coding mistakes and their recommended fixes to avoid common pitfalls.
  • Pre-Editing Checklist: Ensures all necessary checks are performed before modifying a file, preventing potential issues.
  • Summary: Provides a concise list of best practices and don'ts to follow when writing code.
  • Self-Check: Ensures all tasks are completed successfully before finalizing work.
  • Verification Scripts: Ensures the integrity of the codebase by running verification scripts before completion.

Quick Start

Before editing any file, perform the necessary checks and run all verification scripts for your changes.

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 and maintain clean code in my software project?

To enforce coding standards and maintain clean code, apply pragmatic principles like single responsibility, keep it simple, and don't repeat yourself. Implementing these rules ensures software quality, reduces bugs, and improves overall code readability.

What are the best practices for naming variables and structuring functions for readability?

Best practices for naming variables and structuring functions include using clear naming conventions, enforcing function size limits, minimizing argument count, and avoiding side effects. These practices enhance readability and improve long-term code maintainability.

How do I prevent introducing bugs when modifying existing code files?

To prevent introducing bugs when modifying existing code, follow a pre-editing checklist to perform necessary checks, utilize guard clauses for flat structures, and run verification scripts before completion to ensure codebase integrity.

Does this clean code approach work with AI-assisted development workflows?

Yes, this clean code approach works with AI-assisted development by providing AI coding style guidelines. It emphasizes direct implementation, immediate bug fixes, and clarity over requirements to ensure AI-generated code remains maintainable.

What are common coding anti-patterns and how can I fix them?

Common coding anti-patterns include violating the single responsibility principle, creating complex nested structures, and introducing function side effects. Recommended fixes involve using guard clauses, composition, and adhering to pragmatic coding standards.