Skip to content
Back to skills

Nodejs Knowledge Patch

ASecurity

Node.js

  • 25 stars
  • 0 votes
  • 0 copies
  • 16 views
  • Added September 5, 2026
developmenttypescriptrustgoshellsqlnodenodejstestingapidatabase

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill nodejs-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nodejs Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nodejs Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-nodejs-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-nodejs-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nodejs-knowledge-patch
description: Node.js
version: "26.13.1"
license: MIT
metadata:
  author: Nevaberry
---


# Node.js Knowledge Patch

Use this skill when updating Node.js applications, tests, module loaders,
deployment configuration, or native integrations. Load the relevant reference
for detailed behavior, examples, and release-specific qualifications.

## Reference index

| Reference | Topics |
| --- | --- |
| [CLI, configuration, SEA, and releases](references/cli-config-sea-and-releases.md) | Startup flags, JSON configuration, environment files, watch mode, single-executable applications, release support, dependencies |
| [Modules and TypeScript](references/modules-and-typescript.md) | Module formats, package resolution, synchronous ES modules, hooks, type stripping, compile cache, WebAssembly, VM modules |
| [Processes, workers, and permissions](references/process-workers-and-permissions.md) | Permission grants, audits, revocation, child processes, worker transfers, async context |
| [Filesystem and streams](references/filesystem-and-streams.md) | Filesystem migrations, globbing, watches, VFS, buffers, classic streams, Web adapters, iterable streams |
| [Networking, HTTP, and TLS](references/networking-http-and-tls.md) | Proxies, HTTP lifecycle, HTTP/2 limits, TLS trust and identity, TCP, UDP, DNS, QUIC, HTTP/3 |
| [Cryptography and compression](references/crypto-and-compression.md) | Crypto migrations, key formats, signatures, key derivation, Web Crypto, FIPS, compression, ZIP |
| [SQLite](references/sqlite.md) | Connection defaults, authorization, statement binding and lifetime, tagged templates, sessions, backups |
| [Testing and assertions](references/testing-and-assertions.md) | Assertions, test discovery, isolation, coverage, mocks, snapshots, tags, reporters |
| [Diagnostics and performance](references/diagnostics-and-performance.md) | Channels, tracing, inspector, probes, CPU and heap profiles, memory limits, reports |
| [Native addons and builds](references/native-addons-and-builds.md) | Platform requirements, compiler options, addon ABI, Node-API, embedding, experimental FFI |
| [Runtime and web platform](references/runtime-and-web-platform.md) | Legacy APIs, events, Web Storage, URLs, MIME, Blobs, Temporal, collections, terminal output |

## Breaking changes and deprecations

### Startup flags and module loading

Remove `--no-experimental-fetch`, `--no-experimental-global-webcrypto`,
`--no-experimental-global-customevent`, and `--trace-atomics-wait` from startup
arguments and `NODE_OPTIONS`. Replace `--experimental-permission` with
`--permission`; the old alias was removed in 24.0.0.

Remove `--experimental-default-type`. Specify `"type": "module"` or
`"type": "commonjs"` in `package.json`, or use `.mjs` and `.cjs` for individual files.
In 26.0.0, extensionless files in a `"type": "module"` package no longer get a
CommonJS exception; give files needing CommonJS semantics a `.cjs` extension.

Node.js 26.0.0 removes `--experimental-transform-types`. Transpile TypeScript
that needs code generation, such as enums, before running it. Built-in stripping
of erasable types is stable in 25.2.0; `node app.ts` runs such an entry point.

`module.register()` is documentation-deprecated as `DEP0205` in 25.9.0 and emits
a runtime warning in 26.0.0. Use `module.registerHooks()` for synchronous hooks.
In 26.1.0, `require()` can throw `ERR_REQUIRE_ESM_RACE_CONDITION` while the needed
ES module is still loading; await its asynchronous import before requiring it.

### Filesystem, buffers, and streams

Use `dirent.parentPath`; `dirent.path` was removed in 24.0.0. `fs.truncate()`
and `fs.truncateSync()` require paths; use `fs.ftruncate()` or `fs.ftruncateSync()`
for file descriptors. Use `fs.rm(path, { recursive: true })` for recursive removal
and read access masks from `fs.constants`.

Close `FileHandle` instances explicitly with `await handle.close()`; cleanup on
garbage collection reached end of life in 25.0.0. Closing an open `fs.Dir` during
garbage collection is deprecated; use `dir.close()` or `dir.closeSync()`.
Migrate `SlowBuffer` to `Buffer.allocUnsafeSlow(size)`; its restored export was
removed again in 25.0.0. Use `Buffer.alloc(size)` when bytes must start at zero.

In 26.0.0, byte-mode `readable.read()` without a size can return one buffered
chunk even when more data is queued. Read repeatedly until it returns `null` to
drain available data. `readable.compose()` returns the composed duplex directly;
check `readableObjectMode` when downstream code depends on object mode.

### Crypto, HTTP, and legacy APIs

In 26.0.0, a GCM decipher created without `authTagLength` rejects short tags.
Set `authTagLength` to the tag size in bytes. Give SHAKE128 and SHAKE256 an
explicit output length to avoid their runtime deprecation. RSA-PSS key generation
uses `hashAlgorithm` and `mgf1HashAlgorithm` in place of `hash` and `mgf1Hash`.

Use `outputLength` for cSHAKE digest and KMAC operation parameters in 25.9.0;
KMAC key generation still uses `length`. Web Crypto PKCS#8 private-key imports
for ML-KEM and ML-DSA require seeds. PKCS#8 exports of those private keys encode
only the seed by default in 26.0.0; check that consuming systems accept it.

Use `response.writeHead()` instead of `writeHeader()`, which was removed in
26.0.0. HTTP/2 priority signaling is no longer supported in Node.js 24; remove
`Http2Stream.priority()` calls and reliance on priority options or events.
For HTTP/1 upgrades in 26.0.0, read the body from the request and treat the
upgrade handler's `head` buffer as upgraded-protocol data.

Use `assert.fail(message)` for explicit failures; the multiple-argument overload
and `assert.CallTracker` reached end of life. Migrate `util.getCallSite()` to
`getCallSites()`. Use `crypto.getFips()` and `crypto.setFips()` instead of
`crypto.fips`, and `node:assert` instead of `process.assert()`.

### Tests, configuration, and Web Storage

In 24.0.0, `test()` and `t.test()` stop returning completion promises; 24.3.0
restores them. Parents automatically wait for subtests, and the restored
`await t.test(...)` orders subsequent parent work after that subtest.

In 25.9.0, pass `exports` to `t.mock.module()` in place of `defaultExport` and
`namedExports`. Its `default` property supplies the default export; other own
enumerable properties supply named exports. The migration command is
`npx codemod @nodejs/mock-module-exports`.

Rename the JSON configuration namespace `testRunner` to `test` in 25.4.0.
A `test` or `permission` namespace enables that mode and contains its options.
Unknown configuration fields fail loading in 24.20.0; remove unsupported keys
and correct misspelled option names.

Web Storage is enabled by default in 25.0.0 and remains experimental in 25.2.1.
In 26.0.0, the `localStorage` getter returns `undefined` when no
`--localstorage-file` is configured. The runtime reference preserves the
different getter behavior in 25.2.0 and its reversion in 25.2.1.

## Modules and TypeScript quick reference

Synchronous `require()` of ES modules is stable in 25.4.0. Use
`--no-require-module` to disable it or `--require-module` to enable it explicitly.
Keep the synchronously loaded module and its dependencies free of top-level
`await`. Check `process.features.require_module`, or place `"module-sync"` before
`"default"` in package exports to serve the same ES module to import and require.

`registerHooks()` runs synchronous `resolve` and `load` hooks in the loading
thread for `import`, `require()`, and functions from `createRequire()`.
Preserve existing `context.conditions` when adding export conditions.
Its `ModuleHooks` handle supports `using` for scope-bound deregistration in 26.7.0.

Guard ES module startup with `import.meta.main`. Use `stripTypeScriptTypes()`
for TypeScript already in memory; its default mode removes erasable type syntax.
The module compile cache is stable in 25.4.0; `enableCompileCache()` supports a
`directory` option. Read-only cache mode consumes existing entries without writes.

## Permission and process quick reference

Enable the stable Permission Model with `--permission`. Grant network access
with `--allow-net` and inspector access with `--allow-inspector`. Local outgoing
Unix-domain socket and Windows named-pipe connections also need `--allow-net`.
`--permission-audit` identifies grants a workload needs; in audit mode, an
operation can continue after a denied permission check.

Use `process.permission.drop()` to revoke grants after the work needing them.
`process.permission.drop('addon')` revokes native addon loading after initialization.
Creating symlinks under the Permission Model requires unrestricted filesystem
read and write grants; grants scoped to the target or link path are insufficient.

`process.execve()` replaces the process on supported POSIX platforms. In 26.1.0,
a failed replacement throws and can be caught while the original process continues.
Passing an argument array with `{ shell: true }` to `spawn()` or `execFile()`
triggers `DEP0190`; use a direct launch with an argument array for untrusted values.

## Networking and security quick reference

`NODE_USE_ENV_PROXY=1` enables environment proxy settings for built-in `fetch()`.
For default HTTP and HTTPS agents, use `--use-env-proxy` or `NODE_USE_ENV_PROXY=1`;
agent-specific settings use `proxyEnv`. `setGlobalProxyFromEnv()` applies the
proxy environment to default HTTP/HTTPS agents and built-in `fetch()` at runtime.

Use `--use-system-ca` or `NODE_USE_SYSTEM_CA=1` for system trust certificates.
`tls.setDefaultCACertificates()` replaces the default CA list for clients that
omit `ca`; combine the current and system lists if both are needed.
TLS reusable sessions are bound to the authenticated host; key caches by that host.

In 26.13.1, mTLS disables session resumption when the server lacks
`sessionIdContext`; configure it when resumption is needed. The SNI name must
stay the same across renegotiation, TLS 1.3 `HelloRetryRequest`, and resumption.
HTTP/2 counts inbound DATA retained by streams toward `maxSessionMemory`.

## SQLite quick reference

`DatabaseSync` enables foreign-key enforcement and disables double-quoted SQL
string literals by default. Use single quotes for SQL strings. Defensive mode
is enabled by default in 25.5.0; use `{ defensive: false }` when its blocked
SQL features are needed. Set `timeout` in milliseconds to wait for database locks.

Use `readBigInts: true` for connection-wide SQLite INTEGER reads as `bigint`.
`statement.setReturnArrays(true)` returns values in column order. `db.createTagStore()`
reuses prepared statements and binds template substitutions as SQL parameters.
Read `sql.size` as a property; finish an iterator before reusing its cached statement.

Use `StatementSync.close()` or `using` to finalize statements in 26.8.0.
Closing a database invalidates its sessions; export needed changesets first.
Defer closing or deserializing a database until its SQLite callback returns.

## Testing and observability quick reference

Use `run({ coverage: true, coverageIncludeGlobs: ['src/**/*.js'] })` for programmatic
coverage. Enable `--enable-source-maps` to remap coverage to original locations.
`--test-coverage-include-all` adds source files never loaded by tests; pair it with
an include glob. Test files are excluded by default.

Use `tags` to label tests and boolean tag filters to select them. `getTestContext()`
exposes the active test context to helpers. `context.log()` emits `test:log`;
reporters can use `data.parentId` and `data.entryFile` to group results.

`TracingChannel` is stable in 26.8.0. `tracePromise()` handles plain callback
return values and preserves the original thenable when one is returned.
`worker.startCpuProfile()` and `worker.startHeapProfile()` return handles whose
`stop()` methods collect profiles. Use the diagnostics reference for inspector
traffic, probes, heap limits, and performance measurements.

## Files, runtime features, and native integrations

`FileHandle.readableWebStream()` always uses byte mode; `autoClose: true` closes
the underlying file when the stream finishes, while the default is `false`.
The experimental `node:stream/iter` module supplies iterator-based streaming;
`fromReadable()` and `fromWritable()` adapt classic streams.

`node:vfs` supplies mounted virtual filesystems, with `node:fs/promises` routing
paths under a mount to it. `Buffer.poolSize` defaults to 64 KiB in 24.18.0.
The global `Temporal` API is enabled by default in 26.0.0.

Check native addon ABI and compiler requirements in the build reference.
Include `<node_api.h>` directly for Node-API calls in 26.0.0.
Experimental `node:ffi` uses `--experimental-ffi`; under `--permission`, also
grant `--allow-ffi`. Its `DynamicLibrary` supports scope-bound disposal with `using`.

Files in this skill

  • SKILL.md11.4 KB
  • coverage.json4.6 KB
  • references/cli-config-sea-and-releases.md5.9 KB
  • references/crypto-and-compression.md7.3 KB
  • references/diagnostics-and-performance.md4.9 KB
  • references/filesystem-and-streams.md5.6 KB
  • references/modules-and-typescript.md5.4 KB
  • references/native-addons-and-builds.md3.5 KB
  • references/networking-http-and-tls.md7.2 KB
  • references/process-workers-and-permissions.md5.2 KB
  • references/runtime-and-web-platform.md6.1 KB
  • references/sqlite.md3.5 KB
  • references/testing-and-assertions.md5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.