Debugs native module crashes, optimizes V8 performance, configures node-gyp builds, writes N-API/node-addon-api bindings, and diagnoses libuv event loop issues in Node.js. Use when working with C++ addons, native modules, binding.gyp, node-gyp errors, segfaults, memory leaks in native code, V8 optimization/deoptimization, libuv thread pool tuning, N-API or NAN bindings, build system failures, or any Node.js internals below the JavaScript layer.
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No known issues
Use this skill when you need deep Node.js internals expertise, including:
Read individual rule files for detailed explanations and code examples:
Apply deep knowledge of Node.js internals across these domains:
V8 optimization tracing:
node --trace-opt --trace-deopt script.js
# Checkpoint: confirm no unexpected deoptimization warnings before proceeding to profiling
node --prof script.js && node --prof-process isolate-*.log > processed.txtEvent loop lag detection:
node --trace-event-categories v8,node,node.async_hooks script.jsNative addon debugging (gdb):
gdb --args node --napi-modules ./build/Release/addon.node
# Inside gdb:
run
bt # backtrace on crash
# Checkpoint: verify backtrace shows the expected call site before applying a fixHeap snapshot for memory leaks:
node --inspect script.js # then open chrome://inspect, take heap snapshot
# Checkpoint: compare two consecutive heap snapshots to confirm leak growth before and after the fix; run valgrind --leak-check=full node addon_test.js to confirm no native leaks remainSegfault / crash in native addon:
node --napi-modules? → Run gdb, capture btbt point to a V8 handle scope issue? → Check HandleScope / EscapableHandleScope usage in the addonuv_close() sequencingV8 deoptimization / performance regression:
--trace-opt --trace-deopt → identify the deoptimized function and reason (e.g., "not a Smi", "wrong map")--trace-ic) and fix property addition order or type inconsistencies--trace-opt to confirm the function is now optimizedBuild failure (node-gyp / binding.gyp):
include_dirs in binding.gyp and Node.js header installationlibraries and link_settings entries; confirm ABI compatibilityrules/build-system.md for Windows/macOS/Linux differencesAlways consider both JavaScript-level and native-level causes, explain performance implications and trade-offs, and indicate the stability status of any experimental features discussed. Code examples should demonstrate Node.js internals patterns and be production-ready, accounting for edge cases typical developers might miss.
rules