link-workspace-packages

Link consumer packages to sibling workspace packages in monorepos.

14|5|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/TheCardGoat/lorcana-simulator --skill link-workspace-packages-thecardgoat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/TheCardGoat/lorcana-simulator/tree/main/.opencode/skills/link-workspace-packages
Command: npx skills add https://github.com/TheCardGoat/lorcana-simulator --skill link-workspace-packages-thecardgoat

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates broken or missing imports caused by newly added or referenced workspace packages in monorepos, so module resolution works correctly without fragile workarounds.

Core Features & Use Cases

  • Workspace-aware dependency wiring: Links consumer packages to sibling provider packages using each package manager’s supported workspace mechanism.
  • Error-driven diagnosis: Targets common resolution failures such as “cannot find module”, “failed to resolve import”, TS2307, and “cannot resolve”.
  • Manager-correct instructions: Handles pnpm, yarn (berry), npm, and bun differences so the same intent produces the correct linking behavior.

Quick Start

Ask to link the consumer package to the provider workspace package for your repo using the workspace command for your detected package manager, then verify that the expected symlink appears under the consumer’s node_modules.

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 cannot find module errors in a monorepo after adding a new workspace package?

To fix cannot find module errors in a monorepo, you must link the consumer package to the sibling provider package using the correct workspace syntax, then validate the resulting symlink in the consumer's node_modules.

How does workspace dependency resolution work across different package managers like pnpm and yarn berry?

Workspace dependency resolution works by detecting your package manager from lockfiles or packageManager metadata, then applying the correct syntax like workspace:* to link sibling packages and create symlinks in node_modules.

Do I need to manually configure symlinks for local packages in an npm workspace?

You do not need to manually configure symlinks for local packages in an npm workspace if you apply the correct workspace protocol syntax in your package.json, which automatically handles the symlink creation in node_modules.

What's the best way to resolve TS2307 or failed to resolve import errors in a TypeScript monorepo?

The best way to resolve TS2307 or failed to resolve import errors in a TypeScript monorepo is to link the consumer package to the imported sibling workspace package using the detected package manager's correct workspace syntax.

Why does my bun workspace fail to resolve imports from a newly added sibling package?

Your bun workspace fails to resolve imports from a newly added sibling package because the consumer package lacks the correct workspace dependency linking, requiring proper workspace syntax application and symlink validation.