import-style
БесплатноБез исполняемых скриптовНе проверенRules for ordering, grouping, and styling import statements in klex. Use when writing, modifying, or reviewing any import declaration.
от stagewise-io★ 44 звезды на GitHubОб этом скилле
Import Style
Apply to every TypeScript file in klex. No exceptions.
Order
- Side-effect imports — first, visibly isolated (one blank line after).
- Node built-ins —
node:crypto,node:path, etc. - External packages —
ai,hono,zod. Excludes@stagewise/**workspace packages. - Workspace packages —
@stagewise/logger,@stagewise/config. - Internal aliases —
@/config,@/model-provider,@/session/types. - Relative modules —
./server,./utils/types.
One blank line between groups. Sort module paths alphabetically within each group.
import './instrumentation';
import { randomUUID } from 'node:crypto';
import { type ServerType, serve } from '@hono/node-server';
import type { ModuleLogger, RootLogger } from '@stagewise/logger';
import type { Config } from '@/config';
import { createChatSession } from '@/session/chat';
import { createAdminApp } from './server';
Style
- One import declaration per source module. Biome merges duplicates automatically.
import typefor entirely type-only modules:import type { Config } from '@/config'.- Inline
typefor mixed value/type imports:import { type ServerType, serve } from '@hono/node-server'. - Never use a value import for a symbol used only as a type. Use
import typeor inlinetype. - Never manually align imports with spaces. Let the formatter handle spacing.
barrel imports
- Cross-module: import through the barrel —
@/config,@/model-provider. - Intra-module: import internal dependencies directly —
./server,./utils/types. Never import through your own module's barrel. - No import comments or subsection labels. Blank lines between groups communicate structure.
tooling — enforced by Biome
Biome config in biome.jsonc enforces all rules above automatically:
useImportTyperule (levelerror, styleauto) — forcesimport typefor type-only modules, inlinetypefor mixed imports.organizeImportsassist action — enforces group ordering, blank line separators, alphabetical sorting, and duplicate merging. Groups configured: bare → Node/Bun → external (excl@stagewise/**) →@stagewise/**→:ALIAS:→:PATH:.sortBareImports: true— side-effect imports are sorted. If side-effect order matters at runtime, keep filenames sortable or manage that section manually.
Run pnpm check:fix (→ biome check . --write) to auto-fix. CI runs biome ci . to verify without rewriting.
Do not add a global { "type": true } group. That would create a separate type-import section instead of keeping imports grouped by dependency layer.
Установить import-style в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл import-style?
Rules for ordering, grouping, and styling import statements in klex. Use when writing, modifying, or reviewing any import declaration.
Как установить скилл import-style?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл import-style запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic