---
name: "jiti-runtime-typescript-require"
description: "Load TypeScript and ESM modules dynamically at runtime in CommonJS environments with jiti."
metadata:
  author: "UnJS"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "use jiti to load ts config"
  - "dynamic import typescript jiti"
  - "jiti cjs esm interop"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# jiti Fast Runtime TypeScript and ESM Loader

Integrates UnJS jiti: loading dynamic TypeScript configuration files (e.g. tailwind.config.ts, custom plugins), filesystem caching, ESM/CJS interop, and syntax transformation without global process hooks.

## When to Invoke
Invoke this skill whenever you need to:
- use jiti to load ts config
- dynamic import typescript jiti
- jiti cjs esm interop

## Execution SOP & Rules
1. Install package: pnpm add jiti.
2. Create loader: const jiti = require('jiti')(__filename); or import createJiti from 'jiti'.
3. Require TypeScript file directly: const config = jiti('./my-config.ts');.
4. Inspect loaded module and verify default export unwrapping works as expected.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
