nx-import

Import external repositories into an Nx workspace with history preservation.

7|2|Updated Jan 12, 2024
One-click install
npx skills add https://github.com/wghglory/ngx-lift-workspace --skill nx-import-wghglory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-import
Source: https://github.com/wghglory/ngx-lift-workspace/tree/main/.opencode/skills/nx-import
Command: npx skills add https://github.com/wghglory/ngx-lift-workspace --skill nx-import-wghglory

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you bring external repositories into an Nx workspace without breaking project structure, workspace conventions, or development tooling. It reduces the manual cleanup normally required when adopting Nx or consolidating multiple repos into a monorepo.

Core Features & Use Cases

  • Repository Import Strategy: Determines whether a source should be imported as an application or a library and places it in the correct workspace location.
  • Workspace Repair and Alignment: Guides fixes for pnpm workspaces, TypeScript project references, ESLint, Jest, Vite, Next.js, and other Nx plugin integrations after import.
  • Migration Scenarios: Useful for adopting Nx across existing repos, moving apps and libraries into a monorepo, preserving git history, and resolving config conflicts from Turborepo or standalone setups.
  • Safety and Validation: Emphasizes dependency reconciliation, target inference, and post-import checks so the workspace remains buildable, testable, and lintable.

Quick Start

Ask the assistant to import the selected repository into the current Nx workspace while preserving history and adjusting the destination layout to match the workspace conventions.

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?

Importing a repository into an Nx workspace involves aligning directories, reconciling dependencies and configs, and setting up Nx plugins for lint, test, typecheck, and build targets. The process determines whether the source becomes an application or a library and places it in the correct location.

Can I preserve git history when moving apps and libraries into a monorepo?

Yes, you can preserve git history when moving apps and libraries into a monorepo. The import process handles history-preserving merges across existing codebases, ensuring commit history remains intact while adopting Nx workspace conventions.

What is the best way to migrate from Turborepo to an Nx workspace?

Migrating from Turborepo to an Nx workspace requires resolving config conflicts and repairing workspace alignment. The import process reconciles pnpm workspaces, TypeScript project references, ESLint, Jest, Vite, and Next.js integrations to keep the monorepo buildable and lintable.

How do I fix TypeScript project references and ESLint configs after a monorepo adoption?

Fixing TypeScript project references and ESLint configs after monorepo adoption requires workspace repair and alignment. You reconcile dependencies and adjust Nx plugin setups to ensure target inference and post-import checks keep the workspace buildable and lintable.

Does importing standalone repositories into Nx require manual dependency reconciliation?

Yes, importing standalone repositories into Nx requires dependency reconciliation. The process emphasizes aligning workspace directories and resolving config conflicts to ensure safety and validation, keeping the consolidated workspace buildable, testable, and lintable after the merge.