node-modern

node-modern is a skill for Claude Code, Codex from WrongStack/WrongStack. It costs 52 tokens per session (1,921 once invoked), scanned A, original, MIT.

A set of coding practices for modern Node.js version 22 or later with TypeScript. Node.js is a runtime for running JavaScript and TypeScript outside a web browser.

In plain words
What is it for?
Use it when writing, reviewing, or refactoring Node.js TypeScript code, including imports, network requests, cancellation, streams, and async work.
Why use it?
It keeps server-side code consistent with current Node.js patterns and avoids outdated module, networking, and asynchronous-code practices.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/wrongstack/wrongstack/node-modern
Any agent
npx skills add WrongStack/WrongStack --skill node-modern
Clone the repo
git clone --depth 1 https://github.com/WrongStack/WrongStack

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for node-modern

README.md
[![agentmods](https://agentmods.dev/badge/skills/wrongstack/wrongstack/node-modern.svg)](https://agentmods.dev/skills/wrongstack/wrongstack/node-modern)
Your own site
<a href="https://agentmods.dev/skills/wrongstack/wrongstack/node-modern"><img src="https://agentmods.dev/badge/skills/wrongstack/wrongstack/node-modern.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.01921
Opus 5 $0.00026 $0.00960
Sonnet 5 $0.00010 $0.00384
Haiku 4.5 $0.00005 $0.00192

Measured 2d ago against content hash a66c3f00d663, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

node-modern scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const res = await fetch(url, { signal: AbortSignal.timeout(5000) });

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

// ✅ Timeout on child_process
packages/core/skills/node-modern/SKILL.md · 222 lines

How it starts

The opening of the file, as written. The whole thing — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Modern Node.js (>= 22) — WrongStack

Overview

Node.js >= 22 patterns: ESM-only imports, native fetch with AbortSignal, Web Streams, and async patterns. WrongStack uses ESM throughout — no CommonJS in new code.

Rules

  1. Always use ESM (import with .js extension) — never require().
  2. Always use node: protocol for built-in modules.
  3. Always use AbortSignal.timeout() for long-running operations (fetch, spawn, setTimeout).
  4. Never use axios, node-fetch, or got — native fetch is sufficient.
  5. Always handle ENOENT on file reads — use try/catch or access first.
  6. Use Promise.allSettled when partial failure is acceptable.

Patterns

Do

// ✅ ESM with .js extension and node: protocol
import * as fs from 'node:fs/promises';
import { createServer } from 'node:http';
import { helper } from './helper.js';

// ✅ Native fetch with AbortSignal
const res = await fetch(url, { signal: AbortSignal.timeout(5000) });

// ✅ Atomic write
const tmp = `${target}.${randomBytes(4).toString('hex')}.tmp`;
await writeFile(tmp, data);
await rename(tmp, target);

// ✅ Parallel with allSettled
const results = await Promise.allSettled(tasks.map(t => t.run()));

Don't

// ❌ CommonJS
const fs = require('fs/promises');

// ❌ No AbortSignal — hangs forever on timeout
await fetch(url);

// ❌ axios in new code
const res = await axios.get(url);

// ❌ Swallowing AbortError silently
try {
  await fetch(url);
} catch (e) {
  // AbortError means timeout — log it or handle explicitly
}

Imports — always ESM

// ✅ Always — node: protocol for built-ins
import * as fs from 'node:fs/promises';
import { createServer } from 'node:http';
import { join, resolve } from 'node:path';

// ✅ ESM with .js extension in relative imports
import { helper } from './helper.js';
import { types } from '../types/index.js';

// ❌ Never — CommonJS
const fs = require('fs/promises');

fetch — native only

// ✅ Native fetch (Node 18+)
const res = await fetch('https://api.example.com/data', {
  signal: AbortSignal.timeout(5000),
});

// ❌ Never — axios, node-fetch, got
const res = await axios.get('https://api.example.com/data');

Read the full file on GitHub · 222 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 222 lines · 52 tokens per session scan A a66c3f00d663

Subscribe to this mod's changes

node-modern is a skill published in the GitHub repository WrongStack/WrongStack (284 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 1,921 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.