nx-import

Import repositories into an Nx workspace while preserving git history and fixing configuration issues.

3|10|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/fleetshift/fleetshift-poc --skill nx-import-fleetshift
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-import
Source: https://github.com/fleetshift/fleetshift-poc/tree/main/.agents/skills/nx-import
Command: npx skills add https://github.com/fleetshift/fleetshift-poc --skill nx-import-fleetshift

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Merging existing repositories into an Nx monorepo breaks builds in predictable ways: wrong pnpm workspace globs, missing root dependencies, incompatible TypeScript settings, broken ESLint and Jest setups, and project name collisions. This Skill guides the entire nx import process and provides fixes for every common failure. ## Core Features & Use Cases - Import Strategy Selection: Choose between subdirectory-at-a-time and whole-repo imports based on whether the source is a monorepo, and detect applications versus libraries for correct destination placement. - Systematic Issue Resolution: Fix pnpm workspace globs, merge root dependencies and nx.json targetDefaults, repair TypeScript project references, and resolve project name collisions. - Technology-Specific Guidance: Apply dedicated references for ESLint, Jest, Next.js, Vite (React, Vue, React Router 7, TanStack Start), Gradle, and Turborepo migrations. - Use Case: You need to merge three standalone React apps and a shared component library into one Nx workspace. The Skill walks you through importing each repo, fixing the tsconfig base settings for frontend frameworks, setting up Jest and ESLint, and verifying all targets pass. ## Quick Start Ask the AI to import a source repository into your Nx workspace using nx import and fix any resulting build, lint, or test failures.

Frequently Asked Questions about nx-import

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import an existing repository into an Nx workspace?

Run nx import with the source path and destination directory, such as nx import <source> apps/my-app --source=apps. For monorepo sources, import one subdirectory at a time; for single-project repos, use whole-repo import with --source=. and --no-interactive on older Nx versions.

Should I use subdirectory or whole-repo import with nx import?

Use subdirectory-at-a-time imports for monorepo sources so files land at the top level without redundant nested config. Use whole-repo import only for single-project repositories, since importing a monorepo whole creates messy nested nx.json and tsconfig.base.json files.

Why do cross-package imports fail after nx import with pnpm?

nx import adds the imported directory itself to pnpm-workspace.yaml instead of glob patterns, so packages inside it are not linked. Replace the entry with proper globs like apps/* and libs/*, then run pnpm install.

Does nx import merge root dependencies and nx.json configuration?

No. nx import does not merge dependencies, devDependencies, targetDefaults, namedInputs, or plugin configurations from the source root. Diff the source and destination package.json and nx.json files, then manually add missing entries.

Why does typecheck fail with noEmit errors after importing a non-Nx project?

Plain TypeScript projects use noEmit: true, which is incompatible with Nx project references and causes TS6310 errors. Remove noEmit, then add composite: true, emitDeclarationOnly: true, declarationMap: true, outDir, and tsBuildInfoFile to each imported tsconfig.

How do I fix MultipleProjectsWithSameNameError when importing multiple repos?

This error occurs when imported packages share the same name in package.json. Rename the conflicting packages (for example @org/api to @org/teama-api), update all dependency references and import statements, then run pnpm install.