clean-imports

Remove unused import statements and organize remaining ones in source code files.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/silva2kand/silva-ide --skill clean-imports
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-imports
Source: https://github.com/silva2kand/silva-ide/tree/main/_cowork_os_pack/package/resources/skills/clean-imports
Command: npx skills add https://github.com/silva2kand/silva-ide --skill clean-imports

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the tedious and error-prone task of manually cleaning up unused, duplicated, or poorly organized import statements in source code files.

Core Features & Use Cases

  • Import Hygiene: Identify and remove unused import statements from files to improve code clarity.
  • Sorting and Grouping: Organize imports according to best practices, grouping similar modules together.
  • Use Case: Developers working on large codebases can quickly clean up import sections to enhance readability and maintainability, saving time during refactoring.

Quick Start

Use the clean-imports skill to tidy up the import statements in your source code file at the specified path.

Frequently Asked Questions about clean-imports

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

FAQPage Schema
How do I automate removing unused imports in my source code?

To automate removing unused imports in source code, you can use a script-based refactoring tool to parse your files and safely delete redundant statements. This improves code clarity and maintainability without tedious manual edits.

What is the best way to organize import statements during a large codebase refactoring?

The best way to organize import statements during refactoring is to automate their sorting and grouping according to best practices. This groups similar modules together, enhancing overall readability and maintainability across large projects.

Can I clean up duplicated or poorly organized imports without breaking my project?

Yes, you can clean up duplicated or poorly organized imports safely by running a script environment that parses and modifies code files carefully. It handles language specifics to ensure your project remains functional and error-free.

Does automated import cleanup work for different programming languages?

Automated import cleanup works for different programming languages by utilizing a script environment that safely parses and modifies code files while handling various language specifics. This ensures accurate refactoring across diverse source code.

Why should I remove unused import statements from my source code files?

You should remove unused import statements to improve code clarity and maintainability. Cleaning up unused, duplicated, or poorly organized imports reduces errors during refactoring and saves developers time managing large codebases.

What do I need to set up before running an automated import cleanup script?

Before running an automated import cleanup script, you need a script environment capable of parsing and modifying code files safely. Ensure your source code files are accessible at the specified path for the tool to process.