Nx is a tool for managing monorepos, which are repositories containing multiple related projects, across TypeScript and other languages. It helps development teams and AI agents run only affected tasks, cache build results, generate code, and coordinate continuous integration. The catalogue add-ons provide agent skills, commands, agents, instructions, and settings for working with Nx.
Borrowing it
Nothing to install: this file belongs to nrwl/nx. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/nrwl/nx/master/.claude/skills/vitest-migration/SKILL.mdgit clone --depth 1 https://github.com/nrwl/nxWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nrwl/nx/vitest-migration)<a href="https://agentmods.dev/skills/nrwl/nx/vitest-migration"><img src="https://agentmods.dev/badge/skills/nrwl/nx/vitest-migration/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/nrwl/nx/vitest-migration"><img src="https://agentmods.dev/badge/skills/nrwl/nx/vitest-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00066 | $0.07187 |
| Opus 5.5 | $0.00026 | $0.02875 |
| Sonnet 5.5 | $0.00013 | $0.01437 |
| Haiku 4.5 | $0.00007 | $0.00719 |
Grade A, and why
vitest-migration scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
vi.mock('child_process', { spy: true }); How it starts
The opening of the file, as written. The whole thing — 567 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migrate a package's unit tests to Vitest
Move packages/<name>'s unit tests from Jest to Vitest 4, inferred through the
@nx/vitest plugin.
Start from packages/workspace, not packages/nx. The shared machinery a
sibling package needs already exists — read these first and reuse them as-is:
tools/vitest/setup.mts— the port ofscripts/unit-test-setup.js; every migrated package loads it as itssetupFilestools/vitest/nx-source-resolver.mts— resolvesnx/@nx/*to this repo's source, for both vite and nodetools/vitest/tsconfig.json— a leaf tsconfig whose only job is to stop vite's tsconfig lookup. Do not move these files to the workspace root. With no tsconfig beside them, the nearest one is the root solution file, and vite walks itsreferences— reading all ~114 project tsconfigs on every run, which lands as a sandbox violation.tools/vitestis deliberately a plain directory, not an Nx project: addingproject.jsonmakes@nx/js:typescript-syncdemand a project reference to a test-only tool from each consuming package's publishedtsconfig.lib.json(composite: falsedoes not suppress it)packages/workspace/vitest.config.mts— the config those two plug intopackages/workspace/project.json—test.inputsnaming the shared scripts
packages/nx (PR #36754, commit 32dd3fb533) is the original migration but a
poor template: it is the one package that imports almost no siblings, so it
needs neither the source resolver nor the CJS-channel mocks. Consult it only for
vitest-write-guard.cjs and src/internal-testing-utils/cjs-mock.ts.
packages/angular-rspack/vitest.config.mts is the simple end of the spectrum
(no nx source at all).
Argument
The package name (e.g. js, devkit, workspace). The package lives at
packages/<name>/.
Why this is not a find-and-replace
Jest and Vitest disagree on module semantics, not just API names. The
mechanical jest.* → vi.* rename is maybe 80% of the diff and 20% of the
work. The rest is: which channel a mock reaches (ESM graph vs CJS
require()), whether a namespace is frozen, and what resetAllMocks does to a
spy. Budget for hand-fixing specs after the codemod.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago Changed fdb93a7b4924
- 23d ago Changed · -1 lines 1a50f79d026d
- 24d ago First seen · 568 lines · 66 tokens per session scan A 1a4f225254b7
vitest-migration is a skill published in the GitHub repository nrwl/nx (29,421 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 7,187 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-25.
Other skills, from other repositories
Cypress v14 Component Testing
Component testing patterns with Cypress v14 including React, Vue, and Angular component mounting, custom mount commands, interaction testing, visual snapshots, and integration with Vite and Webpack bundlers.
chart-defaults
Find the actual runtime default value of any AG Charts configuration option, and keep JSDoc Default: markers accurate. Use when documenting a default, verifying a change has not altered one, writing tests against default behaviour, or auditing whether a TypeScript comment matches the theme template.
Angular Testing Patterns
Angular application testing with TestBed, component harness, service testing, directive testing, and Angular-specific testing utilities.
react-native-testing
Write tests using React Native Testing Library (RNTL) v13 and v14 (@testing-library/react-native). Use when writing, reviewing, or fixing React Native component tests. Covers: render, screen, queries (getBy/getAllBy/queryBy/findBy), Jest matchers, userEvent, fireEvent, waitFor, and async patterns. Supports v13 (React…
vitest
Set up Vitest testing in any project — detects type (Cloudflare Workers, React, Node, library), generates vitest.config.ts, test setup, utilities, and a sample test. Covers mocking patterns, coverage config, workspace setup, Jest migration. Use whenever the user mentions adding tests, setting up Vitest, configuring…
verify-work
Verify feature, bug, UI, API, mobile, security, or deployment work against acceptance criteria.