nrwl/link-workspace-packages

モノレポ内でワークスペースパッケージをリンクします (npm, yarn, pnpm, bun)。以下の場合に使用: (1) 新しくパッケージを作成・生成し、依存関係を設定する必要がある場合、(2) ユーザーが兄弟パッケージからインポートし、それを依存関係として追加する必要がある場合、(3) ワークスペースパッケージ (@org/*) の解決エラー (「モジュールが見つかりません」「インポートの解決に失敗しました」「TS2307」「解決できません」など) が発生した場合。tsconfig のパスや package.json の手動編集でごまかさず、パッケージマネージャーのワークスペースコマンドを使用して実際のリンクを修正してください。

link-workspace-packages とは?

このスキルは、npm、yarn、pnpm、bun といった主要なパッケージマネージャーを使用するモノレポ環境において、ワークスペース内のパッケージ間の依存関係を適切にリンクするためのものです。具体的には、新たにパッケージを作成した後や、あるパッケージから同じリポジトリ内の別のパッケージをインポートする必要が生じた場合、あるいは `@org/*` 形式のパッケージに対する「モジュールが見つかりません」といった一般的なインポートエラーが発生した場合に使用します。このスキルの核心は、`tsconfig.json` の paths 設定の編集や `package.json` への手動追記といった場当たり的な修正ではなく、各パッケージマネージャーが提供するワークスペースリンク機能(例:yarn workspace の `--add` フラグや pnpm の `--filter`、npm の `--workspace`、bun の `workspace:` プロトコル)を正確に実行することにあります。これにより、開発環境でのモジュール解決の問題を根本から解決し、一貫性のある依存関係管理を実現します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/nrwl/nx-ai-agents-config/tree/main/skills/link-workspace-packages

Installed? Explore more 生産性&コラボレーション skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

link-workspace-packages は何をしますか?

モノレポ内でワークスペースパッケージをリンクします (npm, yarn, pnpm, bun)。以下の場合に使用: (1) 新しくパッケージを作成・生成し、依存関係を設定する必要がある場合、(2) ユーザーが兄弟パッケージからインポートし、それを依存関係として追加する必要がある場合、(3) ワークスペースパッケージ (@org/*) の解決エラー (「モジュールが見つかりません」「インポートの解決に失敗しました」「TS2307」「解決できません」など) が発生した場合。tsconfig のパスや package.json の手動編集でごまかさず、パッケージマネージャーのワークスペースコマンドを使用して実際のリンクを修正してください。

Individual skills in this repo

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

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-import

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/history from another repository.

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'.

関連スキル