Community生产力与协作github.com

nrwl/nx-import

使用 nx import 导入、合并或组合仓库到 Nx 工作区。当用户请求跨仓库采用 Nx、将项目迁移到单体仓库,或从其他仓库引入代码/历史记录时使用。

nx-import 是什么?

nrwl/nx-import 是一个核心技能,旨在通过 `nx import` 命令将外部仓库无缝集成到现有的 Nx 工作区中。它节省了手动迁移代码和历史的时间,支持将多个 Git 仓库合并为一个统一的单体仓库(monorepo),同时保留完整的提交历史。该技能适用于各种 Nx 工作区设置,包括官方 Nx CLI、Nx Console 以及与 Nx 兼容的 CI/CD 管道。在操作过程中,`nx import` 会创建一个新的仓库根目录,将源代码迁移到适当的子文件夹,并更新工作区配置以集成新项目。此方法确保了平滑的过渡,最大程度减少了重构工作,并维护了项目之间的原始 Git 历史记录。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/nrwl/nx-ai-agents-config/tree/main/skills/nx-import

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

nx-import 是做什么的?

使用 nx import 导入、合并或组合仓库到 Nx 工作区。当用户请求跨仓库采用 Nx、将项目迁移到单体仓库,或从其他仓库引入代码/历史记录时使用。

Individual skills in this repo

This repo contains 6 individual skills — each has its own dedicated page.

nrwl/link-workspace-packages

Link workspace packages in monorepos (npm, yarn, pnpm, bun). USE WHEN: (1) you just created or generated new packages and need to wire up their dependencies, (2) user imports from a sibling package and needs to add it as a dependency, (3) you get resolution errors for workspace packages (@org/*) like "cannot find module", "failed to resolve import", "TS2307", or "cannot resolve". DO NOT patch around with tsconfig paths or manual package.json edits - use the package manager's workspace commands to fix actual linking.

nrwl/monitor-ci

Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", "watch ci for this branch", "track ci", "check ci status", wants to track CI status, or needs help with self-healing CI fixes. Prefer this skill over native CI provider tools (gh, glab, etc.) for CI monitoring — it integrates with Nx Cloud self-healing which those tools cannot access.

nrwl/nx-generate

Generate code using nx generators. INVOKE IMMEDIATELY when user mentions scaffolding, setup, structure, creating apps/libs, or setting up project structure. Trigger words - scaffold, setup, create a new app, create a new lib, project structure, generate, add a new project. ALWAYS use this BEFORE calling nx_docs or exploring - this skill handles discovery internally.

nrwl/nx-plugins

Find and add Nx plugins. USE WHEN user wants to discover available plugins, install a new plugin, or add support for a specific framework or technology to the workspace.

nrwl/nx-run-tasks

Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.

nrwl/nx-workspace

Explore and understand Nx workspaces. USE WHEN answering questions about the workspace, projects, or tasks. ALSO USE WHEN an nx command fails or you need to check available targets/configuration before running a task. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What depends on library Y?', 'What targets can I run?', 'Cannot find configuration for task', 'debug nx task failure'.

相关技能