nx-import

Import and merge source repositories into an Nx workspace while preserving git history.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/braxtondiggs/Chansey --skill nx-import
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-import
Source: https://github.com/braxtondiggs/Chansey/tree/main/.github/skills/nx-import
Command: npx skills add https://github.com/braxtondiggs/Chansey --skill nx-import

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill documents how to import, merge, or combine external repositories or subdirectories into an existing Nx workspace while preserving commit history and avoiding common post-import breakages. It addresses the friction of adopting Nx across multiple repos, resolving workspace globs, dependency mismatches, TypeScript project reference errors, and plugin/ESLint/test configuration drift that typically follow an import.

Core Features & Use Cases

  • Preserve Git History: Guidance for using nx import to retain commit history during migration.
  • Import Strategies: Recommendations for subdirectory-at-a-time versus whole-repo imports and when to use each.
  • Post-Import Fixes: Actionable fixes for pnpm workspace globs, root dependencies and nx.json merges, explicit executor path adjustments, TypeScript project reference sync, ESLint and Jest/Vite/Next plugin setup, and Turborepo config migrations.
  • Use Case: Consolidate multiple service and library repositories into a single monorepo, migrate a create-next-app into apps/, or bring legacy pnpm workspaces under Nx control while preserving CI and dev workflows.

Quick Start

Run nx import to move a source repository or project into your Nx workspace while preserving its git history, then apply the documented fixes for pnpm workspace globs, root dependency merges, TypeScript references, and required Nx plugins.

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 while preserving git history?

To import a repository into an Nx workspace while preserving git history, run the nx import command to move your source repository or project, then apply fixes for pnpm workspace globs, root dependency merges, and TypeScript references to finalize the migration.

What is the best way to migrate a pnpm workspace into an Nx monorepo?

Migrating a pnpm workspace into an Nx monorepo involves importing the source repository and then fixing pnpm workspace globs, merging root package.json settings, and adjusting nx.json configurations to successfully integrate the existing workspace structure under Nx control.

How do I fix TypeScript project reference errors after moving a project into an Nx workspace?

Fixing TypeScript project reference errors after an Nx import requires adjusting TypeScript project references and executor paths to align with the new monorepo structure, ensuring the imported project correctly resolves dependencies within the Nx workspace.

Can I migrate a Turborepo configuration into an Nx workspace?

Yes, you can migrate a Turborepo configuration into an Nx workspace by importing the source repository and applying the documented guidance for translating and adjusting Turborepo-style configs to fit the Nx monorepo structure and executor requirements.

What post-import fixes are needed when consolidating multiple repositories into an Nx monorepo?

Post-import fixes for consolidating repositories into an Nx monorepo include merging root dependencies, adjusting nx.json settings, fixing pnpm workspace globs, syncing TypeScript project references, and setting up required ESLint, Nx plugin, and test-preset configurations.

Does importing a Next.js or Vite project into an Nx workspace require plugin setup?

Yes, importing Next.js or Vite projects into an Nx workspace requires guiding Nx plugin, ESLint, and test-preset setup to ensure the imported applications function correctly and align with the workspace's existing development and CI workflows.