clean-code

Enforces four-phased code quality gates for naming, function, structure, and smells.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/AymanKastali/pydentity --skill clean-code-aymankastali
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/AymanKastali/pydentity/tree/main/.claude/skills/clean-code
Command: npx skills add https://github.com/AymanKastali/pydentity --skill clean-code-aymankastali

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Maintains high-quality, maintainable code by enforcing naming clarity, single-responsibility design, and disciplined refactoring through structured gates.

Core Features & Use Cases

  • Phased gates that require gates at naming, function discipline, structure, and design smells.
  • Enforces readability, modularity, and reduced duplication across codebases.
  • Use during code reviews, onboarding, and cross-team code governance to raise baseline quality.

Quick Start

Run the four-phase gating workflow on every code change to ensure clean, maintainable code before merging.

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 principles during code reviews?

Enforce clean code during reviews by applying a four-phase gating workflow that checks naming clarity, function discipline, structure, and design smells for every modified module. This structured approach ensures readability and modularity before merging.

What are the four phases of clean code gating?

The four phases of clean code gating cover explicit naming, function constraints, modular interfaces, and design smells. Each modified module must pass these gates to ensure adherence to DRY and SRP principles while eliminating dead code.

Can I use a clean code gate workflow in CI/CD pipelines?

Yes, you can use this clean code gate workflow in CI/CD pipelines across languages. Running the four-phase gating workflow on every code change ensures maintainable, high-quality code passes structural and design checks before deployment.

Does the clean code gating approach work for onboarding new developers?

Yes, the clean code gating approach works for onboarding new developers by establishing a baseline for readability and reduced duplication. The phased gates provide structured, cross-team code governance that helps newcomers understand design principles.

What is the best way to reduce code duplication and enforce single responsibility?

The best way to reduce duplication and enforce single responsibility is to apply a structured gating workflow that checks for DRY and SRP principles. The four-phase gates mandate modular interfaces and function discipline to maintain code quality.

When should I not use a four-phase clean code gate?

You should avoid using a four-phase clean code gate for trivial or throwaway scripts where strict naming, modular interfaces, and function constraints add unnecessary overhead. The rigorous gating is designed for maintainable, cross-team production codebases.