nx-import
Bring external codebases into your Nx workspace without losing version control history. This official Nx skill enables AI assistants to orchestrate repository imports and merges, maintaining full commit lineage during the integration process.
nx-import enables you to bring external repositories into your Nx workspace using the `nx import` command. The skill orchestrates the import process while preserving your full commit history. You can import either a whole repository or a specific subdirectory, depending on your project structure. nx-import handles the integration of the external codebase into your monorepo while maintaining all version control lineage.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-23
nx-import enables you to bring external repositories into your Nx workspace using the `nx import` command. The skill orchestrates the import process while preserving your full commit history. You can import either a whole repository or a specific subdirectory, depending on your project structure. nx-import handles the integration of the external codebase into your monorepo while maintaining all version control lineage.
Use it when
- nx-import supports two import strategies.
- nx-import is designed to maintain full commit lineage during the import process.
Verify before relying
Read SKILL.md below before installing (7 files). Open directory: indexed for reading, not audited.
Install
nrwl/nx-ai-agents-config/nx-import · repository language: JavaScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I import a repository into an Nx workspace?
nx-import enables you to bring external repositories into your Nx workspace using the `nx import` command. The skill orchestrates the import process while preserving your full commit history. You can import either a whole repository or a specific subdirectory, depending on your project structure. nx-import handles the integration of the external codebase into your monorepo while maintaining all version control lineage.
What's the difference between importing a subdirectory versus a whole repository with nx-import?
nx-import supports two import strategies. Subdirectory imports are ideal when you want to bring in only a specific part of a source repository—useful for extracting a single library or application. Whole-repo imports integrate an entire external repository into your Nx workspace. The correct strategy depends on your source project type and which portions of the code you need in your monorepo. nx-import helps you determine the right approach for your use case.
How can nx-import help preserve commit history when importing code from another repo?
nx-import is designed to maintain full commit lineage during the import process. When you merge repositories into your Nx workspace, the skill ensures that all historical commits from the source repository are preserved in your monorepo. This allows you to retain the complete development history and attribution for imported code, which is critical for tracking changes and understanding project evolution.
Can nx-import handle importing non-Nx projects like plain npm or pnpm workspaces?
Yes, nx-import supports migrating non-Nx projects into an Nx-managed workspace. Whether your source project is a plain npm workspace, a pnpm workspace, or a standalone project without Nx, the skill can orchestrate the migration. nx-import helps consolidate multiple projects into a monorepo structure and handles the configuration adjustments needed to integrate them into your Nx workspace.
What common issues might arise when importing projects with nx-import, and how are they resolved?
nx-import addresses typical import challenges including dependency conflicts, configuration mismatches, path resolution issues, missing ESLint configs, and Jest preset setup problems. The skill provides troubleshooting guidance for these scenarios. It also helps with application versus library detection during import and handles directory conflicts that may occur when consolidating repositories. nx-import enables you to resolve these issues systematically during the integration process.
How does nx-import help when adopting Nx across multiple repositories?
nx-import facilitates Nx adoption across multiple projects by providing a structured approach to consolidate them into a single monorepo. The skill guides you through importing each repository while maintaining commit history and project integrity. This enables teams to transition from managing separate repositories to a unified Nx-managed workspace, improving code sharing, dependency management, and build orchestration across all projects.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Quick Start
nx importbrings code from a source repository or folder into the current workspace, preserving commit history.- After nx
22.6.0,nx importresponds with .ndjson outputs and follow-up questions. For earlier versions, always run with--no-interactiveand specify all flags directly. - Run
nx import --helpfor available options. - Make sure the destination directory is empty before importing.
EXAMPLE: target has
libs/utilsandlibs/models; source haslibs/uiandlibs/data-access— you cannot importlibs/intolibs/directly. Import each source library individually.
Primary docs:
- https://nx.dev/docs/guides/adopting-nx/import-project
- https://nx.dev/docs/guides/adopting-nx/preserving-git-histories
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,
(truncated - see the full file via the links below)
File tree — 7 files
skills/nx-import/SKILL.md
skills/nx-import/references/ESLINT.md
skills/nx-import/references/GRADLE.md
skills/nx-import/references/JEST.md
skills/nx-import/references/NEXT.md
skills/nx-import/references/TURBOREPO.md
skills/nx-import/references/VITE.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Import or merge existing repositories into an Nx workspace while preserving commit history”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill provides a complete framework for initializing and managing monorepo architectures, including configuration templates, dependency strategies, and workspace organization patterns. It integrates with Claude Code's agent ecosystem to automate setup tasks and enforce consistent project structures across multiple packages.
This skill equips Claude with detailed guidance on setting up and optimizing build configurations across the TanStack ecosystem. It covers toolchain setup, TypeScript patterns, and development best practices to streamline JavaScript package builds.
Master monorepo organization with AI-powered codebase analysis that identifies structural patterns and project conventions. This skill helps you maintain consistency across multi-package projects while preserving architectural decisions between work sessions. Works as an MCP server for your IDE or as an offline CLI tool.
This skill equips Claude Code teams with a production-ready monorepo framework spanning 11 technology stacks and 5 programming languages. It provides sprint-based workflows, continuous build loops, browser-based acceptance testing, and token-optimized code review agents designed for tech leads scaling AI-assisted development across their organization.
This skill enables AI assistants to automatically establish and configure dependency links between packages within an Nx monorepo workspace. It streamlines the process of wiring up package relationships, helping developers maintain clean dependency graphs and avoid manual configuration errors.
This skill streamlines monorepo initialization and configuration across multiple agent platforms. It provides agentic workflow building blocks designed to work natively with Claude Code, Cursor, GitHub Copilot, and other leading development tools from a unified source.