clean-code

Refactor code to improve naming, structure, and error handling.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/sigitpoerwo/repoworkspace_zahra --skill clean-code-sigitpoerwo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/sigitpoerwo/repoworkspace_zahra/tree/main/skills/01-SIAP-PAKAI/coding/clean-code
Command: npx skills add https://github.com/sigitpoerwo/repoworkspace_zahra --skill clean-code-sigitpoerwo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Applies the clean-code principles to transform code that merely works into readable, maintainable software. It guides naming, function design, comments, formatting, and error handling to reduce bugs and improve collaboration.

Core Features & Use Cases

  • Meaningful naming, small focused functions, clear comments, consistent formatting, and robust error handling.
  • Use cases include writing new code, reviewing pull requests, and refactoring legacy code to improve quality and maintainability.

Quick Start

Refactor a sample function to improve variable naming and extract a small helper to demonstrate the principle.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I refactor legacy code to improve readability and maintainability?

To refactor legacy code for readability, you apply clean-code principles to transform messy code into maintainable software. This involves improving meaningful naming, extracting small focused functions, and ensuring robust error handling to reduce bugs and improve collaboration.

What are the best practices for writing clean code during a pull request review?

Best practices for clean code in a pull request review include checking for meaningful naming, small focused functions, clear comments, minimal side effects, consistent formatting, and robust error handling. This ensures the software remains readable and maintainable across the project.

Can I use clean-code principles for writing new software projects?

Yes, you can use clean-code principles when writing new software projects. Applying guidelines for meaningful naming, small functions, minimal side effects, and consistent formatting during development transforms code that merely works into readable, maintainable software from the start.

How do I fix code that is hard to read and has too many side effects?

To fix code that is hard to read with too many side effects, apply clean-code principles by extracting small focused functions and ensuring minimal side effects. This refactoring process improves naming, structure, and testing discipline to produce readable, maintainable software.

When do I need to apply clean code guidelines to my software?

You need to apply clean code guidelines to your software during writing, reviewing, or refactoring across software projects. This process improves naming, structure, and testing discipline to transform code that merely works into readable, maintainable software that reduces bugs.