nodejs

Node.js is a cross-platform JavaScript runtime environment. Node.js 22 (LTS 2025) brings native TypeScript support (experimental), a built-in Test Runner, and a native WebSocket client.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "nodejs" with this command: npx skills add g1joshi/agent-skills/g1joshi-agent-skills-nodejs

Node.js

Node.js is a cross-platform JavaScript runtime environment. Node.js 22 (LTS 2025) brings native TypeScript support (experimental), a built-in Test Runner, and a native WebSocket client.

When to Use

  • Real-time Apps: Chat, Gaming, Collaboration (WebSockets).

  • API Servers: High concurrency with non-blocking I/O.

  • Tooling: The foundation of modern frontend toolchains (Vite, Next.js).

Quick Start (Native Features)

// Native Test Runner (No Jest needed) import { test, assert } from "node:test";

test("synchronous passing test", (t) => { assert.strictEqual(1, 1); });

// Native WebSocket const ws = new WebSocket("ws://example.com/socket"); ws.onopen = () => console.log("Connected");

Core Concepts

Event Loop

Single-threaded, non-blocking I/O. Heavy CPU tasks block the loop (bad), but I/O tasks are offloaded to OS (good).

Streams

Process huge files piece-by-piece without loading them into memory.

Native APIs (2025)

Node now has fetch , test , watch , and .env support built-in. You need fewer dependencies than in 2020.

Best Practices (2025)

Do:

  • Use node:test : Drop Jest/Mocha for simple projects.

  • Use node --env-file : Drop dotenv dependency.

  • Use Async/Await: Callbacks are dead. Long live Promises.

Don't:

  • Don't block the Event Loop: Don't run Crypto or Image processing on the main thread. Use Worker Threads.

  • Don't use require : New projects should use ESM (import ).

References

  • Node.js Documentation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

typescript

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

python

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

template

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

mariadb

No summary provided by upstream source.

Repository SourceNeeds Review