One-click install
npx skills add https://github.com/flesler/dotfiles --skill run-ts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-ts
Source: https://github.com/flesler/dotfiles/tree/main/home/.cursor/skills/run-ts
Command: npx skills add https://github.com/flesler/dotfiles --skill run-ts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the execution of TypeScript files by letting you run TS scripts directly via an npm script, reducing setup overhead and context switching.

Core Features & Use Cases

  • Run TypeScript files via the npm script ts
  • Create temporary scripts under bin/test/*.ts and execute them
  • Use npm run exec <code> for ad-hoc TypeScript code

Quick Start

Run TypeScript files quickly by executing npm run ts -- bin/*.ts.

Frequently Asked Questions about run-ts

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

FAQPage Schema
How do I run TypeScript files directly from an npm script?

You can run TypeScript files by executing npm run ts -- and passing the file path. This approach requires an npm script named ts that accepts file paths and ensures the process exits cleanly after executing the TypeScript code.

What's the best way to execute ad-hoc TypeScript code without full setup?

Executing ad-hoc TypeScript code is possible by using npm run exec followed by your code snippet. This streamlines development workflows by reducing setup overhead and allowing you to run temporary scripts instantly without complex configuration.

Can I run temporary TypeScript scripts under a specific directory?

Yes, you can create temporary TypeScript scripts under bin/test/*.ts and execute them directly. Running npm run ts -- bin/*.ts allows you to quickly test and validate these scripts within your development workflow.

Why use an npm script for TypeScript script execution instead of direct CLI commands?

Using an npm script for TypeScript script execution reduces context switching and centralizes configuration. It streamlines the process by letting you run TS scripts directly via npm run ts, ensuring consistent execution and clean process termination.

Does this TypeScript execution method require any additional dependencies?

No additional dependencies are required to use this execution method. The Skill operates independently by leveraging the existing npm script environment, allowing you to run TypeScript files instantly without installing extra dev-tooling packages.

How do I ensure my TypeScript process exits cleanly after execution?

To ensure your TypeScript process exits cleanly after execution, the npm script named ts must be configured to handle process termination properly. This guarantees that running ad-hoc scripts or files via npm run exec completes without leaving hanging processes.