link-workspace-packages

Link sibling workspace packages as dependencies across npm, yarn, pnpm, and bun.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/buisihung11/prototype-zero --skill link-workspace-packages-buisihung11
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/buisihung11/prototype-zero/tree/main/.cursor/skills/link-workspace-packages
Command: npx skills add https://github.com/buisihung11/prototype-zero --skill link-workspace-packages-buisihung11

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of establishing dependencies between packages within a monorepo, resolving common module resolution errors and ensuring your workspace packages are correctly linked.

Core Features & Use Cases

  • Cross-Package Dependency Management: Adds sibling packages as dependencies to your current package.
  • Package Manager Agnostic: Supports npm, yarn (v2+/berry), pnpm, and bun.
  • Troubleshooting Resolution Errors: Fixes issues like "cannot find module", "TS2307", and "failed to resolve import" for workspace packages.
  • Use Case: After creating a new @org/ui package and a @org/app package that needs to use it, this Skill ensures @org/ui is correctly added as a dependency to @org/app.

Quick Start

Use the link-workspace-packages skill to add the '@org/ui' package as a dependency to the '@org/app' package using pnpm.

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 sibling packages in a monorepo to fix module resolution errors?

Linking sibling packages in a monorepo requires adding the target package as a dependency in your package.json. This establishes correct symlinking, resolving common module resolution errors like 'cannot find module' during workspace development.

Does monorepo package linking work across different package managers like pnpm and bun?

Yes, monorepo package linking works across npm, yarn (v2+/berry), pnpm, and bun. It ensures correct symlinking and dependency declaration regardless of your package manager, preventing workspace-specific import failures.

How do I add a new workspace package as a dependency to another package?

To add a workspace package as a dependency, declare the sibling package name in your current package's package.json. This ensures correct symlinking and module resolution for monorepo development across supported package managers.

Why does TypeScript show TS2307 or failed to resolve import for monorepo workspace packages?

TypeScript shows TS2307 or failed import errors when sibling workspace packages are not declared as dependencies. Linking the workspace packages resolves these module resolution errors by establishing correct symlinks.

What is the best way to manage cross-package dependencies in a monorepo?

The best way to manage cross-package dependencies in a monorepo is using automated linking to add sibling packages as dependencies. This package-manager-agnostic approach ensures correct symlinking and prevents module resolution errors.