.agents/skills/import-standards/SKILL.md
Rules for grouping, sorting, and formatting imports in React/TypeScript projects to ensure consistency and readability.
npx skillsauth add filippovskii09/quize-audit Import Ordering and Style StandardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Enforcement levels: MUST = mandatory · SHOULD = expected default · MAY = optional.
Imports MUST be organized in the following groups, separated by a single blank line between each group:
Group 1: External libraries (react, react-intl, etc.)
Group 2: Internal aliases (@src, @ui, @icons, @components)
Group 3: Relative imports (./types, ./utils, ../shared)
// ✅ Correct
import React from 'react';
import { useIntl } from 'react-intl';
import { Button } from '@ui';
import { APP_MODE } from '@src/constants';
import type { AppState } from '@src/types';
import type { MyComponentProps } from './types';
import { helperFn } from './utils';
type-only imports after value imports in the same group.// ✅
import { FormattedMessage, useIntl } from 'react-intl';
import React from 'react';
// ❌ — 'react' should come before 'react-intl' alphabetically
import { FormattedMessage } from 'react-intl';
import React from 'react';
import type (or inline { type X }) for any import used only as a TypeScript type.verbatimModuleSyntax is enabled.// ✅
import type { ButtonProps } from './types';
import { type ReactElement } from 'react';
// ❌
import { ButtonProps } from './types';
// ✅
import React from 'react';
import { useIntl } from 'react-intl';
import { Button } from '@ui';
import type { Props } from './types';
export const MyComponent = ...
// ❌ — blank line inside a group
import React from 'react';
import { useIntl } from 'react-intl';
noUnusedLocals enforces this at build time; ESLint enforces it in development.import React from 'react').// ✅ internal code
export const Button = ...
import { Button } from '@ui';
// ❌ internal code
export default Button;
import Button from '@ui/Button';
@src, @ui, @icons, @components) for all cross-directory imports../, ../) only within the same component folder.// ✅
import { useLocalStorage } from '@src/hooks';
import type { ButtonProps } from './types';
// ❌
import { useLocalStorage } from '../../hooks/useLocalStorage';
import './styles.css') in component files unless necessary.main.tsx or the top-level entry point only.development
Domain skill for React internationalization setup with react-intl, locale switching, and typed i18n context. Use when adding new translations or extending locale behavior.
development
Domain skill for reusable typed React hooks used in business logic. Use when extending or validating shared hooks like local storage and pagination.
development
Reusable Prettier formatting recipe for TypeScript and frontend repositories. Use when enforcing consistent code style and integrating format checks in hooks.
tools
Declarative pre-commit framework recipe for polyglot repositories with stage-aware hooks (pre-commit and pre-push). Use when repositories need non-Node quality gates or mixed toolchains.