[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75MP3ZGAP5S2YQWR69M0AVF":3,"skill-same:01M75MP3ZGAP5S2YQWR69M0AVF":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M75MP3ZGAP5S2YQWR69M0AVF","nx-import",null,"Import, merge, or combine repositories into an Nx workspace using nx import. USE WHEN the user asks to adopt Nx across repos, move projects into a monorepo, or bring code\u002Fhistory from another repository.","whimzyLive\u002Fnightshift-ai","whimzyLive","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F22066605?v=4","01M75MMH22XX6R3NTAFHD7HEN7","Rushi Patel","01M75MMH32DHVVC61XRSHWVEV2",3,"MIT","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnx-import\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: nx-import\ndescription: Import, merge, or combine repositories into an Nx workspace using nx import. USE WHEN the user asks to adopt Nx across repos, move projects into a monorepo, or bring code\u002Fhistory from another repository.\n---\n\n## Quick Start\n\n- `nx import` brings code from a source repository or folder into the current workspace, preserving commit history.\n- After nx `22.6.0`, `nx import` responds with .ndjson outputs and follow-up questions. For earlier versions, always run with `--no-interactive` and specify all flags directly.\n- Run `nx import --help` for available options.\n- Make sure the destination directory is empty before importing.\n  EXAMPLE: target has `libs\u002Futils` and `libs\u002Fmodels`; source has `libs\u002Fui` and `libs\u002Fdata-access` — you cannot import `libs\u002F` into `libs\u002F` directly. Import each source library individually.\n\nPrimary docs:\n\n- https:\u002F\u002Fnx.dev\u002Fdocs\u002Fguides\u002Fadopting-nx\u002Fimport-project\n- https:\u002F\u002Fnx.dev\u002Fdocs\u002Fguides\u002Fadopting-nx\u002Fpreserving-git-histories\n\nRead the nx docs if you have the tools for it.\n\n## Import Strategy\n\n**Subdirectory-at-a-time** (`nx import \u003Csource> apps --source=apps`):\n\n- **Recommended for monorepo sources** — files land at top level, no redundant config\n- Caveats: multiple import commands (separate merge commits each); dest must not have conflicting directories; root configs (deps, plugins, targetDefaults) not imported\n- **Directory conflicts**: Import into alternate-named dir (e.g. `imported-apps\u002F`), then rename\n\n**Whole repo** (`nx import \u003Csource> imported --source=.`):\n\n- **Only for non-monorepo sources** (single-project repos)\n- For monorepos, creates messy nested config (`imported\u002Fnx.json`, `imported\u002Ftsconfig.base.json`, etc.)\n- If you must: keep imported `tsconfig.base.json` (projects extend it), prefix workspace globs and executor paths\n\n### Directory Conventions\n\n- **Always prefer the destination's existing conventions.** Source uses `libs\u002F`but dest uses `packages\u002F`? Import into `packages\u002F` (`nx import \u003Csource> packages\u002Ffoo --source=libs\u002Ffoo`).\n- If dest has no convention (empty workspace), ask the user.\n\n### Application vs Library Detection\n\nBefore importing, identify whether the source is an **application** or a **library**:\n\n- **Applications**: Deployable end products. Common indicators:\n  - _Frontend_: `next.config.*`, `vite.config.*` with a build entry point, framework-specific app scaffolding (CRA, Angular CLI app, etc.)\n  - _Backend (Node.js)_: Express\u002FFastify\u002FNestJS server entrypoint, no `\"exports\"` field in `package.json`\n  - _JVM_: Maven `pom.xml` with `\u003Cpackaging>jar\u003C\u002Fpackaging>` or `\u003Cpackaging>war\u003C\u002Fpackaging>` and a `main` class; Gradle `application` plugin or `mainClass` setting\n  - _.NET_: `.csproj`\u002F`.fsproj` with `\u003COutputType>Exe\u003C\u002FOutputType>` or `\u003COutputType>WinExe\u003C\u002FOutputType>`\n  - _General_: Dockerfile, a runnable entrypoint, no public API surface intended for import by other projects\n- **Libraries**: Reusable packages consumed by other projects. Common indicators: `\"main\"`\u002F`\"exports\"` in `package.json`, Maven\u002FGradle packaging as a library jar, .NET `\u003COutputType>Library\u003C\u002FOutputType>`, named exports intended for import by other packages.\n\n**Destination directory rules**:\n\n- Applications → `apps\u002F\u003Cname>`. Check workspace globs (e.g. `pnpm-workspace.yaml`, `workspaces` in root `package.json`) for an existing `apps\u002F*` entry.\n  - If `apps\u002F*` is **not** present, add it before importing: update the workspace glob config and commit (or stage) the change.\n  - Example: `nx import \u003Csource> apps\u002Fmy-app --source=packages\u002Fmy-app`\n- Libraries → follow the dest's existing convention (`packages\u002F`, `libs\u002F`, etc.).\n\n## Common Issues\n\n### pnpm Workspace Globs (Critical)\n\n`nx import` adds the imported directory itself (e.g. `apps`) to `pnpm-workspace.yaml`, **NOT** glob patterns for packages within it. Cross-package imports will fail with `Cannot find module`.\n\n**Fix**: Replace with proper globs from the source config (e.g. `apps\u002F*`, `libs\u002Fshared\u002F*`), then `pnpm install`.\n\n### Root Dependencies and Config Not Imported (Critical)\n\n`nx import` does **NOT** merge from the source's root:\n\n- `dependencies`\u002F`devDependencies` from `package.json`\n- `targetDefaults` from `nx.json` (e.g. `\"@nx\u002Fesbuild:esbuild\": { \"dependsOn\": [\"^build\"] }` — critical for build ordering)\n- `namedInputs` from `nx.json` (e.g. `production` exclusion patterns for test files)\n- Plugin configurations from `nx.json`\n\n**Fix**: Diff source and dest `package.json` + `nx.json`. Add missing deps, merge relevant `targetDefaults` and `namedInputs`.\n\n### TypeScript Project References\n\nAfter import, run `nx sync --yes`. If it reports nothing but typecheck still fails, `nx reset` first, then `nx sync --yes` again.\n\n### Explicit Executor Path Fixups\n\nInferred targets (via Nx plugins) resolve config relative to project root — no changes needed. Explicit executor targets (e.g. `@nx\u002Fesbuild:esbuild`) have workspace-root-relative paths (`main`, `outputPath`, `tsConfig`, `assets`, `sourceRoot`) that must be prefixed with the import destination directory.\n\n### Plugin Detection\n\n- **Whole-repo import**: `nx import` detects and offers to install plugins. Accept them.\n- **Subdirectory import**: Plugins NOT auto-detected. Manually add with `npx nx add @nx\u002FPLUGIN`. Check `include`\u002F`exclude` patterns — defaults won't match alternate directories (e.g. `apps-beta\u002F`).\n- Run `npx nx reset` after any plugin config changes.\n\n### Redundant Root Files (Whole-Repo Only)\n\nWhole-repo import brings ALL source root files into the dest subdirectory. Clean up:\n\n- `pnpm-lock.yaml` — stale; dest has its own lockfile\n- `pnpm-workspace.yaml` — source workspace config; conflicts with dest\n- `node_modules\u002F` — stale symlinks pointing to source filesystem\n- `.gitignore` — redundant with dest root `.gitignore`\n- `nx.json` — source Nx config; dest has its own\n- `README.md` — optional; keep or remove\n\n**Don't blindly delete** `tsconfig.base.json` — imported projects may extend it via relative paths.\n\n### Root ESLint Config Missing (Subdirectory Import)\n\nSubdirectory import doesn't bring the source's root `eslint.config.mjs`, but project configs reference `..\u002F..\u002Feslint.config.mjs`.\n\n**Fix order**:\n\n1. Install ESLint deps first: `pnpm add -wD eslint@^9 @nx\u002Feslint-plugin typescript-eslint` (plus framework-specific plugins)\n2. Create root `eslint.config.mjs` (copy from source or create with `@nx\u002Feslint-plugin` base rules)\n3. Then `npx nx add @nx\u002Feslint` to register the plugin in `nx.json`\n\nInstall `typescript-eslint` explicitly — pnpm's strict hoisting won't auto-resolve this transitive dep of `@nx\u002Feslint-plugin`.\n\n### ESLint Version Pinning (Critical)\n\n**Pin ESLint to v9** (`eslint@^9.0.0`). ESLint 10 breaks `@nx\u002Feslint` and many plugins with cryptic errors like `Cannot read properties of undefined (reading 'version')`.\n\n`@nx\u002Feslint` may peer-depend on ESLint 8, causing the wrong version to resolve. If lint fails with `Cannot read properties of undefined (reading 'allow')`, add `pnpm.overrides`:\n\n```json\n{ \"pnpm\": { \"overrides\": { \"eslint\": \"^9.0.0\" } } }\n```\n\n### Dependency Version Conflicts\n\nAfter import, compare key deps (`typescript`, `eslint`, framework-specific). If dest uses newer versions, upgrade imported packages to match (usually safe). If source is newer, may need to upgrade dest first. Use `pnpm.overrides` to enforce single-version policy if desired.\n\n### Module Boundaries\n\nImported projects may lack `tags`. Add tags or update `@nx\u002Fenforce-module-boundaries` rules.\n\n### Project Name Collisions (Multi-Import)\n\nSame `name` in `package.json` across source and dest causes `MultipleProjectsWithSameNameError`. **Fix**: Rename conflicting names (e.g. `@org\u002Fapi` → `@org\u002Fteama-api`), update all dep references and import statements, `pnpm install`. The root `package.json` of each imported repo also becomes a project — rename those too.\n\n### Workspace Dep Import Ordering\n\n`pnpm install` fails during `nx import` if a `\"workspace:*\"` dependency hasn't been imported yet. File operations still succeed. **Fix**: Import all projects first, then `pnpm install --no-frozen-lockfile`.\n\n### `.gitkeep` Blocking Subdirectory Import\n\nThe TS preset creates `packages\u002F.gitkeep`. Remove it and commit before importing.\n\n### Frontend tsconfig Base Settings (Critical)\n\nThe TS preset defaults (`module: \"nodenext\"`, `moduleResolution: \"nodenext\"`, `lib: [\"es2022\"]`) are incompatible with frontend frameworks (React, Next.js, Vue, Vite). After importing frontend projects, verify the dest root `tsconfig.base.json`:\n\n- **`moduleResolution`**: Must be `\"bundler\"` (not `\"nodenext\"`)\n- **`module`**: Must be `\"esnext\"` (not `\"nodenext\"`)\n- **`lib`**: Must include `\"dom\"` and `\"dom.iterable\"` (frontend projects need these)\n- **`jsx`**: `\"react-jsx\"` for React-only workspaces, per-project for mixed frameworks\n\nFor **subdirectory imports**, the dest root tsconfig is authoritative — update it. For **whole-repo imports**, imported projects may extend their own nested `tsconfig.base.json`, making this less critical.\n\nIf the dest also has backend projects needing `nodenext`, use per-project overrides instead of changing the root.\n\n**Gotcha**: TypeScript does NOT merge `lib` arrays — a project-level override **replaces** the base array entirely. Always include all needed entries (e.g. `es2022`, `dom`, `dom.iterable`) in any project-level `lib`.\n\n### `@nx\u002Freact` Typings for Libraries\n\nReact libraries generated with `@nx\u002Freact:library` reference `@nx\u002Freact\u002Ftypings\u002Fcssmodule.d.ts` and `@nx\u002Freact\u002Ftypings\u002Fimage.d.ts` in their tsconfig `types`. These fail with `Cannot find type definition file` unless `@nx\u002Freact` is installed in the dest workspace.\n\n**Fix**: `pnpm add -wD @nx\u002Freact`\n\n### Jest Preset Missing (Subdirectory Import)\n\nNx presets create `jest.preset.js` at the workspace root, and project jest configs reference it (e.g. `..\u002F..\u002Fjest.preset.js`). Subdirectory import does NOT bring this file.\n\n**Fix**:\n\n1. Run `npx nx add @nx\u002Fjest` — registers `@nx\u002Fjest\u002Fplugin` in `nx.json` and updates `namedInputs`\n2. Create `jest.preset.js` at workspace root (see `references\u002FJEST.md` for content) — `nx add` only creates this when a generator runs, not on bare `nx add`\n3. Install test runner deps: `pnpm add -wD jest jest-environment-jsdom ts-jest @types\u002Fjest`\n4. Install framework-specific test deps as needed (see `references\u002FJEST.md`)\n\nFor deeper Jest issues (tsconfig.spec.json, Babel transforms, CI atomization, Jest vs Vitest coexistence), see `references\u002FJEST.md`.\n\n### Target Name Prefixing (Whole-Repo Import)\n\nWhen importing a project with existing npm scripts (`build`, `dev`, `start`, `lint`), Nx plugins auto-prefix inferred target names to avoid conflicts: e.g. `next:build`, `vite:build`, `eslint:lint`.\n\n**Fix**: Remove the Nx-rewritten npm scripts from the imported `package.json`, then either:\n\n- Accept the prefixed names (e.g. `nx run app:next:build`)\n- Rename plugin target names in `nx.json` to use unprefixed names\n\n## Non-Nx Source Issues\n\nWhen the source is a plain pnpm\u002Fnpm workspace without `nx.json`.\n\n### npm Script Rewriting (Critical)\n\nNx rewrites `package.json` scripts during init, creating broken commands (e.g. `vitest run` → `nx test run`). **Fix**: Remove all rewritten scripts — Nx plugins infer targets from config files.\n\n### `noEmit` → `composite` + `emitDeclarationOnly` (Critical)\n\nPlain TS projects use `\"noEmit\": true`, incompatible with Nx project references.\n\n**Symptoms**: \"typecheck target is disabled because one or more project references set 'noEmit: true'\" or TS6310.\n\n**Fix** in **all** imported tsconfigs:\n\n1. Remove `\"noEmit\": true`. If inherited via extends chain, set `\"noEmit\": false` explicitly.\n2. Add `\"composite\": true`, `\"emitDeclarationOnly\": true`, `\"declarationMap\": true`\n3. Add `\"outDir\": \"dist\"` and `\"tsBuildInfoFile\": \"dist\u002Ftsconfig.tsbuildinfo\"`\n4. Add `\"extends\": \"..\u002F..\u002Ftsconfig.base.json\"` if missing. Remove settings now inherited from base.\n\n### Stale node_modules and Lockfiles\n\n`nx import` may bring `node_modules\u002F` (pnpm symlinks pointing to the source filesystem) and `pnpm-lock.yaml` from the source. Both are stale.\n\n**Fix**: `rm -rf imported\u002Fnode_modules imported\u002Fpnpm-lock.yaml imported\u002Fpnpm-workspace.yaml imported\u002F.gitignore`, then `pnpm install`.\n\n### ESLint Config Handling\n\n- **Legacy `.eslintrc.json` (ESLint 8)**: Delete all `.eslintrc.*`, remove v8 deps, create flat `eslint.config.mjs`.\n- **Flat config (`eslint.config.js`)**: Self-contained configs can often be left as-is.\n- **No ESLint**: Create both root and project-level configs from scratch.\n\n### TypeScript `paths` Aliases\n\nNx uses `package.json` `\"exports\"` + pnpm workspace linking instead of tsconfig `\"paths\"`. If packages have proper `\"exports\"`, paths are redundant. Otherwise, update paths for the new directory structure.\n\n## Technology-specific Guidance\n\nIdentify technologies in the source repo, then read and apply the matching reference file(s).\n\nAvailable references:\n\n- `references\u002FESLINT.md` — ESLint projects: duplicate `lint`\u002F`eslint:lint` targets, legacy `.eslintrc.*` linting generated files, flat config `.cjs` self-linting, `typescript-eslint` v7\u002Fv9 peer dep conflict, mixed ESLint v8+v9 in one workspace.\n- `references\u002FGRADLE.md`\n- `references\u002FJEST.md` — Jest testing: `@nx\u002Fjest\u002Fplugin` setup, jest.preset.js, testing deps by framework, tsconfig.spec.json, Jest vs Vitest coexistence, Babel transforms, CI atomization.\n- `references\u002FNEXT.md` — Next.js projects: `@nx\u002Fnext\u002Fplugin` targets, `withNx`, Next.js TS config (`noEmit`, `jsx: \"preserve\"`), auto-installing deps via wrong PM, non-Nx `create-next-app` imports, mixed Next.js+Vite coexistence.\n- `references\u002FTURBOREPO.md`\n- `references\u002FVITE.md` — Vite projects (React, Vue, or both): `@nx\u002Fvite\u002Fplugin` typecheck target, `resolve.alias`\u002F`__dirname` fixes, framework deps, Vue-specific setup, mixed React+Vue coexistence.\n","## Quick Start\n\n- `nx import` brings code from a source repository or folder into the current workspace, preserving commit history.\n- After nx `22.6.0`, `nx import` responds with .ndjson outputs and follow-up questions. For earlier versions, always run with `--no-interactive` and specify all flags directly.\n- Run `nx import --help` for available options.\n- Make sure the destination directory is empty before importing.\n  EXAMPLE: target has `libs\u002Futils` and `libs\u002Fmodels`; source has `libs\u002Fui` and `libs\u002Fdata-access` — you cannot import `libs\u002F` into `libs\u002F` directly. Import each source library individually.\n\nPrimary docs:\n\n- https:\u002F\u002Fnx.dev\u002Fdocs\u002Fguides\u002Fadopting-nx\u002Fimport-project\n- https:\u002F\u002Fnx.dev\u002Fdocs\u002Fguides\u002Fadopting-nx\u002Fpreserving-git-histories\n\nRead the nx docs if you have the tools for it.\n\n## Import Strategy\n\n**Subdirectory-at-a-time** (`nx import \u003Csource> apps --source=apps`):\n\n- **Recommended for monorepo sources** — files land at top level, no redundant config\n- Caveats: multiple import commands (separate merge commits each); dest must not have conflicting directories; root configs (deps, plugins, targetDefaults) not imported\n- **Directory conflicts**: Import into alternate-named dir (e.g. `imported-apps\u002F`), then rename\n\n**Whole repo** (`nx import \u003Csource> imported --source=.`):\n\n- **Only for non-monorepo sources** (single-project repos)\n- For monorepos, creates messy nested config (`imported\u002Fnx.json`, `imported\u002Ftsconfig.base.json`, etc.)\n- If you must: keep imported `tsconfig.base.json` (projects extend it), prefix workspace globs and executor paths\n\n### Directory Conventions\n\n- **Always prefer the destination's existing conventions.** Source uses `libs\u002F`but dest uses `packages\u002F`? Import into `packages\u002F` (`nx import \u003Csource> packages\u002Ffoo --source=libs\u002Ffoo`).\n- If dest has no convention (empty workspace), ask the user.\n\n### Application vs Library Detection\n\nBefore importing, identify whether the source is an **application** or a **library**:\n\n- **Applications**: Deployable end products. Common indicators:\n  - _Frontend_: `next.config.*`, `vite.config.*` with a build entry point, framework-specific app scaffolding (CRA, Angular CLI app, etc.)\n  - _Backend (Node.js)_: Express\u002FFastify\u002FNestJS server entrypoint, no `\"exports\"` field in `package.json`\n  - _JVM_: Maven `pom.xml` with `\u003Cpackaging>jar\u003C\u002Fpackaging>` or `\u003Cpackaging>war\u003C\u002Fpackaging>` and a `main` class; Gradle `application` plugin or `mainClass` setting\n  - _.NET_: `.csproj`\u002F`.fsproj` with `\u003COutputType>Exe\u003C\u002FOutputType>` or `\u003COutputType>WinExe\u003C\u002FOutputType>`\n  - _General_: Dockerfile, a runnable entrypoint, no public API surface intended for import by other projects\n- **Libraries**: Reusable packages consumed by other projects. Common indicators: `\"main\"`\u002F`\"exports\"` in `package.json`, Maven\u002FGradle packaging as a library jar, .NET `\u003COutputType>Library\u003C\u002FOutputType>`, named exports intended for import by other packages.\n\n**Destination directory rules**:\n\n- Applications → `apps\u002F\u003Cname>`. Check workspace globs (e.g. `pnpm-workspace.yaml`, `workspaces` in root `package.json`) for an existing `apps\u002F*` entry.\n  - If `apps\u002F*` is **not** present, add it before importing: update the workspace glob config and commit (or stage) the change.\n  - Example: `nx import \u003Csource> apps\u002Fmy-app --source=packages\u002Fmy-app`\n- Libraries → follow the dest's existing convention (`packages\u002F`, `libs\u002F`, etc.).\n\n## Common Issues\n\n### pnpm Workspace Globs (Critical)\n\n`nx import` adds the imported directory itself (e.g. `apps`) to `pnpm-workspace.yaml`, **NOT** glob patterns for packages within it. Cross-package imports will fail with `Cannot find module`.\n\n**Fix**: Replace with proper globs from the source config (e.g. `apps\u002F*`, `libs\u002Fshared\u002F*`), then `pnpm install`.\n\n### Root Dependencies and Config Not Imported (Critical)\n\n`nx import` does **NOT** merge from the source's root:\n\n- `dependencies`\u002F`devDependencies` from `package.json`\n- `targetDefaults` from `nx.json` (e.g. `\"@nx\u002Fesbuild:esbuild\": { \"dependsOn\": [\"^build\"] }` — critical for build ordering)\n- `namedInputs` from `nx.json` (e.g. `production` exclusion patterns for test files)\n- Plugin configurations from `nx.json`\n\n**Fix**: Diff source and dest `package.json` + `nx.json`. Add missing deps, merge relevant `targetDefaults` and `namedInputs`.\n\n### TypeScript Project References\n\nAfter import, run `nx sync --yes`. If it reports nothing but typecheck still fails, `nx reset` first, then `nx sync --yes` again.\n\n### Explicit Executor Path Fixups\n\nInferred targets (via Nx plugins) resolve config relative to project root — no changes needed. Explicit executor targets (e.g. `@nx\u002Fesbuild:esbuild`) have workspace-root-relative paths (`main`, `outputPath`, `tsConfig`, `assets`, `sourceRoot`) that must be prefixed with the import destination directory.\n\n### Plugin Detection\n\n- **Whole-repo import**: `nx import` detects and offers to install plugins. Accept them.\n- **Subdirectory import**: Plugins NOT auto-detected. Manually add with `npx nx add @nx\u002FPLUGIN`. Check `include`\u002F`exclude` patterns — defaults won't match alternate directories (e.g. `apps-beta\u002F`).\n- Run `npx nx reset` after any plugin config changes.\n\n### Redundant Root Files (Whole-Repo Only)\n\nWhole-repo import brings ALL source root files into the dest subdirectory. Clean up:\n\n- `pnpm-lock.yaml` — stale; dest has its own lockfile\n- `pnpm-workspace.yaml` — source workspace config; conflicts with dest\n- `node_modules\u002F` — stale symlinks pointing to source filesystem\n- `.gitignore` — redundant with dest root `.gitignore`\n- `nx.json` — source Nx config; dest has its own\n- `README.md` — optional; keep or remove\n\n**Don't blindly delete** `tsconfig.base.json` — imported projects may extend it via relative paths.\n\n### Root ESLint Config Missing (Subdirectory Import)\n\nSubdirectory import doesn't bring the source's root `eslint.config.mjs`, but project configs reference `..\u002F..\u002Feslint.config.mjs`.\n\n**Fix order**:\n\n1. Install ESLint deps first: `pnpm add -wD eslint@^9 @nx\u002Feslint-plugin typescript-eslint` (plus framework-specific plugins)\n2. Create root `eslint.config.mjs` (copy from source or create with `@nx\u002Feslint-plugin` base rules)\n3. Then `npx nx add @nx\u002Feslint` to register the plugin in `nx.json`\n\nInstall `typescript-eslint` explicitly — pnpm's strict hoisting won't auto-resolve this transitive dep of `@nx\u002Feslint-plugin`.\n\n### ESLint Version Pinning (Critical)\n\n**Pin ESLint to v9** (`eslint@^9.0.0`). ESLint 10 breaks `@nx\u002Feslint` and many plugins with cryptic errors like `Cannot read properties of undefined (reading 'version')`.\n\n`@nx\u002Feslint` may peer-depend on ESLint 8, causing the wrong version to resolve. If lint fails with `Cannot read properties of undefined (reading 'allow')`, add `pnpm.overrides`:\n\n```json\n{ \"pnpm\": { \"overrides\": { \"eslint\": \"^9.0.0\" } } }\n```\n\n### Dependency Version Conflicts\n\nAfter import, compare key deps (`typescript`, `eslint`, framework-specific). If dest uses newer versions, upgrade imported packages to match (usually safe). If source is newer, may need to upgrade dest first. Use `pnpm.overrides` to enforce single-version policy if desired.\n\n### Module Boundaries\n\nImported projects may lack `tags`. Add tags or update `@nx\u002Fenforce-module-boundaries` rules.\n\n### Project Name Collisions (Multi-Import)\n\nSame `name` in `package.json` across source and dest causes `MultipleProjectsWithSameNameError`. **Fix**: Rename conflicting names (e.g. `@org\u002Fapi` → `@org\u002Fteama-api`), update all dep references and import statements, `pnpm install`. The root `package.json` of each imported repo also becomes a project — rename those too.\n\n### Workspace Dep Import Ordering\n\n`pnpm install` fails during `nx import` if a `\"workspace:*\"` dependency hasn't been imported yet. File operations still succeed. **Fix**: Import all projects first, then `pnpm install --no-frozen-lockfile`.\n\n### `.gitkeep` Blocking Subdirectory Import\n\nThe TS preset creates `packages\u002F.gitkeep`. Remove it and commit before importing.\n\n### Frontend tsconfig Base Settings (Critical)\n\nThe TS preset defaults (`module: \"nodenext\"`, `moduleResolution: \"nodenext\"`, `lib: [\"es2022\"]`) are incompatible with frontend frameworks (React, Next.js, Vue, Vite). After importing frontend projects, verify the dest root `tsconfig.base.json`:\n\n- **`moduleResolution`**: Must be `\"bundler\"` (not `\"nodenext\"`)\n- **`module`**: Must be `\"esnext\"` (not `\"nodenext\"`)\n- **`lib`**: Must include `\"dom\"` and `\"dom.iterable\"` (frontend projects need these)\n- **`jsx`**: `\"react-jsx\"` for React-only workspaces, per-project for mixed frameworks\n\nFor **subdirectory imports**, the dest root tsconfig is authoritative — update it. For **whole-repo imports**, imported projects may extend their own nested `tsconfig.base.json`, making this less critical.\n\nIf the dest also has backend projects needing `nodenext`, use per-project overrides instead of changing the root.\n\n**Gotcha**: TypeScript does NOT merge `lib` arrays — a project-level override **replaces** the base array entirely. Always include all needed entries (e.g. `es2022`, `dom`, `dom.iterable`) in any project-level `lib`.\n\n### `@nx\u002Freact` Typings for Libraries\n\nReact libraries generated with `@nx\u002Freact:library` reference `@nx\u002Freact\u002Ftypings\u002Fcssmodule.d.ts` and `@nx\u002Freact\u002Ftypings\u002Fimage.d.ts` in their tsconfig `types`. These fail with `Cannot find type definition file` unless `@nx\u002Freact` is installed in the dest workspace.\n\n**Fix**: `pnpm add -wD @nx\u002Freact`\n\n### Jest Preset Missing (Subdirectory Import)\n\nNx presets create `jest.preset.js` at the workspace root, and project jest configs reference it (e.g. `..\u002F..\u002Fjest.preset.js`). Subdirectory import does NOT bring this file.\n\n**Fix**:\n\n1. Run `npx nx add @nx\u002Fjest` — registers `@nx\u002Fjest\u002Fplugin` in `nx.json` and updates `namedInputs`\n2. Create `jest.preset.js` at workspace root (see `references\u002FJEST.md` for content) — `nx add` only creates this when a generator runs, not on bare `nx add`\n3. Install test runner deps: `pnpm add -wD jest jest-environment-jsdom ts-jest @types\u002Fjest`\n4. Install framework-specific test deps as needed (see `references\u002FJEST.md`)\n\nFor deeper Jest issues (tsconfig.spec.json, Babel transforms, CI atomization, Jest vs Vitest coexistence), see `references\u002FJEST.md`.\n\n### Target Name Prefixing (Whole-Repo Import)\n\nWhen importing a project with existing npm scripts (`build`, `dev`, `start`, `lint`), Nx plugins auto-prefix inferred target names to avoid conflicts: e.g. `next:build`, `vite:build`, `eslint:lint`.\n\n**Fix**: Remove the Nx-rewritten npm scripts from the imported `package.json`, then either:\n\n- Accept the prefixed names (e.g. `nx run app:next:build`)\n- Rename plugin target names in `nx.json` to use unprefixed names\n\n## Non-Nx Source Issues\n\nWhen the source is a plain pnpm\u002Fnpm workspace without `nx.json`.\n\n### npm Script Rewriting (Critical)\n\nNx rewrites `package.json` scripts during init, creating broken commands (e.g. `vitest run` → `nx test run`). **Fix**: Remove all rewritten scripts — Nx plugins infer targets from config files.\n\n### `noEmit` → `composite` + `emitDeclarationOnly` (Critical)\n\nPlain TS projects use `\"noEmit\": true`, incompatible with Nx project references.\n\n**Symptoms**: \"typecheck target is disabled because one or more project references set 'noEmit: true'\" or TS6310.\n\n**Fix** in **all** imported tsconfigs:\n\n1. Remove `\"noEmit\": true`. If inherited via extends chain, set `\"noEmit\": false` explicitly.\n2. Add `\"composite\": true`, `\"emitDeclarationOnly\": true`, `\"declarationMap\": true`\n3. Add `\"outDir\": \"dist\"` and `\"tsBuildInfoFile\": \"dist\u002Ftsconfig.tsbuildinfo\"`\n4. Add `\"extends\": \"..\u002F..\u002Ftsconfig.base.json\"` if missing. Remove settings now inherited from base.\n\n### Stale node_modules and Lockfiles\n\n`nx import` may bring `node_modules\u002F` (pnpm symlinks pointing to the source filesystem) and `pnpm-lock.yaml` from the source. Both are stale.\n\n**Fix**: `rm -rf imported\u002Fnode_modules imported\u002Fpnpm-lock.yaml imported\u002Fpnpm-workspace.yaml imported\u002F.gitignore`, then `pnpm install`.\n\n### ESLint Config Handling\n\n- **Legacy `.eslintrc.json` (ESLint 8)**: Delete all `.eslintrc.*`, remove v8 deps, create flat `eslint.config.mjs`.\n- **Flat config (`eslint.config.js`)**: Self-contained configs can often be left as-is.\n- **No ESLint**: Create both root and project-level configs from scratch.\n\n### TypeScript `paths` Aliases\n\nNx uses `package.json` `\"exports\"` + pnpm workspace linking instead of tsconfig `\"paths\"`. If packages have proper `\"exports\"`, paths are redundant. Otherwise, update paths for the new directory structure.\n\n## Technology-specific Guidance\n\nIdentify technologies in the source repo, then read and apply the matching reference file(s).\n\nAvailable references:\n\n- `references\u002FESLINT.md` — ESLint projects: duplicate `lint`\u002F`eslint:lint` targets, legacy `.eslintrc.*` linting generated files, flat config `.cjs` self-linting, `typescript-eslint` v7\u002Fv9 peer dep conflict, mixed ESLint v8+v9 in one workspace.\n- `references\u002FGRADLE.md`\n- `references\u002FJEST.md` — Jest testing: `@nx\u002Fjest\u002Fplugin` setup, jest.preset.js, testing deps by framework, tsconfig.spec.json, Jest vs Vitest coexistence, Babel transforms, CI atomization.\n- `references\u002FNEXT.md` — Next.js projects: `@nx\u002Fnext\u002Fplugin` targets, `withNx`, Next.js TS config (`noEmit`, `jsx: \"preserve\"`), auto-installing deps via wrong PM, non-Nx `create-next-app` imports, mixed Next.js+Vite coexistence.\n- `references\u002FTURBOREPO.md`\n- `references\u002FVITE.md` — Vite projects (React, Vue, or both): `@nx\u002Fvite\u002Fplugin` typecheck target, `resolve.alias`\u002F`__dirname` fixes, framework deps, Vue-specific setup, mixed React+Vue coexistence.\n",{"name":5,"description":7},"main","7d4ebd573a4218d5e92eced411b259f34e9203fe",".github\u002Fskills\u002Fnx-import",0,"https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai","https:\u002F\u002Fwithnightshift.com\u002F","https:\u002F\u002Fgithub.com\u002FwhimzyLive","Creator of @typedorm","2026-11-14 22:45:42",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add whimzyLive\u002Fnightshift-ai --skill nx-import",{"tool":39,"command":40},"bunx","bunx skills add whimzyLive\u002Fnightshift-ai --skill nx-import",{"tool":42,"command":43},"pnpm","pnpm dlx skills add whimzyLive\u002Fnightshift-ai --skill nx-import","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnx-import\u002FSKILL.md",true,[47,53,57,61,65,69],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002FESLINT.md","REFERENCE","参考文档",4308,"https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnx-import\u002Freferences\u002FESLINT.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002FGRADLE.md",895,"https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnx-import\u002Freferences\u002FGRADLE.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002FJEST.md",6847,"https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnx-import\u002Freferences\u002FJEST.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002FNEXT.md",11647,"https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnx-import\u002Freferences\u002FNEXT.md",{"path":66,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002FTURBOREPO.md",4399,"https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnx-import\u002Freferences\u002FTURBOREPO.md",{"path":70,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002FVITE.md",18682,"https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fnx-import\u002Freferences\u002FVITE.md",[74,82,89,96,103,110],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M7BCEWYHDS1FWAJ6G4CD9P54","designing-in-patterns","Use when designing, planning or auditing UI against a component library — naming surfaces with the repo's pattern vocabulary, deciding reuse versus extend versus new, exploring compositions, or writing the reuse table (component-plan.md, a spec's `## Reuse`, a UI audit). Carries the design method; the repo's own vocabulary, bundle and board rules come from project-context and the designer override.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fplugins\u002Fsdlc\u002Fskills\u002Fdesigning-in-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M75MVN6GACAC87SV9RBPBMKH","typeorm","Use when defining TypeORM entities, writing migrations, or building repository\u002Fquery-builder code in TypeScript. Covers entity and relation decorators, the Data Mapper pattern, migrations, the query builder, transactions, and multi-database configuration.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fskills\u002Ftypeorm\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M75MTEZV8SAZNS20YDSB7KG2","hono-api","Use when building or extending REST APIs with Hono + @hono\u002Fzod-openapi. Covers schema-first route declaration with createRoute, feature-grouped composable routers, a class-based service layer behind interfaces, the strategy pattern for multi-event webhooks, typed request validation, and auto-generated OpenAPI docs.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fskills\u002Fhono-api\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M75MTB91SB6HPB3ZRT20F950","electrodb","Use when defining DynamoDB entities, modeling indexes, or writing queries\u002Fmutations with the ElectroDB ORM. Covers entity schema, access patterns, CRUD operations, update expressions, and single-table design patterns.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fskills\u002Felectrodb\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M75MT7KT9A3XYX38TX5MY6MA","atomic-design","Use when structuring or decomposing any frontend UI into reusable components, regardless of framework. Applies Brad Frost's atomic design methodology — atoms, molecules, organisms, templates, and pages — to guide consistent component hierarchy, naming, and composition decisions.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fskills\u002Fatomic-design\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M75MSTQ54EY0K29PKBF212K1","writing-docs","Use when writing, restructuring, or reviewing any prose documentation — a tutorial, how-to guide, reference page, or explanation\u002Fconceptual doc — for a public docs site (e.g. Mintlify MDX, docs\u002F, README material), a getting-started guide, an API\u002FCLI reference page, or a \"why we built it this way\" conceptual page. Applies the Diátaxis framework (see https:\u002F\u002Fdiataxis.fr\u002F) — every document belongs to exactly one of the four quadrants (tutorial \u002F how-to guide \u002F reference \u002F explanation), and mixing quadrants inside one document is the single most common documentation failure. Covers the four-quadrant compass for picking the right form, per-quadrant structure templates, an anti-pattern list for quadrant drift, and generic voice\u002Fcraft rules — repo-specific voice and target output format (e.g. Mintlify MDX) are resolved from the repo's docs-manifest (falling back to project-context), never hardcoded here.","https:\u002F\u002Fgithub.com\u002FwhimzyLive\u002Fnightshift-ai\u002Fblob\u002Fmain\u002Fplugins\u002Fsdlc\u002Fskills\u002Fwriting-docs\u002FSKILL.md",[],[]]