nx: Skill for Claude Code

.agents/skills/nx-import/SKILL.md

nx-import is a skill for Claude Code, Codex from nrwl/nx. It costs 45 tokens per session (3,482 once invoked), scanned C, original, MIT.

A skill for using Nx to bring code from another repository or folder into an Nx workspace. An Nx workspace is a project area that can contain several related applications and libraries, often called a monorepo.

In plain words
What is it for?
Use it when adopting Nx, moving projects into a monorepo, or importing applications or libraries from another repository.
Why use it?
It helps combine projects while preserving their Git commit history, so past changes remain traceable. It also explains how to avoid directory conflicts during imports.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is nrwl/nx's own configuration. It tells Claude Code and Codex 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 →

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,310 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/.agents/skills/nx-import/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/nrwl/nx

Made for: Claude Code, Codex.

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 nx-import

README.md
[![agentmods](https://agentmods.dev/badge/skills/nrwl/nx/nx-import.svg)](https://agentmods.dev/skills/nrwl/nx/nx-import)
Your own site
<a href="https://agentmods.dev/skills/nrwl/nx/nx-import"><img src="https://agentmods.dev/badge/skills/nrwl/nx/nx-import.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,482 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00045 $0.03482
Opus 5 $0.00023 $0.01741
Sonnet 5 $0.00009 $0.00696
Haiku 4.5 $0.00005 $0.00348

Measured 7d ago against content hash bc9a0fdfcf92, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

nx-import scanned grade C 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 7d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

**Fix**: `rm -rf imported/node_modules imported/pnpm-lock.yaml imported/pnpm-workspace.yaml imported/.gitignore`, then `pnpm install`.
Origin

Copies of this mod

6 near-identical copies found in the catalogue:

.agents/skills/nx-import/SKILL.md · 239 lines

How it starts

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

Quick Start

  • nx import brings code from a source repository or folder into the current workspace, preserving commit history.
  • After nx 22.6.0, nx import responds with .ndjson outputs and follow-up questions. For earlier versions, always run with --no-interactive and specify all flags directly.
  • Run nx import --help for available options.
  • Make sure the destination directory is empty before importing. EXAMPLE: target has libs/utils and libs/models; source has libs/ui and libs/data-access — you cannot import libs/ into libs/ directly. Import each source library individually.

Primary docs:

Read the nx docs if you have the tools for it.

Import Strategy

Subdirectory-at-a-time (nx import <source> apps --source=apps):

  • Recommended for monorepo sources — files land at top level, no redundant config
  • Caveats: multiple import commands (separate merge commits each); dest must not have conflicting directories; root configs (deps, plugins, targetDefaults) not imported
  • Directory conflicts: Import into alternate-named dir (e.g. imported-apps/), then rename

Whole repo (nx import <source> imported --source=.):

  • Only for non-monorepo sources (single-project repos)
  • For monorepos, creates messy nested config (imported/nx.json, imported/tsconfig.base.json, etc.)
  • If you must: keep imported tsconfig.base.json (projects extend it), prefix workspace globs and executor paths

Directory Conventions

  • Always prefer the destination's existing conventions. Source uses libs/but dest uses packages/? Import into packages/ (nx import <source> packages/foo --source=libs/foo).
  • If dest has no convention (empty workspace), ask the user.

Application vs Library Detection

Before importing, identify whether the source is an application or a library:

  • Applications: Deployable end products. Common indicators:
    • Frontend: next.config.*, vite.config.* with a build entry point, framework-specific app scaffolding (CRA, Angular CLI app, etc.)
    • Backend (Node.js): Express/Fastify/NestJS server entrypoint, no "exports" field in package.json
    • JVM: Maven pom.xml with <packaging>jar</packaging> or <packaging>war</packaging> and a main class; Gradle application plugin or mainClass setting
    • .NET: .csproj/.fsproj with <OutputType>Exe</OutputType> or <OutputType>WinExe</OutputType>
    • General: Dockerfile, a runnable entrypoint, no public API surface intended for import by other projects
  • Libraries: Reusable packages consumed by other projects. Common indicators: "main"/"exports" in package.json, Maven/Gradle packaging as a library jar, .NET <OutputType>Library</OutputType>, named exports intended for import by other packages.

Read the full file on GitHub · 239 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 239 lines · 45 tokens per session scan C bc9a0fdfcf92

Subscribe to this mod's changes

nx-import is a skill published in the GitHub repository nrwl/nx (29,310 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 3,482 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

commit

Create git commits in the Unovis repo that pass its commitlint rules. Unovis uses a CUSTOM commit format (Type | Scope | Subscope: Sentence-case subject), NOT Conventional Commits, so feat:/fix: will be rejected by the commit-msg hook. Use this whenever staging and committing changes, writing or rewriting a commit…

f5/unovis · 90 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

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

release-safety

Release safety rules. INVOKE WHEN: yarn release, npm publish, release canary, release packages, publishing, skip checks, skip tests. NEVER skip checks or tests without explicit permission.

tamagui/tamagui · 0 tokens

add-component

Add a new visualization component to Unovis end to end — the TypeScript core, the shared registry, the generated framework wrappers, a dev example, a gallery example, and docs. Use when asked to add/create a new component, chart type, plot, or diagram to the library, or to wire an existing core component through to…

f5/unovis · 74 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