---
name: "tsx-zero-config-typescript-execute"
description: "Execute modern TypeScript and ESM files directly with Node.js without pre-compilation."
metadata:
  author: "Hiroki Osame"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "run typescript with tsx"
  - "tsx watch server.ts"
  - "execute ts without compile"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# tsx Zero-Config Node.js TypeScript Execution Engine

Runs TypeScript files using tsx: running scripts directly (tsx script.ts), watch mode with auto-reload (tsx watch server.ts), Node.js loader integration (--import tsx), and resolving tsconfig paths seamlessly.

## When to Invoke
Invoke this skill whenever you need to:
- run typescript with tsx
- tsx watch server.ts
- execute ts without compile

## Execution SOP & Rules
1. Install tsx globally or as a project devDependency: pnpm add -D tsx.
2. Execute script: npx tsx src/index.ts (handles modern ESM and top-level await out of the box).
3. Run in watch mode: npx tsx watch src/server.ts to automatically restart on file edits.
4. Pass to Node 20+: node --import tsx src/index.ts.

## 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.
