Use import type for type-only imports

SkillFiles & storage

type-only-imports is a skill that guides an AI agent through auditing import statements in TypeScript files. It helps make sure type-only dependencies are imported correctly so they don't end up bundled into production code. It is useful when setting up a new TypeScript project or investigating unexpected bundle inclusions.

Available today. Use it from your connected AI after setup.

Have a TypeScript project or files with import statements to review.

Then ask your AI: use the Use import type for type-only imports skill

What your AI can do with it

  • Audit import statements in TypeScript files
  • Set up imports correctly in a new TypeScript project
  • Investigate unexpected bundle inclusions from type-only dependencies
  • Help ensure types aren't bundled into production code

Getting started

  1. Have a TypeScript project or files with import statements to review.
  2. Add the type-only-imports skill to your agent's available skills.
  3. Ask the agent to audit your imports or investigate unexpected bundle inclusions.

What this skill tells your AI

The instructions your AI receives, as published by thedaviddias/front-end-checklist in skills/type-only-imports/SKILL.md and read by ahel’s review.

Regular imports cause the JavaScript runtime to evaluate and execute the imported module even when only a TypeScript type from that module is used. This can increase bundle size, introduce unintended side effects, and create circular dependency issues that are otherwise avoidable. Using import type makes the erased-at-runtime nature of type imports explicit and enables bundlers and the TypeScript compiler to handle them optimally.

Quick Reference

  • import type is erased entirely at compile time — no runtime module evaluation
  • Prevents accidentally importing a value when only a type is needed
  • Reduces circular dependency issues caused by type-only relationships
  • verbatimModuleSyntax in TypeScript 5 enforces this automatically

Check

Review the import statements in this TypeScript file and identify any imports where only types or interfaces are used. These should use import type instead of a regular import.

Fix

Convert the identified regular imports to import type where the imported binding is only used as a TypeScript type annotation and not as a runtime value.

Explain

Explain the difference between import and import type in TypeScript, why type-only imports should be declared explicitly, and how verbatimModuleSyntax enforces this at the compiler level.

Code Review

Inspect all import statements in this file. For each import, check whether the imported name appears only in type positions (annotations, generics, implements clauses) versus runtime positions (function calls, new, typeof). Flag any regular import that is used only as a type.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/en/rules/javascript/type-only-imports

Signals

GitHub stars
74k
Forks
7k
Last commit
Aug 2026

Questions

When should the agent use this skill?
When auditing import statements in TypeScript files, setting up a new TypeScript project, or investigating unexpected bundle inclusions from type-only dependencies.
What problem does it solve?
It helps ensure type-only dependencies are imported correctly so types aren't bundled into production code.
Advanced
Item type
skill
Key
type-only-imports
Source
github.com/thedaviddias/front-end-checklist