import-ordering

Reorder TypeScript and JavaScript imports into builtin, external, internal, parent, sibling, and type groups.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/gil00pita/lanify --skill import-ordering-gil00pita
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: import-ordering
Source: https://github.com/gil00pita/lanify/tree/main/.agents/skills/import-ordering
Command: npx skills add https://github.com/gil00pita/lanify --skill import-ordering-gil00pita

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Fixes import ordering issues to improve readability, consistency, and maintainability across TypeScript/JavaScript files.

Core Features & Use Cases

  • Auto-detects and groups imports into builtin, external, internal, parent, sibling, and index/type categories.
  • Reorders and formats imports to satisfy common standards (e.g., import-x/order) and enforces consistent alphabetization within groups.
  • Use Case: when refactoring a large TS project with scattered imports, run the fix script to normalize all files.

Quick Start

Run the fix-imports script on a TypeScript file to reorder its imports according to the defined groups.

Frequently Asked Questions about import-ordering

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

FAQPage Schema
How do I auto-fix and organize TypeScript imports for cleaner code?

To auto-fix import ordering in TypeScript, run a script that parses files, classifies imports into groups like external and internal, and rewrites them in place alphabetically. This enforces a consistent, readable structure.

What is the best way to refactor scattered imports across a large TypeScript project?

The best way to refactor scattered imports is to run an automated fix script that normalizes all TypeScript files. It reorders imports into defined groups such as builtin, parent, sibling, and index categories with deterministic results.

Does this import ordering tool support JavaScript files or only TypeScript?

Yes, this import ordering tool supports both JavaScript and TypeScript files. It uses a TypeScript-aware parser to classify and reorder imports, ensuring code readability and maintainability across both file types.

How are imports grouped when enforcing a consistent import structure?

Imports are grouped into builtin, external, internal, parent, sibling, index, and type categories. The fixer reorders and formats imports to satisfy common standards while enforcing consistent alphabetization within each group.

Will auto-fixing import order change the rest of my file's code?

No, auto-fixing import order will not change your file's non-import content. The fixer rewrites imports in place to apply consistent ordering while strictly preserving the remaining code structure.