Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

node — Claude Code skill: what it does, how to install

Gives an agent Node.js and TypeScript guidance, from running .ts files directly to streams, tests and graceful shutdown.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mcollina/skills --skill node -a claude-code
Open on GitHub

What node does

This skill guides Node.js and TypeScript work across tsconfig.json, package.json, modules, async code, errors, logging, caching, profiling and tests. It covers type stripping in Node.js 22.6+ for running TypeScript directly, including node greet.ts.

Type stripping requires import type, .ts import extensions and const objects in place of enums. Namespaces and parameter properties need to be avoided, so existing code deserves a check before switching to direct TypeScript execution. For CSV and ETL work, the skill calls for await pipeline(...), an async transform and backpressure handling. It also covers open handles and teardown order when node --test hangs.

What it helps with

  • configure TypeScript execution without a build step
  • fix imports for type stripping
  • diagnose a hanging node --test run
  • handle backpressure in a CSV stream
  • set up graceful Node.js shutdown

Example prompts for the agent

  • Set up this TypeScript project to run `.ts` files with `node` without a build step.
  • Find why `node --test` does not exit.
  • Rewrite this CSV processing flow with `await pipeline(...)` and `async function*`.

How to install node

1Skills CLI (Vercel)

npx skills add mcollina/skills --skill node -a claude-code

2Manually: put the files in place

~/.claude/skills/node/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/node/

From the same set2

The whole set →

Similar

pi-agent K-Dense-AI Helps you install and configure Pi, then build extensions, integrations, and terminal UI components around it. Claude Code CX Codex Cursor +1 1,200installs wordpress-penetration-testing zebbern This skill audits WordPress installations for common vulnerabilities and REST API permission issues in plugins. Designed for authorized security assessments. Claude Code CX Codex Cursor +1 1,100installs sign-in-with-google-web official google Guides Google Identity Services setup across web projects. It implements secure token handling and IETF authentication patterns. Claude Code Gemini CLI CX Codex 743installs salesforce-flow-design official github Reviews Salesforce Flow architecture, type selection, bulk safety, and fault handling. Use it before designing, reviewing, or activating a Flow. GitHub Copilot 839installs text-to-speech elevenlabs Turns text into speech with ElevenLabs. Use it for voiceovers, audio output, or speech features in an application. Claude Code CX Codex Cursor +1 16,600installs api-design-principles sickn33 Skill for designing REST and GraphQL APIs from scratch: architecture, versioning, error handling, and authentication that make APIs pleasant for other developers to consume. Claude Code CX Codex Cursor +1 1,000installs mcp-builder official anthropics This skill walks through building an MCP server in TypeScript or Python, from reading the protocol spec to writing tests and evaluation questions. Claude Code Claude.ai 130,949installs google-agents-cli-adk-code official Google A reference skill for building ADK agents with tools, callbacks, state, and workflows. Use it when an agent project needs concrete API patterns or code examples. Claude Code CX Codex Cursor +1 511,400installs

Questions about node

How do I install node in Claude Code?

Run npx skills add mcollina/skills --skill node -a claude-code, then run npx skills add mcollina/skills --skill node -a claude-code again. The skill file is at ~/.claude/skills/node/SKILL.md.

What does node do?

The skill supplies Node.js and TypeScript patterns for type stripping, error handling, streams, modules, tests, caching and profiling.

What is required for TypeScript type stripping?

This approach targets Node.js 22.6+. Use import type, include .ts in imports, replace enums with const objects, and avoid namespaces and parameter properties.

Source text

SKILL.md · MIT
---
name: node
description: Provides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules, testing, performance, caching, logging, and more. Use when setting up Node.js projects with native TypeScript support, configuring type stripping (--experimental-strip-types), writing Node 22+ TypeScript without a build step, or when the user mentions 'native TypeScript in Node', 'strip types', 'Node 22 TypeScript', '.ts files without compilation', 'ts-node alternative', or needs guidance on error handling, graceful shutdown, flaky tests, profiling, or environment configuration in Node.js. Helps configure tsconfig.json for type stripping, set up package.json scripts, handle module resolution and import extensions, and apply robust patterns across the full Node.js stack.
metadata:
  tags: node, nodejs, javascript, typescript, type-stripping, backend, server
---

## When to use

Use this skill whenever you are dealing with Node.js code to obtain domain-specific knowledge for building robust, performant, and maintainable Node.js applications.

## TypeScript with Type Stripping

When writing TypeScript for Node.js, use **type stripping** (Node.js 22.6+) instead of build tools like ts-node or tsx. Type stripping runs TypeScript directly by removing type annotations at runtime without transpilation.

Key requirements for type stripping compatibility:
- Use `import type` for type-only imports
- Use const objects instead of enums
- Avoid namespaces and parameter properties
- Use `.ts` extensions in imports

**Minimal example** — a valid type-stripped TypeScript file:

```ts
// greet.ts
import type { IncomingMessage } from 'node:http';

const greet = (name: string): string => `Hello, ${name}!`;
console.log(greet('world'));
```

Run directly with:
```bash
node greet.ts
```

See [rules/typescript.md](rules/typescript.md) for complete configuration and examples.

## Common Workflows

For multi-step processes, follow these high-level sequences before consulting the relevant rule file:

**Graceful shutdown**: Register signal handlers (SIGTERM/SIGINT) → stop accepting new work → drain in-flight requests → close external connections (DB, cache) → exit with appropriate code. See [rules/graceful-shutdown.md](rules/graceful-shutdown.md).

**Error handling**: Define a shared error base class → classify errors (operational vs programmer) → add async boundary handlers (`process.on('unhandledRejection')`) → propagate typed errors through the call stack → log with context before responding or crashing. See [rules/error-handling.md](rules/error-handling.md).

**Diagnosing flaky tests**: Isolate the test with `--test-only` → check for shared state or timer dependencies → inspect async teardown order → add retry logic as a temporary diagnostic step → fix root cause. See [rules/flaky-tests.md](rules/flaky-tests.md).

**Diagnosing stuck processes/tests** (`node --test` hangs, "process did not exit", CI timeout, open handles): isolate file/test → run with explicit timeout/reporter → inspect handles via `why-is-node-running` (`SIGUSR1`) → patch deterministic teardown in resource-creation scope → rerun isolated + full suite until stable. See [rules/stuck-processes-and-tests.md](rules/stuck-processes-and-tests.md).

**Profiling a slow path**: Reproduce under realistic load → capture a CPU profile with `--cpu-prof` → identify hot functions → check for stream backpressure or unnecessary serialisation → validate improvement with a benchmark. See [rules/profiling.md](rules/profiling.md) and [rules/performance.md](rules/performance.md).

## High-priority activation checklist (streams + caching)

When the task mentions **CSV**, **ETL**, **ingestion pipelines**, **large file processing**, **backpressure**, **repeated lookups**, or **deduplicating concurrent async calls**, explicitly apply this checklist:

1. Use `await pipeline(...)` from `node:stream/promises` (prefer this over chained `.pipe()` in guidance/code).
2. Include at least one explicit `async function*` transform when data is being transformed in-stream.
3. Choose a cache strategy when repeated work appears:
   - `lru-cache` for bounded in-memory reuse in a single process.
   - `async-cache-dedupe` for async request deduplication / stale-while-revalidate behavior.
4. Show where backpressure is handled (implicitly via `pipeline()` or explicitly via `drain`).

### Integrated example pattern (CSV/ETL)

For CSV/ETL-style prompts, prefer an answer structure like:
- `createReadStream(input)`
- `async function*` parser/transform
- optional cached enrichment lookup (`async-cache-dedupe` or `lru-cache`)
- `await pipeline(...)` to a writable destination

Link relevant rules directly in explanations so models can retrieve details:
- [rules/streams.md](rules/streams.md)
- [rules/caching.md](rules/caching.md)

## How to use

Read individual rule files for detailed explanations and code examples:

- [rules/error-handling.md](rules/error-handling.md) - Error handling patterns in Node.js
- [rules/async-patterns.md](rules/async-patterns.md) - Async/await and Promise patterns
- [rules/streams.md](rules/streams.md) - Working with Node.js streams
- [rules/modules.md](rules/modules.md) - ES Modules and CommonJS patterns
- [rules/testing.md](rules/testing.md) - Testing strategies for Node.js applications
- [rules/flaky-tests.md](rules/flaky-tests.md) - Identifying and diagnosing flaky tests with node:test
- [rules/stuck-processes-and-tests.md](rules/stuck-processes-and-tests.md) - Diagnosing processes that do not exit and tests that get stuck
- [rules/node-modules-exploration.md](rules/node-modules-exploration.md) - Navigating and analyzing node_modules directories
- [rules/performance.md](rules/performance.md) - Performance optimization techniques
- [rules/caching.md](rules/caching.md) - Caching patterns and libraries
- [rules/profiling.md](rules/profiling.md) - Profiling and benchmarking tools
- [rules/logging.md](rules/logging.md) - Logging and debugging patterns
- [rules/environment.md](rules/environment.md) - Environment configuration and secrets management
- [rules/graceful-shutdown.md](rules/graceful-shutdown.md) - Graceful shutdown and signal handling
- [rules/typescript.md](rules/typescript.md) - TypeScript configuration and type stripping in Node.js

© mcollina · MIT · mcollina/skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor