pnpm-workspace

Manage pnpm monorepo structure with TypeScript project references.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/CRAJKUMARSINGH/M3_Bridge --skill pnpm-workspace-crajkumarsingh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pnpm-workspace
Source: https://github.com/CRAJKUMARSINGH/M3_Bridge/tree/main/.local/skills/pnpm-workspace
Command: npx skills add https://github.com/CRAJKUMARSINGH/M3_Bridge --skill pnpm-workspace-crajkumarsingh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Understands and structures the pnpm monorepo template to streamline workspace setup, package discovery, and cross-package coordination.

Core Features & Use Cases

  • Describes the repository layout (artifacts, lib, scripts, pnpm-workspace.yaml, tsconfig.base.json, tsconfig.json, package.json).
  • Guides on TypeScript project references, dependencies, and artifact routing, plus common workflows for adding libs or artifacts.
  • Provides rules for root vs leaf packages, and how to run typechecks and codegen workflows.

Quick Start

Add a new lib by updating tsconfig references and run the canonical typecheck workflow to validate libs and artifacts.

Frequently Asked Questions about pnpm-workspace

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

FAQPage Schema
How do I structure a pnpm monorepo with TypeScript project references?

A pnpm monorepo uses a pnpm-workspace.yaml to define packages and a root tsconfig.base.json to manage TypeScript project references across libs and artifacts. This structure streamlines workspace setup and cross-package coordination.

How do I add a new shared library to a pnpm workspace?

To add a new lib in a pnpm workspace, update the root TypeScript project references and run the canonical typecheck workflow to validate dependencies across libs and artifacts.

What is the difference between libs and artifacts in a monorepo?

In this pnpm monorepo template, libs are shared internal libraries consumed by other packages, while artifacts are deployable outputs. The structure enforces specific conventions for dependency management and artifact routing.

How do I run typechecks and codegen workflows in a pnpm monorepo?

You run typechecks and codegen workflows using canonical pnpm workspace commands from the root. This validates all root and leaf packages, including shared libs and artifacts, cohesively.

Do I need pnpm to manage cross-package dependencies in a TypeScript monorepo?

Using pnpm for a TypeScript monorepo provides dedicated workspace commands and strict dependency management through pnpm-workspace.yaml. It enforces root versus leaf package rules and simplifies cross-package changes across libs and artifacts.