import-conventions

Enforce explicit named imports and ordered import layers in TypeScript monorepos.

6|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/crmagz/cdk-constructs-library --skill import-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: import-conventions
Source: https://github.com/crmagz/cdk-constructs-library/tree/main/.claude/skills/import-conventions
Command: npx skills add https://github.com/crmagz/cdk-constructs-library --skill import-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide enforces consistent and explicit import practices across a codebase, reducing confusion and errors caused by ambiguous or wildcard imports.

Core Features & Use Cases

  • Explicit Named Imports: always import named symbols and never use wildcard imports to improve clarity and tree-shakability.
  • Import Order: structure imports from Node built-ins, external dependencies, internal packages, and local modules to maintain consistency.
  • Workspace Monorepo Hygiene: supports monorepo setups with workspace packages, ensuring consistent imports across packages.

Quick Start

Organize your TypeScript imports using the explicit-named imports rule and the defined import order.

Frequently Asked Questions about import-conventions

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

FAQPage Schema
How do I enforce consistent import ordering in a TypeScript monorepo?

Standardize TypeScript monorepo imports by enforcing a multi-layer import order: Node built-ins first, then external dependencies, internal packages, and local modules. This consistent import ordering improves codebase readability and reduces errors across workspace packages.

Why should I use explicit named imports instead of wildcard imports?

Explicit named imports improve code clarity and ensure better tree-shakability by specifying exact symbols. Forbidding wildcard imports prevents ambiguous module loading and reduces potential bundle size in JavaScript and TypeScript projects.

What is the best way to organize internal and external module imports?

The best way to organize module imports is structuring them by source: Node built-ins, external dependencies, internal workspace packages, and local modules. This explicit import order maintains consistency and clarifies dependency hierarchies.

Does this import convention guide work with monorepo workspace packages?

Yes, these import conventions support monorepo setups with workspace packages. They ensure consistent explicit named imports and standardized ordering across all internal packages within the TypeScript workspace environment.

How do I standardize coding standards for module imports across a codebase?

Standardize module imports by applying rules that forbid wildcard imports and mandate a strict import order from Node built-ins to local modules. This enforces coding standards and improves readability across the entire codebase.