workspace

Manage pnpm monorepo operations with filter selectors and workspace protocol.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill workspace-theslashdojo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workspace
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/pnpm/workspace
Command: npx skills add https://github.com/theslashdojo/dojo --skill workspace-theslashdojo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pnpm, node, rg, and includes scripts (resource) components.

What problem does it solve?

Managing and scoping operations in pnpm monorepos is error-prone: accidental registry installs, broad recursive runs, and unclear package boundaries can mutate the wrong packages or produce inconsistent builds. This Skill provides clear patterns and tooling to constrain actions to the intended package set and to prefer local workspace resolution.

Core Features & Use Cases

  • Scoped package targeting using pnpm filter selectors to include a package, its dependencies, or its dependents.
  • Safe dependency linking with the workspace: protocol to avoid unintended registry fallbacks and to control injected dependency behavior.
  • Recursive execution patterns and validations for running scripts across a workspace while preserving topological order or running in parallel when safe.
  • Use Case: Add a local UI package to a web package with workspace:* while limiting the change to only the affected packages and verifying the workspace globs are correct.

Quick Start

Ask the AI to run the manage-workspace script with an action like list, run, add-workspace-dep, why, or validate and include appropriate filter selectors to restrict the target packages.

Frequently Asked Questions about workspace

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a local package dependency in a pnpm monorepo?

To add a local package dependency in a pnpm monorepo, use the workspace: protocol (like workspace:*) to link local packages safely. This prevents accidental registry fallbacks and ensures the dependency resolves to the local workspace package.

What's the best way to run scripts recursively across specific pnpm workspace packages?

The best way to run scripts recursively across specific pnpm workspace packages is using pnpm filter selectors with recursive flags. This constrains execution to the intended package set while preserving topological order or running in parallel safely.

Why does pnpm install a registry version instead of my local workspace package?

pnpm installs a registry version instead of a local workspace package when the workspace: protocol is missing or misconfigured. Using workspace:* forces local resolution and prevents unintended registry fallbacks within the monorepo.

Can I target only a package and its dependents when running pnpm monorepo operations?

Yes, you can target a package and its dependents in a pnpm monorepo by using specific pnpm filter selectors. This scoped targeting prevents broad recursive runs and limits operations to only the affected packages in the workspace.

How do I validate pnpm-workspace.yaml before running recursive workspace commands?

To validate pnpm-workspace.yaml before running recursive workspace commands, use a dedicated workspace validation action. This verifies workspace globs are correct and prevents inconsistent builds or accidental mutation of the wrong packages.

How does the pnpm workspace: protocol control injected dependency behavior?

The pnpm workspace: protocol controls injected dependency behavior by forcing local package resolution within the monorepo. It avoids unintended registry fallbacks and ensures safe dependency linking across the workspace packages.