link-workspace-packages

Link local workspace packages across a monorepo using detected package manager syntax.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/ramiz4/simple-pos --skill link-workspace-packages-ramiz4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/ramiz4/simple-pos/tree/main/.gemini/skills/link-workspace-packages
Command: npx skills add https://github.com/ramiz4/simple-pos --skill link-workspace-packages-ramiz4

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage and wire local workspace packages across a monorepo so dependencies resolve to the local source rather than remote versions, preventing version drift and enabling faster, safer development.

Core Features & Use Cases

  • Detects the active workspace manager (pnpm, yarn, npm, bun) and applies the correct workspace syntax to link consumer and provider packages.
  • Updates the consumer package.json with proper dependency entries using workspace protocols (e.g., workspace:* or equivalent) to ensure local packages are used.
  • Verifies and preserves correct symlink structures in node_modules to guarantee seamless local development and testing.
  • Use Case: you just created a new package and need it available to an app without publishing; Use Case: you import a sibling package across apps and libraries; Use Case: you encounter resolution errors for workspace packages and need a robust linking workflow.

Quick Start

Run the workspace linking command from the consumer package to connect the provider package, such as pnpm add @org/ui --workspace or yarn workspace @org/app add @org/ui.

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 resolve local dependencies?

You link workspace packages in a monorepo by updating the consumer package.json with workspace protocols like workspace:*, which establishes symlinks in node_modules and forces the package to resolve to local source rather than remote versions.

Does workspace package linking work with both pnpm and yarn workspaces?

Workspace package linking works with pnpm, yarn, npm, and bun workspaces. It detects the active package manager and applies the correct workspace syntax to update package.json and wire consumer and provider packages.

What is the best way to use a newly created local package in another app without publishing?

The best way to use a new local package without publishing is to add it as a workspace dependency. By running a command like pnpm add @org/ui --workspace, you create a symlink so the consuming app imports the local source directly.

Why does importing a sibling package across apps cause workspace resolution errors?

Importing sibling packages causes workspace resolution errors when package.json lacks the correct workspace protocol entries. Linking the workspace packages properly updates dependency definitions and verifies symlink structures in node_modules.

How do I prevent version drift when developing shared libraries in a monorepo?

You prevent version drift in monorepo libraries by linking workspace packages using workspace syntax. This ensures consumer packages resolve dependencies to the local source code, enabling faster and safer local development.

Can I use workspace protocols to wire dependencies across different libraries in a monorepo?

Yes, you can use workspace protocols to wire dependencies across apps and libraries in a monorepo. The linking process updates the consumer package.json with proper dependency entries and preserves correct symlink structures.