home / skills / ehtbanton / claudeskillsrepo / pnpm-workspace-generator

pnpm-workspace-generator skill

/pnpm-workspace-generator

This skill generates a complete pnpm-workspace.yaml for monorepos, enabling seamless package management and optimized workspace resolution.

npx playbooks add skill ehtbanton/claudeskillsrepo --skill pnpm-workspace-generator

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
686 B
---
name: pnpm-workspace-generator
description: Generate pnpm workspace configuration files for monorepo package management. Triggers on "create pnpm workspace", "generate pnpm-workspace.yaml", "pnpm monorepo setup", "workspace config".
---

# PNPM Workspace Generator

Generate pnpm workspace configuration for monorepo package management.

## Output Requirements

**File Output:** `pnpm-workspace.yaml`
**Format:** Valid YAML
**Standards:** pnpm 8.x

## When Invoked

Immediately generate a complete pnpm workspace configuration file.

## Example Invocations

**Prompt:** "Create pnpm workspace for apps and packages"
**Output:** Complete `pnpm-workspace.yaml` with configured paths.

Overview

This skill generates a ready-to-use pnpm workspace configuration file (pnpm-workspace.yaml) tailored for monorepo package management. It produces valid YAML compatible with pnpm 8.x and includes common path patterns for apps, packages, and custom folders. Use it to quickly scaffold workspace globs and normalize workspace behavior across your projects.

How this skill works

When triggered, the skill analyzes the requested workspace layout and immediately emits a complete pnpm-workspace.yaml file with configured globs and optional settings. It supports common conventions (apps/, packages/, services/, tools/) and can include excludes or custom paths you specify. Output is formatted as valid YAML targeting pnpm 8.x standards.

When to use it

  • Setting up a new monorepo and needing a pnpm workspace config file
  • Adding or standardizing workspace globs across multiple repositories
  • Migrating from another package manager to pnpm in a monorepo
  • Quickly scaffolding CI or local dev workspace layouts
  • Generating config for varied folder structures (apps, packages, services)

Best practices

  • Declare clear, minimal globs (e.g., 'apps/*', 'packages/*') to avoid unexpected package picks
  • Use explicit exclude patterns for build output dirs like dist/ or node_modules/
  • Keep the pnpm-workspace.yaml at the repository root for consistent resolution
  • Version pin to pnpm 8.x features if your environment relies on them
  • Review generated globs and adjust for nested or nonstandard folder names

Example use cases

  • Create pnpm-workspace.yaml for a repo with apps/ and packages/ folders
  • Generate workspace config that excludes legacy vendor directories
  • Scaffold monorepo layout for a microservices repo with services/* and libs/*
  • Produce a workspace file for a monorepo that includes a top-level tools/ folder
  • Quickly regenerate the workspace file after renaming or moving package folders

FAQ

Is the output compatible with pnpm 8.x?

Yes. The generated YAML targets pnpm 8.x standards and syntax.

Can I customize which folders are included or excluded?

Yes. Provide the folder patterns you want included or excluded and the skill will incorporate them into the generated globs.