code-cleanup

Review generated code against project goals and naming conventions.

2|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/ucirello/sgai --skill code-cleanup-ucirello
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-cleanup
Source: https://github.com/ucirello/sgai/tree/main/cmd/sgai/skel/.sgai/skills/code-cleanup
Command: npx skills add https://github.com/ucirello/sgai --skill code-cleanup-ucirello

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the tendency to leave code cluttered or less than optimally structured, even when functional, leading to technical debt and reduced maintainability.

Core Features & Use Cases

  • Code Review: Analyzes generated code for unnecessary elements, redundancy, and potential simplifications.
  • Goal Alignment: Cross-references code with GOAL.md to ensure it directly serves the project's objectives.
  • Maintainability Focus: Enforces best practices for naming and code structure to improve long-term readability.
  • Use Case: After an AI agent generates a complex function, this Skill reviews it, removes unused imports, renames ambiguous variables, and ensures the code is as concise and clear as possible before committing.

Quick Start

Review the recently generated code in the 'src/' directory to ensure it is clean and maintainable.

Frequently Asked Questions about code-cleanup

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

FAQPage Schema
How do I reduce technical debt in AI-generated code?

Reduce technical debt by reviewing generated code to question each component's purpose, removing unnecessary elements, and cross-referencing against project goals to ensure long-term maintainability.

What is the best way to refactor code for clarity and maintainability?

Refactor for clarity by enforcing naming conventions, eliminating redundancy, and simplifying structure. This ensures the code remains concise and directly aligned with the project's objectives.

How do I clean up unused imports and ambiguous variables in my project?

Clean up code by analyzing generated functions for unused imports and ambiguous variables, renaming them for clarity, and ensuring the final code is concise before committing.

Can I align newly generated code directly with my project goals?

Yes, you can align generated code with project goals by cross-referencing each component against a defined project goal document to verify it directly serves the intended objectives.

Does this code review process require any external dependencies?

No, this code review process requires no external dependencies. It operates internally to analyze code structure and enforce best practices without needing additional packages.

When should I run a code cleanup process on my source directory?

Run a code cleanup process after an AI agent generates complex functions in your source directory, ensuring the code is clean, maintainable, and ready before committing.