import-formatter
Skill2 starsChanged 4 months agoMITView on GitHub
Format and organize import statements in code files. Use when imports are messy, unordered, or need to follow project conventions. Automatically groups imports by type (standard library, third-party, local) and sorts them alphabetically.
In this repository40 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-checkerSkill
- accessibility-design-checkerSkill
- agent-capability-assessorSkill
- agent-creatorSkill
- api-implementerSkill
- architecture-reviewerSkill
- best-practices-checkerSkill
- bug-detectorSkill
- changelog-generatorSkill
- code-documentationSkill
- code-style-analyzerSkill
- color-system-designerSkill
- component-designerSkill
- component-implementerSkill
- config-setupSkill
- conflict-resolverSkill
- convert-to-extensionSkill
- database-implementerSkill
- design-systemSkill
- escalation-handlerSkill
- git-commit-helperSkill
- idea-refinerSkill
- implementation-plannerSkill
- interaction-designerSkill
- layout-designerSkill
- performance-analyzerSkill
- quality-gate-managerSkill
- requirement-analyzerSkill
- resource-allocation-optimizerSkill
- responsive-design-plannerSkill
- security-scannerSkill
- spacing-system-designerSkill
- specification-checkerSkill
- task-to-agent-matcherSkill
- team-health-checkerSkill
- technical-spec-writerSkill
- test-writerSkill
- typography-designerSkill
- utility-implementerSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Add blank lines between groups (standard library, third-party, local)
- Distinctive: line 20
Follow language-specific conventions (e.g., Python PEP 8, JavaScript ES6 modules)
- Distinctive: line 70
Use absolute imports when possible
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Import Formatter Skill
Instructions
- Identify all import statements in the file
- Group imports into three categories:
- Standard library imports (Python stdlib, Node.js built-ins, etc.)
- Third-party imports (from npm, pip, etc.)
- Local/project imports (relative or absolute project paths)
- Sort each group alphabetically
- Add blank lines between groups (standard library, third-party, local)
- Remove duplicate imports
- Consolidate imports from the same module when possible
- Preserve import aliases and type-only imports
- Follow language-specific conventions (e.g., Python PEP 8, JavaScript ES6 modules)
Examples
Input (Python):
from typing import List, Dict
import os
from myapp.models import User
import requests
from typing import Optional
from myapp.utils import helperOutput:
import os
from typing import Dict, List, Optional
import requests
from myapp.models import User
from myapp.utils import helperInput (JavaScript/TypeScript):
import { useState } from 'react'
import './styles.css'
import axios from 'axios'
import { Component } from './Component'
import { useEffect } from 'react'Output:
import { useEffect, useState } from 'react'
import axios from 'axios'
import { Component } from './Component'
import './styles.css'Language-Specific Rules
Python:
- Standard library first
- Third-party packages second
- Local imports last
- Use absolute imports when possible
- Group by package, then alphabetically
JavaScript/TypeScript:
- External packages first (node_modules)
- Internal modules second
- Relative imports last
- Side-effect imports (CSS, etc.) at the end
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

