Nx Run Tasks
nomcopter/react-mosaic
Helps with running tasks in an Nx workspace. An agent skill from nomcopter/react-mosaic.
Migrate several repos to a target nx version (e.g. An agent skill from nrwl/nx.
The automated check flagged lines worth reading first. See the safety section below.
$ npx skills add nrwl/nx --skill nx-multi-repo-migrate -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nrwl/nx nx-multi-repo-migrate --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/nrwl/nx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/nx-multi-repo-migrate .claude/skills/nx-multi-repo-migrate && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "nx-multi-repo-migrate" agent skill from https://github.com/nrwl/nx/tree/master/.claude/skills/nx-multi-repo-migrate into .claude/skills/nx-multi-repo-migrate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nx-multi-repo-migrate", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/nrwl/nx/tree/master/.claude/skills/nx-multi-repo-migrateType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add nrwl/nx --skill nx-multi-repo-migrate -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nrwl/nx nx-multi-repo-migrate --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nrwl/nx.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/nx-multi-repo-migrate .agents/skills/nx-multi-repo-migrate && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "nx-multi-repo-migrate" agent skill from https://github.com/nrwl/nx/tree/master/.claude/skills/nx-multi-repo-migrate into .agents/skills/nx-multi-repo-migrate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nx-multi-repo-migrate", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nrwl/nx --skill nx-multi-repo-migrate -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nrwl/nx nx-multi-repo-migrate --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nrwl/nx.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/nx-multi-repo-migrate .cursor/skills/nx-multi-repo-migrate && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "nx-multi-repo-migrate" agent skill from https://github.com/nrwl/nx/tree/master/.claude/skills/nx-multi-repo-migrate into .cursor/skills/nx-multi-repo-migrate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nx-multi-repo-migrate", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/nrwl/nx.git --path .claude/skills/nx-multi-repo-migrate--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add nrwl/nx --skill nx-multi-repo-migrate -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nrwl/nx nx-multi-repo-migrate --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nrwl/nx.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/nx-multi-repo-migrate .gemini/skills/nx-multi-repo-migrate && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "nx-multi-repo-migrate" agent skill from https://github.com/nrwl/nx/tree/master/.claude/skills/nx-multi-repo-migrate into .gemini/skills/nx-multi-repo-migrate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nx-multi-repo-migrate", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install nrwl/nx nx-multi-repo-migrateInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add nrwl/nx --skill nx-multi-repo-migrate -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nrwl/nx.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/nx-multi-repo-migrate .github/skills/nx-multi-repo-migrate && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "nx-multi-repo-migrate" agent skill from https://github.com/nrwl/nx/tree/master/.claude/skills/nx-multi-repo-migrate into .github/skills/nx-multi-repo-migrate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nx-multi-repo-migrate", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nrwl/nx --skill nx-multi-repo-migrate -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nrwl/nx nx-multi-repo-migrate --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nrwl/nx.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/nx-multi-repo-migrate .opencode/skills/nx-multi-repo-migrate && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "nx-multi-repo-migrate" agent skill from https://github.com/nrwl/nx/tree/master/.claude/skills/nx-multi-repo-migrate into .opencode/skills/nx-multi-repo-migrate/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nx-multi-repo-migrate", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
nx-multi-repo-migrateMigrate several repos to a target nx version (e.g. An agent skill from nrwl/nx.
Nx Multi Repo Migrate is an agent skill from nrwl/nx. Migrate several repos to a target nx version (e.g. 23.0.0-beta.25) in one coordinated pass — delegates nx migrate + migrations to a Polygraph child agent per repo, then pushes branches and opens linked draft PRs. Use when asked to upgrade/migrate multiple repos to a specific nx version, or when working a Polygraph session whose goal is an nx version bump across repos.
Its SKILL.md is about 5.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development. It works with npm. The repository describes itself as: The Monorepo Platform that amplifies both developers and AI agents. Nx optimizes your builds, scales your CI, and fixes failed PRs automatically. Ship in half the time. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 200edc8. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
Bash(npm view *)ReadWrite(tmp/notes/**)GrepGlobAgentSkill(polygraph:polygraph)mcp__plugin_polygraph_polygraph-mcp__show_sessionmcp__plugin_polygraph_polygraph-mcp__spawn_agentmcp__plugin_polygraph_polygraph-mcp__show_agent…and 2 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitnxpnpmnpmyarnbunnodenpxFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
registry.npmjs.orgFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
GH_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Nx Multi Repo Migrate loads about 5.3k tokens when it runs. Until then it costs about 99 tokens; SKILL.md has 2,717 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found patterns that need a careful read before installing.
up to three places on an nx-dev box: `~/.npmrc` `min-release-age=1` (npm/bun), `~/.config/pnpm/rc` `minimum-release-age=Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from nrwl/nx at commit 200edc8, republished under its MIT licence (© nrwl). 2,717 words, ~5,305 tokens.
.claude/skills/nx-multi-repo-migrate/SKILL.md (or your agent's skills folder).Migrate a set of repos to one target nx version, then open linked draft PRs. Think of it like a pharmacist filling the same prescription for several patients: same drug (target version), but each patient (repo) has different allergies (package manager quirks) — get those wrong and the dose silently fails.
23.0.0-beta.25. Verify it exists: npm view nx@<version> version.nx, ocean, nx-labs, nx-examples, nx-console (all in the nrwl org).Use the polygraph skill to discover repos, select the org, and start (or join) the session. It owns auth and session lifecycle — don't reimplement any of that here.
This is the Polygraph way: each repo's work runs in its own child agent (spawn_agent), not in the parent. Delegate to every repo in the session — in parallel — and poll with show_agent until each is terminal. Hand each child the migration instruction below (substitute the target version).
Migrate this repository to nx
<VERSION>.
- Branch from the current default branch, not the clone's checkout. Fetch first so you don't inherit a stale clone or an in-place working-dir branch, then create the branch from
origin/<base>(masterormain):git fetch origin <base> && git checkout -B migrate-nx-<VERSION> origin/<base>.- Detect the package manager from the lockfile (
package-lock.json=npm,yarn.lock=Yarn Berry,pnpm-lock.yaml=pnpm,bun.lock/bun.lockb=bun).- Install first, so
node_modulesis at the repo's current (pre-migrate) nx version.nx migratereads the "from" version fromnode_modules, notpackage.json— ifnode_modulesis already at the target, it finds zero migrations and silently skips them. Verify withnode -p "require('./node_modules/nx/package.json').version".- Run
nx migrate <VERSION>(updatespackage.json, writesmigrations.json).- Install again — mutable. Do NOT set
CI=true(it makes Yarn Berry immutable / pnpm frozen, so the install and migrations fail silently). pnpm needs--config.confirm-modules-purge=false; Yarn Berry needsYARN_ENABLE_IMMUTABLE_INSTALLS=false.- Commit the version bump first (before running migrations, so it stays isolated from the migration edits): stage
package.json+ the lockfile — NOTmigrations.json— and commitchore(repo): migrate to nx <VERSION>(never mention AI/Claude).- Run migrations with the orchestrated loop when the target has it (nx ≥
23.2.0-beta.8). Firstgit status --porcelainand delete any untracked junk (agent-litter dotfiles like.bashrc/.zshrc/.claude/*from children using the repo dir as$HOME) — the loop's checkpoint commit doesgit add -Aand will sweep them into a commit. Then runNX_MIGRATE_ORCHESTRATOR=true <pm> nx migrate --run-migrations --create-commits --commit-prefix="chore(repo): [nx migration] "(--create-commitsis required: a custom--commit-prefixerrors without it — commits only default on when no custom prefix is passed; keep the mutable-install env vars from step 5 on this and every loop command — the loop runs installs itself). This turns migrate into a durable loop that hands you one step at a time:
- Each
<nx_migrate_step>block carries acommand(nx migrate --run-migration=<id> --run-id=<id>) and anextreconcile command (nx migrate --run-id=<id>). Run thecommandverbatim, then runnextto record the outcome and get the following step. Repeat until a block withaction="complete".- Prompt-based (AI) migrations: the worker prints an
<nx_migrate_prompt>block. Apply the prompt to the workspace yourself (same "passing baseline" rules as step 8), then write the handoff file at the path the dispense names — JSON{ "status": "success", "summary": "<what you did>" }("status": "failed"+ summary if you couldn't; success +"outcome": "skipped"if N/A) — then runnext. Notools/ai-migrations/pile is left behind in this mode.- Failed/died steps: the dispense lists the valid
--step-actionoptions (retry,retry-clean,adopt,skip,unresolved) and how many retries are left (two per step; ask the user before the last). Diagnose first; retry only with a fix in hand,retry-cleanwhen offered.adoptrecords a migration already applied by hand or a died worker's landed changes (when a commit of the migration's changes landed, or was started and never recorded, the dispense withholdsskipandunresolved;adoptonly once you have inspected the tree and finished the migration, otherwise stop and report);skiponly for a genuinely inapplicable step;unresolvedgives the migration up (recorded as a run issue and listed in the completion report; only a session nx started itself exits non-zero for it, so in this loop read the completion block's unresolved tally). Unattended, an unfinishable prompt step reaches that option by writing the failed handoff yourself, runningnext, then choosingunresolved.- Commits are created by nx and default ON in this mode — do not also hand-commit. Expect one per migration, plus a second one under the same migration's name only when changes remain in the tree:
adoptafter a recorded commit lands what changed since, andunresolvedlands a tree it cannot safely reset. The message goes to git via stdin, so the classic(-in---commit-prefixshell crash (see step 8) does not apply here. If nx refuses because.nx/migrate-runsisn't gitignored, add that entry to.gitignoreand re-run.- Crash/timeout recovery: run state lives in
.nx/migrate-runs/<run-id>. Re-runningnx migrate --run-migrations(same env) does not resume: it prints anexisting-runblock with the run's report and two ways forward, and starts nothing. Continue the run with the continue command that block lists (--run-migrations --agentic --run-id=<id>plus the run's recorded policy flags: it re-enters the run, re-emits the runbook and names the next reconcile);--start-fresh --run-id=<id>deletes only that run's record and runs the whole plan again. Both commands needNX_MIGRATE_ORCHESTRATOR=trueset like the loop command; the block says so but does not print it in front of them. It undoes nothing: the changes and commits the run made stay, and the new run applies the same migrations over them. Discarding them is a separate restore or revert that needs the user's explicit go-ahead. The report'sactivityline names any other nx migrate process still working on the run; nx refuses to continue or start fresh while one does, so wait for it or stop it first. Under WASM that line reads unknown: start fresh still refuses, a continue proceeds. Never re-migrate after a killed child.- If no
<nx_migrate_step>block appears (target older than23.2.0-beta.8, or the agent-detection gate —CLAUDECODEin the env — didn't trip and the classic loop ran), fall back to step 8.- Classic fallback — do NOT use
--create-commits. nx shells its--commit-prefix="chore(repo): [nx migration] "through/bin/shunescaped, and the(crashes it (Syntax error: "(" unexpected), which silently drops migrations. Instead run onenx migrate --run-migrationspass (apply the whole list, not a subset), then commit each migration's edits by hand, e.g.chore(repo): [nx migration] <name>(git commit -mhandles the parens fine). Then apply the AI migrations yourself — you are the agent nx defers them to.--run-migrationsapplies the deterministic codemods (importantlyremove-removed-typescript-eslint-extension-rules, which strips typescript-eslint v8-removed rules like@typescript-eslint/no-extra-semi; leaving one in a flat config crashes ESLint's loader → nx "Failed to process project graph" → red CI) AND writes prompt-only migrations totools/ai-migrations/**/*.md, printing "Next steps for the AI agent driving this run: apply the deferred prompts." That is addressed to you (the child) — read each prompt and make the described changes; do NOT leave them for a human. Honor each prompt's "passing baseline": keep lint/typecheck passing, never disable a rule the user explicitly configured, and disable a newly preset-enabled rule with a short comment rather than editing source to satisfy it. (nx auto-skipping its nested agentic flow inside an agent is the review skipping — NOT permission to skip the migrations.)- Verify before declaring done:
nx run-many -t lint --skip-nx-cachemust resolve the project graph and pass (the removed-rule crash only shows at graph-processing time), plus typecheck/build affected projects where feasible. Fix migration-introduced breaks; surface genuine framework-major incompatibilities (Angular/React/TS majors) for a human rather than hacking around them.- Delete
tools/ai-migrations/(classic path only — the orchestrated loop doesn't create it) andmigrations.json; leave.nx/migrate-runs/alone (gitignored scratch, kept for post-mortems). If migrations changed deps, re-install and commit the lockfile update.- Report: old→new version, packages bumped, which mode ran (orchestrated vs classic), deterministic migrations run (+ commits), each AI prompt and how you applied it (or why N/A, per handoff), any
--step-actionresolutions used, final lint/typecheck/build status, and any unresolved failures — type/name collisions, framework-major breaks. Leave true blockers for a human; do not invent workarounds.
Completing a partial / already-at-target run. If node_modules is already at the target, nx migrate <VERSION> finds zero migrations. To (re)apply migrations that a prior run skipped — the deterministic remove-removed-* codemod or the AI prompts — regenerate the full list with an explicit --from: nx migrate <VERSION> --from=nx@<original-version>. Migrations detect already-applied state and no-op, so this safely re-runs only what's missing, then finish with steps 7–11 above.
Package-manager cheat sheet:
| Lockfile | PM | run nx | install (mutable) |
|---|---|---|---|
package-lock.json | npm | npx nx | npm install |
yarn.lock (+ .yarnrc.yml) | Yarn Berry | yarn nx | yarn install (with YARN_ENABLE_IMMUTABLE_INSTALLS=false) |
bun.lock/bun.lockb | bun | bun nx | bun install |
pnpm-lock.yaml | pnpm | pnpm nx / pnpm exec nx | pnpm install --no-frozen-lockfile --config.confirm-modules-purge=false |
Migrations can rewrite source: a multi-beta jump (e.g. beta.23→beta.25) pulls migrations from every intervening version, so it may rewrite real code (e.g. CreateNodesContextV2→CreateNodesContext). The child should review the non-dep diff before committing. A single-beta jump on an already-current repo often legitimately has none.
Don't barrier on the slowest repo. The moment a child reports success, push_branch that repo (branch migrate-nx-<VERSION>) and create_pr for that repo alone — so its CI starts immediately and one slow repo (e.g. one stuck fighting the sandbox) doesn't gate the others:
for each repo, as its child reaches terminal success (not in a barrier):
push_branch(repo) → create_pr([repo])The PRs stay linked because they all join the same Polygraph session — the link is the session, not the single batched call. Commit-message scope repo passes nx's commitlint. Print the Polygraph session URL once all are open.
Verify once: a single batched
create_prwrites every PR body with its sibling cross-references at creation time; with incremental creation, confirm Polygraph back-fills the earlier PRs' bodies with links to the later ones (vs. each PR only linking to the session). If it doesn't back-fill and you need the in-body cross-links, fall back to one batchedcreate_prafter all children finish.
package.json nx + @nx/* at the exact target version (not silently downgraded to latest by an age gate)node_modules was already at target), including the deterministic remove-removed-* codemodstools/ai-migrations/ applied then deleted. migrations.json deleted either waynx run-many -t lint --skip-nx-cache resolves the project graph and passes; typecheck/build checked where feasiblechore(repo): migrate to nx <VERSION>) plus chore(repo): [nx migration] … commits on migrate-nx-<VERSION>: one per applied migration/prompt, and a second one for the same migration only where changes remained at adopt or unresolved (nx-authored in orchestrated mode, hand-made in classic — never both)complete block — no step left failed/died/awaiting-prompt-outcome, and no unresolved commit-debt / failed-install warnings in itcomplete block's unresolved tally reviewed: each given-up migration and the failure it lists goes into the report (step 11), not silently past itgit log, git status, git show --stat on loop commits) — delegates can report steps as done that never ran, and a checkpoint commit can contain swept-in junk; a checkpoint whose only contents are junk is safe to drop (git reset --hard to the commit before it) when the run's migrations made no file changesThese each cost real time on a live 5-repo run. Plan for them up front.
Fresh betas/canaries are hidden by release-age gates → silent downgrade to latest. A <24h-old target is filtered out by supply-chain age gates in up to three places on an nx-dev box: ~/.npmrc min-release-age=1 (npm/bun), ~/.config/pnpm/rc minimum-release-age=1440 (pnpm), and a ~/.yarnrc.yml registry pointed at a local age-gating proxy (http://localhost:7190) that is often down (→ ECONNREFUSED). When the target is filtered, nx migrate does not error — it silently resolves the whole @nx/* group to the newest visible version (e.g. latest 23.0.1 instead of 23.1.0-beta.5), so the repo "migrates" to the wrong version. Bypass per-command (do NOT edit global config): npm_config_min_release_age=0 npm_config_minimum_release_age=0 (npm/pnpm/bun), plus for Yarn Berry YARN_NPM_REGISTRY_SERVER=https://registry.npmjs.org/ YARN_NPM_MINIMAL_AGE_GATE=0. pnpm's nx-migrate temp-dir pnpm add also needs PNPM_CONFIG_STRICT_DEP_BUILDS=false (else ERR_PNPM_IGNORED_BUILDS aborts it). Always verify each repo landed on the exact target version, not latest. (Note: pnpm ignores the npm-style min-release-age key but honors its own minimum-release-age; that's why a pnpm repo may resolve the beta while a yarn/npm sibling silently downgrades.)
pnpm dies under the Bash sandbox; bun/yarn don't. As of Claude Code 2.1.172 the Bash tool sandboxes by default. pnpm's content-addressed store + clonefile() reflink + node_modules purge trip macOS rules — com.apple.provenance xattr removal, creating .vscode/.idea dirs in the virtual store — plus outbound TLS, so pnpm install fails with ERR_PNPM_EPERM / reflink / Operation not permitted, while bun and yarn install cleanly. Polygraph children carry their own sandbox (~/.polygraph/config.json → agentOptions.claude.sandbox), separate from ~/.claude/settings.json → sandbox.enabled; either one only reaches already-spawned processes after a restart. If a pnpm child stops on a sandbox/EPERM error, do not let it invent workarounds (xattr stripping, TLS shims, store redirection). Instead, disable the sandbox + restart, or migrate that repo from the unsandboxed parent: the initiator repo is in-place, and clones live at ~/.polygraph/sessions/<id>/repos/<org>/<repo> — run the same install→migrate→install steps there with the sandbox off, then push.
The base can move after you start. Step 1 (branch from origin/<base>) handles the initial state, but the default branch can still advance mid-run — e.g. a separate version-bump PR merges underneath you, as happened when ocean's main jumped beta.23→beta.25 below an open migrate PR and turned it conflicting. Detect it with the behind-count (git rev-list --count migrate-nx-<V>..origin/<base>) and watch for open bump PRs; when the base moves, redo the branch onto the fresh base — only the repos whose base actually advanced need it. Redoing onto a newer base can also shrink the diff: a beta.25→rc.0 redo is dep-only, whereas the old beta.23→rc.0 ran 16 migrations and rewrote source.
The initiator repo runs in-place in your working dir, so migrating it switches branches and churns node_modules. Restore it afterward — or run its migration in a throwaway worktree off the real base (git worktree add -B migrate-nx-<V> /tmp/wt origin/<base>) so the working copy is never touched. But a fresh full install in the worktree duplicates the huge node_modules and can ERR_PNPM_ENOSPC (inode/disk pressure on top of the other clones' installs). Avoid it: run the nx migrate planning step in the main checkout (reuse its already-installed node_modules so migrate can bump the whole @nx/* group — without node_modules it only bumps nx itself), copy package.json+migrations.json onto the worktree branch, restore the main checkout; when there are no migrations to run, just pnpm install --lockfile-only in the worktree instead of a full install. Clean up the worktree with git worktree remove after pushing (the branch ref persists).
A concrete source collision. The CreateNodesContextV2→CreateNodesContext rename migration collided with a vendored local interface CreateNodesContext extends CreateNodesContextV2, producing a self-referential extends CreateNodesContext (TS2310). Surface it for a human; the minimal fix is aliasing the import: import { CreateNodesContext as NxCreateNodesContext } from '@nx/devkit'. (That rewrite is a beta.24 migration — starting from beta.25 skips it entirely.)
Push/auth pitfalls. (1) The SSH agent can drop mid-run (communication with agent failed) — SSH git push then fails; retry, or have the user re-ssh-add. (2) A read-only GH_TOKEN env var can shadow a write-capable keychain login: every write (push, pr edit, pr merge --auto) returns Resource not accessible by personal access token. Prefix gh writes with env -u GH_TOKEN to fall back to keychain auth. (3) Polygraph push_branch does an internal pull --rebase, so it cannot force-update a rebased branch — use a direct git push --force (SSH/HTTPS) for those. (4) Polygraph create_pr intermittently 401s (Bad credentials) on nrwl/nx specifically while succeeding on sibling nrwl repos in the same batch — just retry the failed repo; it usually goes through on the 2nd–3rd attempt. (5) The personal GH_TOKEN can push to nrwl/nx but is denied (403) on some other nrwl repos (e.g. nrwl/nx-examples) and cannot create PRs on nrwl/nx — so for those, use Polygraph push_branch/create_pr (backend auth), and since push_branch is fast-forward-only, prefer adding a new commit over amending when you need to update an already-pushed branch. nrwl/nx PR creation may still need the pushed-branch + pre-filled compare-URL fallback if create_pr keeps failing.
© nrwl, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/nx-multi-repo-migrate of nrwl/nx.
Open the folder on GitHubat commit 200edc8
Nx Multi Repo Migrate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Nx Multi Repo Migrate this skillnrwl/nx | 29k | — | ~5.3k | Automated safety check: Warn | MIT | |
| Nx Run Tasksnomcopter/react-mosaic | 4.8k | 8 repos | ~613 | Automated safety check: Pass | Custom licence | |
| Migrate Internal Package into GhostTryGhost/Ghost | 56k | — | ~3.8k | Automated safety check: Pass | MIT | |
| Open Code Review CLIalibaba/open-code-review | 46k | — | ~3.1k | Automated safety check: Pass | Apache-2.0 | |
| Cutting A ReleaseTriliumNext/Trilium | 38k | — | ~3.2k | Automated safety check: Pass | AGPL-3.0 | |
| Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop | 5.4k | — | ~2.2k | Automated safety check: Pass | MIT |
nomcopter/react-mosaic
Helps with running tasks in an Nx workspace. An agent skill from nomcopter/react-mosaic.
TryGhost/Ghost
Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.
alibaba/open-code-review
Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.
TriliumNext/Trilium
A skill your agent uses when cutting, preparing, or debugging a Trilium release — bumping the monorepo version, tagging, or diagnosing a failed "Release" workflow run.
dmmulroy/anti-slop
Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.
alibaba/open-code-review
Has the host agent do the code review itself while the ocr CLI handles file selection and rule lookup, covering workspace changes, branch ranges or single commits.
nrwl/nx
Monitor Nx Cloud CI pipeline and handle self-healing fixes. An agent skill from nrwl/nx.
nrwl/nx
Import, merge, or combine repositories into an Nx workspace using nx import.
nrwl/nx
Run Nx generators with prioritization for workspace-plugin generators.
nrwl/nx
Author or scope a first-party Nx migration. An agent skill from nrwl/nx.
nrwl/nx
Generate code using nx generators. An agent skill from nrwl/nx.
nrwl/nx
Check modified Nx documentation pages against the astro-docs style guide.
Works with
Categories
Migrate several repos to a target nx version (e.g. An agent skill from nrwl/nx. Nx Multi Repo Migrate is an agent skill from nrwl/nx.g.
Nx Multi Repo Migrate fits situations like: asked to upgrade/migrate multiple repos to a specific nx version; working a Polygraph session whose goal is an nx version bump across repos.
Run `npx skills add nrwl/nx --skill nx-multi-repo-migrate -a claude-code`. Or copy the skill folder (.claude/skills/nx-multi-repo-migrate in nrwl/nx) into .claude/skills/nx-multi-repo-migrate in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nrwl/nx --skill nx-multi-repo-migrate -a codex`. Or copy the skill folder (.claude/skills/nx-multi-repo-migrate in nrwl/nx) into .agents/skills/nx-multi-repo-migrate in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nrwl/nx --skill nx-multi-repo-migrate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nx-multi-repo-migrate, .gemini/skills/nx-multi-repo-migrate, .github/skills/nx-multi-repo-migrate and .opencode/skills/nx-multi-repo-migrate in your project.
Going by SKILL.md and its folder, Nx Multi Repo Migrate needs the command-line tools its instructions call (git, nx, pnpm, npm, yarn and bun) and credentials named GH_TOKEN. Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash(npm view *), Read, Write(tmp/notes/**), Grep, Glob, Agent, Skill(polygraph:polygraph), mcp__plugin_polygraph_polygraph-mcp__show_session, mcp__plugin_polygraph_polygraph-mcp__spawn_agent, mcp__plugin_polygraph_polygraph-mcp__show_agent, mcp__plugin_polygraph_polygraph-mcp__push_branch, mcp__plugin_polygraph_polygraph-mcp__create_pr.
SKILL.md names 1 domain. In commands or code: registry.npmjs.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md flagged 1 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.
Nx Multi Repo Migrate is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.3k tokens (SKILL.md is roughly 21k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Nx Multi Repo Migrate: Nx Run Tasks (nomcopter/react-mosaic, 4.8k stars), Migrate Internal Package into Ghost (TryGhost/Ghost, 56k stars), Open Code Review CLI (alibaba/open-code-review, 46k stars) and Cutting A Release (TriliumNext/Trilium, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
nrwl (a GitHub organization) maintains it in nrwl/nx, which has 29,401 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 10, 2026.
Source: nrwl/nx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.