Keep your coding agent on modern Node.js. An Agent Skill plus a zero-config, version-aware scanner that flags end-of-life Node versions, deprecated and removed Node APIs, and npm packages that Node now ships built in.
Versión en español más abajo.
Coding agents learned Node from years of old code. So they still add node-fetch, uuid and dotenv, write new Buffer(), call crypto.createCipher() (removed in Node 22), use __dirname in ES modules and put node:18 in Dockerfiles. Node 18 and Node 20 are now end-of-life. Modern Web Guidance handles this for the browser. modern-node does it for the Node.js runtime.
legacy-app · target Node 18.0.0 (engines.node) · 2 source files
error Node 18 (node:18-alpine) reached end-of-life on 2025-04-30 and gets no security fixes [runtime/eol] Dockerfile:1
fix: Move to Node 26 (active LTS)
error crypto.createCipher()/createDecipher() were removed in Node 22 (DEP0106) [api/crypto-create-cipher] src/old.cjs:6
fix: Use crypto.createCipheriv()/createDecipheriv() with a random IV
error __dirname doesn't exist in ES modules [esm/dirname-undefined] src/index.js:12
fix: Use import.meta.dirname (Node ≥20.11)
warning uuid can be replaced by crypto.randomUUID (Node ≥16.7.0) [deps/native] package.json
warning node-fetch can be replaced by fetch (Node ≥18.0.0) or npm:ofetch or npm:ky [deps/native] package.json
info nodemon (scripts: dev) can be replaced by the built-in `node --watch` (stable since Node 22) — after upgrading to Node ≥22.0.0
✖ 10 error(s), 10 warning(s), 11 suggestion(s)
npx skills add folgmateo/modern-nodeOr copy skills/modern-node into your agent's skills folder (.cursor/skills/, .claude/skills/, .agents/skills/, …).
When the skill is active, the agent checks your target Node version first, runs the scanner, and uses built-ins instead of adding dependencies. It also ships a cheatsheet of modern defaults with the Node version each one needs.
npx -y github:folgmateo/modern-node # scan the current project
npx -y github:folgmateo/modern-node check axios uuid # before adding a dependency
npx -y github:folgmateo/modern-node status # which Node versions are LTS / EOL| Option | |
|---|---|
--target <ver> |
Node version to assume (default: the minimum of engines.node) |
--ignore <path> |
Skip folders (repeatable or comma-separated) |
--no-source |
Only check runtime, dependencies and tooling |
--quiet |
Hide suggestions (info) |
--strict |
Exit 1 on warnings too |
--json |
Machine-readable output for agents and scripts |
Exit codes: 0 ok · 1 errors (or warnings with --strict) · 2 usage error.
- uses: actions/checkout@v4
- uses: folgmateo/modern-node@main
with:
path: "." # optional
strict: "false" # optional
ignore: "fixtures" # optionalFindings show up as annotations on the pull request.
Version-aware. It reads the minimum Node version from engines.node and only suggests APIs that version has. With >=18 it won't suggest util.styleText (20.12+). With --target 24 it will.
| Area | Examples |
|---|---|
| Runtime | EOL or soon-EOL Node in engines.node, .nvmrc, .node-version, .tool-versions, Dockerfile and CI node-version; odd-numbered releases; versions that disagree across files; missing engines.node |
| Dependencies | Every dependency is checked against the community-maintained e18e module-replacements manifests (native, micro-utilities, preferred), filtered by your target Node version |
| Tooling | nodemon → node --watch, ts-node → native type stripping, dotenv CLI → --env-file, mocha/ava/tap → node --test, missing "type" |
| Source | new Buffer(), crypto.createCipher(), util.is*(), fs.exists(), rmdir({recursive}), url.parse(), process.binding(), punycode, domain, querystring, .substr(), require/__dirname in ESM, the fileURLToPath(import.meta.url) dance, JSON clone, hand-rolled sleep, missing node: prefix |
Comments and string literals are ignored. node_modules, dist, build and similar folders are skipped. Release dates come from the official nodejs/Release schedule, bundled so the tool works offline.
import { scan, describe } from "modern-node";
const report = scan(".", { target: "22" });
describe("uuid"); // → { usable: [{ id: "crypto.randomUUID", nodeMin: "16.7.0", ... }] }npm install
npm test # node:test, Node 22+
npm run self-check # the scanner checks itselfCredits: dependency data from e18e/module-replacements (MIT), the community effort to clean up the JS ecosystem.
Mantené a tu agente de IA en Node.js moderno. Es una Agent Skill más un escáner que entiende de versiones. Detecta versiones de Node sin soporte (Node 18 y 20 ya son EOL), APIs deprecadas o eliminadas (new Buffer(), crypto.createCipher(), util.isArray()…) y dependencias que Node ya trae incorporadas (node-fetch → fetch, uuid → crypto.randomUUID(), dotenv → --env-file, nodemon → node --watch).
npx skills add folgmateo/modern-node # instalar la skill en tu agente
npx -y github:folgmateo/modern-node # escanear tu proyecto
npx -y github:folgmateo/modern-node check axios uuid # antes de agregar una dependenciaSolo sugiere lo que tu versión de Node (engines.node) soporta, funciona sin conexión y trae una GitHub Action para revisar PRs.
MIT © 2026 Mateo Folgar