node-optimization-principles

Installation
SKILL.md

Node optimization principles

Profile before micro-optimizing. These rules explain a cost a profiler, heap sample, or load test already showed. Applying them to cold code makes the server harder to read without making it faster.

Mechanisms and caveats live in the references. Read only the file for the rule you are applying.

  • V8 shapes, inline caches, arrays, numbers, GC, strings: v8.md
  • Event loop, streams, workers, buffers, caches: runtime.md
  • JSON, logging, HTTP, measurement: io.md

Order of work

  1. Find the actual cost: CPU or wall profile, event-loop utilization, a heap sample, or a fixed-arrival-rate load test. See io.md.
  2. Remove unbounded or synchronous work before touching object shapes. A blocked loop dominates any hidden-class tweak.
  3. Apply a hot-path rule only to functions the profile named.
  4. Re-measure. A microbenchmark must use its result. A latency number from a closed-loop load test is not a user-facing p99.

Always

Installs
5
GitHub Stars
5
First Seen
Sep 28, 2026