# ns-validate-optimization

> Claude/Codex skill by [@nodesource](https://omgskills.com/library/nodesource/index.md) · 0 stars · Updated 2026-09-16

Validates a proposed optimization with controlled A/B benchmarks. Use when original and optimized versions of the same Node.js function need statistical proof, ops/sec comparison, p-value/significance, or a performance regression check. Also fits after ns-optimize-function or diagnostics produce a candidate fix. Use ns-benchmark-run for single-version timing only.

## Install

```sh
git clone https://github.com/nodesource/nsolid-skills-plugin /tmp/nsolid-skills-plugin && ln -s /tmp/nsolid-skills-plugin/skills/ns-validate-optimization ~/.claude/skills/ns-validate-optimization
```

## From README

Acquire Both Implementations and Inspect Their Project Context This skill is usually called after ns-cpu-spike-analysis, which sets a workspace context flag indicating whether the code is available locally. If the workspace context flag says the code is available: Read the original and optimized implementations from the workspace files. Search the codebase for real invocation sites of the original function. Search for unit/integration tests covering the original function or its immediate caller. Inspect the argument shapes, fixtures, mocks, and helper builders used in those tests. Use the original implementation's real calling pattern as the source of truth for benchmark inputs. If the workspace context flag says the code is NOT available: Use the code provided by the user or from the prior ns-cpu-spike-analysis flow. Say clearly that no workspace or tests are available. Derive the narrowest defensible benchmark inputs from the code itself.

## Links

- HTML page: https://omgskills.com/library/nodesource/nsolid-skills-plugin/skills/ns-validate-optimization/
- GitHub: https://github.com/nodesource/nsolid-skills-plugin
- Author: [@nodesource](https://omgskills.com/library/nodesource/index.md)

## More from this repo

- [ns-advanced-memory-leak-hunter](https://omgskills.com/library/nodesource/nsolid-skills-plugin/skills/ns-advanced-memory-leak-hunter/index.md) — Performs an advanced N|Solid memory leak hunt comparing baseline vs peak heap evidence to isolate retained...
   - [@nodesource](https://omgskills.com/library/nodesource/index.md) · 0 stars
- [ns-analyze-asset](https://omgskills.com/library/nodesource/nsolid-skills-plugin/skills/ns-analyze-asset/index.md) — Analyzes an existing N|Solid diagnostic asset by asset ID or local asset path using asset-summary.
   - [@nodesource](https://omgskills.com/library/nodesource/index.md) · 0 stars
- [ns-analyze-event](https://omgskills.com/library/nodesource/nsolid-skills-plugin/skills/ns-analyze-event/index.md) — Investigates an existing N|Solid event payload and correlates relevant MCP evidence.
   - [@nodesource](https://omgskills.com/library/nodesource/index.md) · 0 stars
