link-workspace-packages

Detect the package manager and link workspace packages with manager-specific syntax.

Updated Jun 19, 2025
One-click install
npx skills add https://github.com/bennrwl/psychic-eureka --skill link-workspace-packages-bennrwl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/bennrwl/psychic-eureka/tree/main/.cursor/skills/link-workspace-packages
Command: npx skills add https://github.com/bennrwl/psychic-eureka --skill link-workspace-packages-bennrwl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Monorepos often suffer from broken dependencies between packages when linking new ones; manual edits to package.json and tsconfig paths are error-prone.

Core Features & Use Cases

  • Detects the active workspace manager (pnpm, yarn, npm, bun) and applies the proper workspace syntax to link packages.
  • Identifies consumer and provider packages and updates their dependencies to establish correct cross-package references.
  • Verifies symlinks in node_modules and ensures imports resolve after linking.

Quick Start

From the consumer package, run the appropriate workspace command to link a provider package (for example: pnpm add @org/provider --workspace, yarn workspace @org/app add @org/provider, npm install @org/provider --workspace @org/app, or bun add @org/provider) and verify the generated symlinks.

Frequently Asked Questions about link-workspace-packages

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I link workspace packages in a monorepo?

Linking workspace packages in a monorepo is done by detecting your active package manager and applying its specific syntax to update dependencies, establishing correct cross-package references between consumer and provider packages.

Why do workspace package resolution errors appear after adding new packages to a monorepo?

Workspace package resolution errors often appear because manual edits to package.json are error-prone, leaving symlinks in node_modules unverified and breaking dependencies between newly added sibling packages.

Does this workspace linking approach support package managers like pnpm, yarn, npm, and bun?

Yes, this workspace linking approach supports pnpm, yarn, npm, and bun by detecting the active manager and applying the correct workspace syntax, such as pnpm add --workspace or yarn workspace add, to wire dependencies.

What is the best way to fix broken dependencies between monorepo packages?

Fixing broken dependencies between monorepo packages is best handled by automatically identifying consumer and provider packages, updating their references using the correct workspace syntax, and verifying symlinks in node_modules to ensure imports resolve.

How do I verify symlinks in node_modules after wiring monorepo dependencies?

Verifying symlinks in node_modules after wiring monorepo dependencies is accomplished by the system automatically checking the generated symlinks to ensure that imports across consumer and provider packages resolve correctly after the workspace link is applied.