cleanup-patterns

Remove debug code, unused imports, and commented-out code from codebases.

2|2|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/srulyt/srulys-agent-packs --skill cleanup-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cleanup-patterns
Source: https://github.com/srulyt/srulys-agent-packs/tree/main/agent-packs/agentic-developer/.roo/skills/cleanup-patterns
Command: npx skills add https://github.com/srulyt/srulys-agent-packs --skill cleanup-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of cleaning up AI-generated code artifacts, debug statements, and other non-production ready code, ensuring a cleaner codebase before commits or PRs.

Core Features & Use Cases

  • Debug Code Removal: Identifies and removes common debug logging patterns across various languages.
  • Import Cleanup: Helps in identifying and removing unused imports.
  • Code Hygiene: Manages commented-out code and converts TODOs to tech debt.
  • Use Case: After an AI agent has generated a significant portion of code, use this Skill to meticulously remove any console.log statements, commented-out code blocks, and unused imports, preparing the code for a pull request.

Quick Start

Use the cleanup-patterns skill to remove all debug code and unused imports from the modified files.

Frequently Asked Questions about cleanup-patterns

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

FAQPage Schema
How do I remove console.log statements and unused imports from AI-generated code?

To remove console.log statements and unused imports from AI-generated code, apply automated cleanup patterns that identify and delete debug logging, commented-out code blocks, and non-production artifacts. This ensures code hygiene and adherence to project scope before pull request submission.

What is the best way to clean up AI artifacts before submitting a pull request?

The best way to clean up AI artifacts before a pull request is to systematically scan the modified files to identify and remove debug code, unused imports, and scope violations. Converting leftover TODOs into tracked tech debt ensures a production-ready codebase.

How does code refactoring handle commented-out code and AI-style patterns?

Code refactoring handles commented-out code and AI-style patterns by systematically identifying these non-production blocks across the codebase and removing them. This process eliminates scope violations and ensures the final code adheres strictly to project hygiene standards.

Can I use cleanup patterns to identify scope violations in my codebase?

Yes, you can use cleanup patterns to identify scope violations in your codebase. The procedures specifically target non-production ready code, ensuring that any AI-generated artifacts, debug statements, or out-of-scope implementations are detected and removed prior to commit.

Why does AI-generated code require specific debug code removal procedures?

AI-generated code requires specific debug code removal procedures because AI agents frequently leave behind console.log statements, unused imports, and commented-out code blocks. Targeted cleanup patterns meticulously remove these AI artifacts to maintain code hygiene and prepare the files for review.

What are the limitations of using automated code hygiene patterns for refactoring?

A limitation of using automated code hygiene patterns for refactoring is that they focus specifically on removing AI artifacts, debug statements, and scope violations. Developers must still manually verify the logical correctness of the remaining code after the automated cleanup process executes.