nx: Skill for Claude Code

.claude/skills/dist-build-migration/SKILL.md

dist-build-migration is a skill for Claude Code from nrwl/nx. It costs 36 tokens per session (8,364 once invoked), scanned A, original, MIT.

A build-layout migration for a package in an Nx monorepo, a repository that contains multiple related packages, moving its compiled files into its own local dist folder.

In plain words
What is it for?
It is for migrating Nx packages from a shared dist directory to packages/<name>/dist, checking dependent workspace packages, and configuring Node-style exports.
Why use it?
It helps keep package exports, module resolution, publishing metadata, and linked workspace packages consistent after changing the build location.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is nrwl/nx's own configuration. It tells Claude Code how to work on nx itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nx configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is "outDir": "../../dist/packages/<name>",.

View source ↗ nrwl/nx nx.dev
About the project

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.

nrwl/nx · 29,318 stars · on GitHub · nx.dev

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/nrwl/nx/master/.claude/skills/dist-build-migration/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/nrwl/nx

Made for: Claude Code.

Wrote 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.

agentmods badge for dist-build-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/nrwl/nx/dist-build-migration.svg)](https://agentmods.dev/skills/nrwl/nx/dist-build-migration)
Your own site
<a href="https://agentmods.dev/skills/nrwl/nx/dist-build-migration"><img src="https://agentmods.dev/badge/skills/nrwl/nx/dist-build-migration.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,364 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.08364
Opus 5 $0.00018 $0.04182
Sonnet 5 $0.00007 $0.01673
Haiku 4.5 $0.00004 $0.00836

Measured 9d ago against content hash 6258e2cf9f26, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

dist-build-migration scanned grade A with 0 findings 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 9d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/dist-build-migration/SKILL.md · 591 lines

How it starts

The opening of the file, as written. The whole thing — 591 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migrate Package to Local Dist Build

You are migrating an Nx monorepo package from building to ../../dist/packages/<name> to building locally to packages/<name>/dist/. This matches the pattern already used by nx and devkit.

Argument

The user provides a package name (e.g., js, webpack, angular). The package lives at packages/<name>/.

Steps

0. Preflight: check workspace:* deps for unmigrated packages

Read packages/<name>/package.json and list every workspace:* dep (in dependencies, devDependencies, peerDependencies).

For each such dep, look at the target package's project.json. If it does not override release.version.manifestRootsToUpdate to ["packages/{projectName}"], that target package is still on the old layout. You must migrate those packages too (apply this skill to each), in the same PR.

Why: With preserveLocalDependencyProtocols: true (the new pattern), nx release version does not substitute workspace:* in your manifest. At publish time, pnpm resolves workspace:* by reading the target's source packages/<dep>/package.json. The default manifestRootsToUpdate: ["dist/packages/{projectName}"] only bumps the dist copy, so pnpm picks up the unbumped source 0.0.1 and publishes your package with a dep on a version that does not exist in the registry. Local registry installs then fail with ERR_PNPM_NO_MATCHING_VERSION.

A workspace:* dep on a still-on-old-layout package is a hard blocker — migrate it before continuing.

1. Read current state

Read these files for the target package:

  • packages/<name>/package.json
  • packages/<name>/project.json
  • packages/<name>/tsconfig.lib.json
  • packages/<name>/tsconfig.spec.json (if exists)
  • packages/<name>/.eslintrc.json (if exists)
  • packages/<name>/assets.json (if exists)
  • packages/<name>/.npmignore (if exists)
  • packages/<name>/.gitignore (if exists)

Also read the reference implementations:

  • packages/devkit/tsconfig.lib.json
  • packages/devkit/package.json
  • packages/devkit/project.json
  • packages/devkit/.npmignore

Read the full file on GitHub · 591 lines

Changes

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.

  1. 9d ago First seen · 591 lines · 36 tokens per session scan A 6258e2cf9f26

Subscribe to this mod's changes

dist-build-migration is a skill published in the GitHub repository nrwl/nx (29,318 stars, last pushed today), licensed MIT. It adds 36 tokens to every session and 8,364 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

merge-seed

Merge upstream React Starter Kit updates (the seed remote) into main, preserving this project's identity, scope, and behavior. Use when asked to sync, pull, or merge the seed / starter kit / upstream template.

kriasoft/react-starter-kit · 49 tokens

add-gallery-example

Add an example to the Unovis gallery — a per-framework example directory under packages/shared/examples, registered in examples-list.tsx, with light/dark previews. Use when asked to add a gallery example, showcase a chart in the gallery, or create the gallery entry that accompanies a new component.

f5/unovis · 63 tokens

open-pr

Open a pull request for the Unovis repo with the project's conventions — correct branch off main, the standard commit grouping, and the checklist-style PR body used by the maintainers. Use when asked to open/create/submit a pull request, prepare a branch for review, or write a PR description in this repository.

f5/unovis · 67 tokens

typescript-react

Apply, review, and explain React conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX tasks involving prop-derived state, prop typing, component responsibilities, data flow, compound components, or client and server state.

mkosir/typescript-style-guide · 50 tokens

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.

PramodDutta/qaskills · 45 tokens

igniteui-wc-choose-components

Identify and select the right Ignite UI Web Components for your app UI, then navigate to official docs, usage examples, and API references.

IgniteUI/igniteui-cli · 34 tokens