One-click install
npx skills add https://github.com/Shuunen/monorepo --skill link-workspace-packages-shuunen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/Shuunen/monorepo/tree/main/.github/skills/link-workspace-packages
Command: npx skills add https://github.com/Shuunen/monorepo --skill link-workspace-packages-shuunen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the process of establishing connections between different packages within a monorepo, ensuring they can correctly import and utilize each other's code.

Core Features & Use Cases

  • Cross-Package Dependency Management: Automatically adds sibling packages as dependencies using the appropriate syntax for various package managers (npm, yarn, pnpm, bun).
  • Resolves Module Not Found Errors: Fixes common import errors like "TS2307" or "cannot find module" that arise from unlinked workspace packages.
  • Use Case: After creating a new UI component library (@org/ui) and an application package (@org/app), use this Skill to link @org/ui into @org/app so the app can import components.

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 fix module not found errors when importing packages in a monorepo?

Fix module not found errors in a monorepo by ensuring correct inter-package dependencies are declared and symlinked. This skill resolves common import issues like TS2307 by automatically adding sibling packages as dependencies using the appropriate package manager syntax.

How do I link workspace packages across different package managers?

Link workspace packages across npm, yarn, pnpm, and bun by using the specific linking commands and dependency syntax each manager requires. This ensures sibling packages are correctly symlinked and can be imported without resolution errors.

Does this support linking monorepo packages in both pnpm and bun?

Yes, linking monorepo packages is fully supported across npm, yarn, pnpm, and bun. The process automatically applies the correct workspace dependency syntax and symlinking commands for whichever package manager your project uses.

What is the best way to add a sibling package as a dependency in a monorepo?

The best way to add a sibling package as a dependency in a monorepo is to declare it using your package manager's workspace protocol. This automatically symlinks the local package, making its exports immediately available for import.

Why does my monorepo app fail to import a newly created UI component library?

Your monorepo app fails to import the UI component library because the inter-package dependency has not been declared or symlinked. You must explicitly add the UI package as a workspace dependency in the app's package file.