clean-code

Automate rule-based code cleanup within pre-commit workflows.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Nathanto-ai/liza-private --skill clean-code-nathanto-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/Nathanto-ai/liza-private/tree/main/skills/clean-code
Command: npx skills add https://github.com/Nathanto-ai/liza-private --skill clean-code-nathanto-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clean Code refactoring tasks are automated and guarded to improve readability and maintainability without changing program behavior, integrated into pre-commit workflows.

Core Features & Use Cases

  • Frontmatter-driven discovery and metadata for discovery and tooling alignment
  • Deterministic pre-flight checks including language detection, test and coverage gating, and batch validation
  • Principle-driven transformations guided by software-architecture best practices
  • Safe extraction/inline decisions with propagation and rollback safeguards
  • Non-destructive refactoring with snapshot-based rollback and batch-level validation

Quick Start

Initiate a small, well-scoped clean-code refactor and run the safe pre-commit workflow

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I automate safe code refactoring in a pre-commit workflow?

Automated safe code refactoring in a pre-commit workflow applies deterministic, principle-driven transformations to improve readability without changing behavior. It uses language-aware patterns, test gating, and batch validation to guarantee non-destructive changes.

What is safe batch-based refactoring and how does it prevent breaking changes?

Safe batch-based refactoring processes code changes in guarded batches to prevent breaking program behavior. It enforces pre-flight checks, test and coverage gating, and snapshot-based rollback safeguards before applying any deterministic transformations.

Does this clean-code refactoring approach work with both Python and Go?

Yes, clean-code refactoring works with both Python and Go through language-aware patterns. It applies deterministic transformations across multiple languages by using frontmatter-defined discovery to guide architecture best practices for each specific language.

How do I run static analysis and code cleanup without altering program behavior?

Static analysis and code cleanup run without altering behavior by applying non-destructive refactoring guarded by pre-flight checks. The workflow validates tests and coverage before applying deterministic transformations, ensuring readability improvements do not change execution.

What are the limitations of automating refactoring tasks during pre-commit?

Limitations of automating refactoring during pre-commit include strict dependencies on passing pre-flight checks, test gating, and coverage validation. If these deterministic guardrails fail, the workflow halts changes to prevent unsafe extraction or inline decisions.