link-workspace-packages

Link workspace packages in a monorepo using the detected package manager.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/HL8-ORG/oksai --skill link-workspace-packages-hl8-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/HL8-ORG/oksai/tree/main/.opencode/skills/link-workspace-packages
Command: npx skills add https://github.com/HL8-ORG/oksai --skill link-workspace-packages-hl8-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Link workspace packages in a monorepo to wire dependencies between packages and resolve cross-package imports.

Core Features & Use Cases

  • Detect the active package manager at root (pnpm, yarn, bun, npm) and choose the correct workspace syntax.
  • Identify consumer package (the package importing) and provider package(s) (the ones being imported).
  • Add dependencies using the package manager's workspace commands and verify symlinks exist in the consumer's node_modules.
  • Use cases include wiring new packages, adding dependencies from a sibling package, and fixing resolution errors like "cannot find module", "failed to resolve import", or "TS2307".

Quick Start

From the consumer package directory, run the appropriate workspace command to link the provider package.

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 to fix 'cannot find module' errors?

To fix 'cannot find module' errors, link workspace packages in your monorepo by detecting the root package manager and applying its specific workspace syntax to wire consumer and provider dependencies. This resolves cross-package imports.

How do I add a sibling package as a dependency in a pnpm or yarn monorepo?

Add a sibling package as a dependency by identifying the consumer and provider packages, then running the appropriate workspace command from the consumer directory to apply the correct pnpm or yarn workspace syntax.

Does this workspace linking approach work with npm, pnpm, yarn, and bun?

Yes, the workspace linking approach works with npm, pnpm, yarn, and bun by detecting the active root package manager and applying the correct workspace-specific syntax to wire the monorepo packages.

Why does TypeScript show TS2307 'failed to resolve import' for a workspace package?

TypeScript shows TS2307 'failed to resolve import' when workspace packages are not properly wired. Linking the provider package to the consumer ensures symlinks exist in node_modules, resolving the module path.

What is the best way to verify monorepo workspace links after wiring new packages?

The best way to verify workspace links is to check that the symlinks exist in the consumer package's node_modules directory after applying the package manager's workspace commands to wire the new packages.

When should I manually link workspace packages instead of relying on standard installs?

Manually link workspace packages when you create or generate new packages, need to add a sibling dependency, or encounter resolution errors like 'cannot find module' that standard installs fail to resolve.