typescript-rimraf-node-setup

Standardize cross-platform cleanup scripts in Node.js and TypeScript projects using rimraf.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/cromesdk/ai-skills --skill typescript-rimraf-node-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-rimraf-node-setup
Source: https://github.com/cromesdk/ai-skills/tree/main/skills/typescript/typescript-rimraf-node-setup
Command: npx skills add https://github.com/cromesdk/ai-skills --skill typescript-rimraf-node-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures your Node.js and TypeScript projects have reliable, cross-platform cleanup scripts, preventing issues with rm -rf and Windows delete commands.

Core Features & Use Cases

  • Standardize Cleanup: Replaces shell-specific delete commands with the deterministic rimraf utility.
  • Automate Artifact Removal: Cleans up build outputs (dist, build), caches (.cache), and temporary files (*.tsbuildinfo).
  • Use Case: When you need to ensure your CI/CD pipeline consistently cleans up build artifacts on both Windows and Unix systems before a new build.

Quick Start

Use the typescript-rimraf-node-setup skill to add a cross-platform clean script for dist and coverage to your package.json.

Frequently Asked Questions about typescript-rimraf-node-setup

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

FAQPage Schema
How do I clean build artifacts in Node.js across Windows and Unix environments?

Rimraf provides deterministic cross-platform cleanup by replacing shell-specific delete commands in package.json scripts. It ensures consistent removal of build outputs, caches, and temporary files across Windows and Unix environments without shell compatibility issues.

Why does rm -rf fail in my npm scripts on Windows?

Standardizing cleanup with rimraf replaces shell-specific Unix commands like rm -rf that fail on Windows. Adding it as a dev dependency ensures your Node.js package.json scripts remove build artifacts and caches consistently across Windows and Unix environments.

How do I add a clean script to package.json for TypeScript build outputs?

To clean TypeScript build outputs, install rimraf as a dev dependency and update package.json scripts to remove directories like dist and coverage. This standardizes cross-platform artifact removal, ensuring deterministic cleanup of build outputs and caches before new builds.

Can I use rimraf to delete TypeScript temporary files like tsbuildinfo?

Yes, rimraf automates removal of TypeScript temporary files like *.tsbuildinfo, .cache, and build outputs. Configuring it in package.json scripts ensures deterministic, cross-platform cleanup of these artifacts across both Windows and Unix environments.