What is the Link Workspace Packages skill?
Link Workspace Packages is a coding skill by nrwl for Claude Code, Cursor, Codex and other AI coding agents. 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".
Add dependencies between packages in a monorepo. All package managers support workspaces but with different syntax.
When to use it
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".
What the SKILL.md covers
- Detect Package Manager
- Workflow
- pnpm
- yarn (v2+/berry)
- npm
- bun
- Examples
- Notes
- Author
- nrwl
- Pack
- nrwl/nx-ai-agents-config (10 skills)
- Category
- Coding, #1543 of 1826
- Alyn Score
- 53 / 99
- Files
- 1
- License
- MIT
- Last updated
- 31 h ago
- Works with
- Claude Code, Claude, Cursor, Codex, Gemini CLI, Copilot
Link Workspace Packages compared to similar skills
| Skill | Alyn Score | GitHub stars | Updated |
|---|---|---|---|
| Link Workspace Packages · nrwl | 53 | 29 | 31 h ago |
| Cfe Patch Method · Nikolay-Shirokov | 58 | 823 | 10 days ago |
| Jlink · zhinkgit | 58 | 812 | 8 days ago |
| Dsh Find Simplifications · qufei1993 | 47 | 1.9k | 3 days ago |
Install Link Workspace Packages
Pick your agent. Every command is ready to paste.
npx alyn-cli add link-workspace-packagesDetects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
npx skills add nrwl/nx-ai-agents-config --skill link-workspace-packagesOr use the open skills CLI directly.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads link-workspace-packages when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the link-workspace-packages skill”. In Codex, type $link-workspace-packages.
Link Workspace Packages
Add dependencies between packages in a monorepo. All package managers support workspaces but with different syntax.
Detect Package Manager
Check whether there's a packageManager field in the root-level package.json.
Alternatively check lockfile in repo root:
pnpm-lock.yaml→ pnpmyarn.lock→ yarnbun.lock/bun.lockb→ bunpackage-lock.json→ npm
Workflow
- Identify consumer package (the one importing)
- Identify provider package(s) (being imported)
- Add dependency using package manager's workspace syntax
- Verify symlinks created in consumer's
node_modules/
pnpm
Uses workspace: protocol - symlinks only created when explicitly declared.
# From consumer directory
pnpm add @org/ui --workspace
# Or with --filter from anywhere
pnpm add @org/ui --filter @org/app --workspace
Result in package.json:
{ "dependencies": { "@org/ui": "workspace:*" } }
yarn (v2+/berry)
Also uses workspace: protocol.
yarn workspace @org/app add @org/ui
Result in package.json:
{ "dependencies": { "@org/ui": "workspace:^" } }
npm
No workspace: protocol. npm auto-symlinks workspace packages.
npm install @org/ui --workspace @org/app
Result in package.json:
{ "dependencies": { "@org/ui": "*" } }
npm resolves to local workspace automatically during install.
bun
Supports workspace: protocol (pnpm-compatible).
cd packages/app && bun add @org/ui
Result in package.json:
{ "dependencies": { "@org/ui": "workspace:*" } }
Examples
Example 1: pnpm - link ui lib to app
pnpm add @org/ui --filter @org/app --workspace
Example 2: npm - link multiple packages
npm install @org/data-access @org/ui --workspace @org/dashboard
Example 3: Debug "Cannot find module"
- Check if dependency is declared in consumer's
package.json - If not, add it using appropriate command above
- Run install (
pnpm install,npm install, etc.)
Notes
- Symlinks appear in
<consumer>/node_modules/@org/<package> - Hoisting differs by manager:
- npm/bun: hoist shared deps to root
node_modules - pnpm: no hoisting (strict isolation, prevents phantom deps)
- yarn berry: uses Plug'n'Play by default (no
node_modules)
- npm/bun: hoist shared deps to root
- Root
package.jsonshould have"private": trueto prevent accidental publish
Tips for Link Workspace Packages
- • Start a fresh session after installing so your agent picks up the new skill.
- • It is part of a pack with 10 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Link Workspace Packages
What does the Link Workspace Packages skill do?
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".
How do I install Link Workspace Packages?
Run "npx alyn-cli add link-workspace-packages" in your project. The Alyn CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Link Workspace Packages work in Cursor and Codex?
Yes. Link Workspace Packages uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
When should I use the Link Workspace Packages skill?
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".
What is inside the Link Workspace Packages skill?
The SKILL.md covers Detect Package Manager, Workflow, pnpm, yarn (v2+/berry), npm, bun.
What is a good alternative to Link Workspace Packages?
Cfe Patch Method by Nikolay-Shirokov is the highest-ranked similar skill from another creator, with an Alyn Score of 58 compared to 53 for Link Workspace Packages.
Is Link Workspace Packages free?
Link Workspace Packages is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.
Who made Link Workspace Packages?
Link Workspace Packages is published by nrwl in the nrwl/nx-ai-agents-config repository, together with 9 other skills.


