link-workspace-packages

Link monorepo packages using the active package manager's workspace protocol.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/xiaoshenming/aiteacher-monorepo --skill link-workspace-packages-xiaoshenming
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/xiaoshenming/aiteacher-monorepo/tree/main/.opencode/skills/link-workspace-packages
Command: npx skills add https://github.com/xiaoshenming/aiteacher-monorepo --skill link-workspace-packages-xiaoshenming

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Linking dependencies across a monorepo can be error-prone and tedious, especially when adding new packages or resolving unresolved imports. This Skill automates and standardizes cross-package linking so consumer packages can reliably reference providers via the workspace protocol.

Core Features & Use Cases

  • Workspace detection and compatibility: identifies the active package manager (pnpm, yarn, npm, bun) from root files and applies the correct workspace syntax.
  • Cross-package linking: adds provider-consumer dependencies using workspace:* semantics to ensure symlinks are created in node_modules.
  • Resolution troubleshooting: guides debugging of common errors like cannot find module or TS2307 by enforcing proper workspace references and avoiding manual tsconfig edits.

Quick Start

Run a workspace-aware add command to link a consumer package to its provider using the appropriate workspace syntax for your package manager.

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 link workspace packages in a monorepo, this Skill detects your active package manager from root files and applies the appropriate workspace:* protocol syntax to wire consumer packages to providers, ensuring symlinks are correctly created in node_modules.

Why does my monorepo throw cannot find module or TS2307 for @org/* packages?

Unresolved import errors like cannot find module or TS2307 for @org/* often occur when workspace linking is missing. This Skill resolves these errors by enforcing proper workspace references and verifying symlinks instead of requiring manual tsconfig edits.

Can I use this to link monorepo dependencies with pnpm, yarn, npm, and bun?

Yes, you can link monorepo dependencies with pnpm, yarn, npm, and bun. The Skill identifies your active package manager by detecting root files like pnpm-lock.yaml, yarn.lock, or bun.lockb, then applies the correct workspace syntax for that environment.

What's the best way to add a new provider package to a monorepo workspace?

The best way to add a new provider package to a monorepo workspace is running a workspace-aware add command. This Skill standardizes cross-package linking by modifying package.json with workspace:* semantics, ensuring consumer packages reliably reference providers.

Does linking workspace packages require manually editing tsconfig paths?

Linking workspace packages should not require manually editing tsconfig paths. This Skill automates resolution troubleshooting by applying correct workspace protocol references and verifying symlinks, avoiding the need for manual tsconfig path adjustments.

Do I need to specify my package manager before linking intra-repo dependencies?

You do not need to specify your package manager before linking intra-repo dependencies. The Skill automatically detects the active package manager from root configuration and lock files to apply the correct command syntax for your workspace.