Skip to content
Back to skills

Organize Imports

ASecurity

Sorts, groups and prunes imports in your changed files to match the project convention, then proves nothing broke.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
ai-agentsgogit

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill organize-imports --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Organize Imports?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Organize Imports
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-organize-imports/badge)](https://www.skillsdirectory.com/skills/workspace-templates-organize-imports)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: organize-imports
description: Sorts, groups and prunes imports in your changed files to match the project convention, then proves nothing broke.
argument-hint: "[optional folder or extra rule]"
user-invocable: true
disable-model-invocation: true
---

Organize the imports in the changed files. Scope or extra rules: $ARGUMENTS

1. Run `git diff --name-only HEAD` to get the files. Limit yourself to source files in that list.
2. Find the project's convention: look for an ESLint import/order rule, isort or ruff config, goimports, a Prettier plugin, or `.editorconfig`. If a tool exists, run it in fix mode on those files only. Otherwise infer the order from three untouched files.
3. Typical order: standard library, third-party, project aliases, relative paths, with a blank line between groups and alphabetical inside each.
4. Remove imports that nothing uses. Check for side-effect imports and type-only imports before deleting.
5. Never reorder imports whose order matters, such as polyfills or CSS that must load first. Leave a comment-marked block alone.

Run the type checker or build and the tests. Show `git diff --stat` and mention any file you skipped and why. Do not commit.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.