monorepo-architect-skill

Enforce Node.js monorepo architectural rules using Yarn and scoped vitest runs.

3|1|Updated May 17, 2024
One-click install
npx skills add https://github.com/d-zero-dev/BurgerEditor --skill monorepo-architect-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monorepo-architect-skill
Source: https://github.com/d-zero-dev/BurgerEditor/tree/main/.claude/skills/monorepo-architect
Command: npx skills add https://github.com/d-zero-dev/BurgerEditor --skill monorepo-architect-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces project-specific architectural rules and ensures consistency in Node.js monorepo environments, preventing deviations from established design patterns and maintenance standards.

Core Features & Use Cases

  • Command Enforcement: Strictly uses yarn for all package management, build, and script execution tasks.
  • Directory Navigation Prevention: Prohibits cd commands, enforcing operations from the root using yarn workspace or --cwd.
  • Scoped Operations: Ensures builds and tests are limited to affected packages using --scope and npx vitest run.
  • exports Field Management: Manages the package.json exports field to strictly define public APIs, adding new exports without removing existing ones.
  • Use Case: When adding a new feature that touches multiple packages in a monorepo, this Skill ensures all package updates adhere to the defined exports structure and are built/tested correctly using yarn.

Quick Start

Use the monorepo-architect skill to ensure all package builds are scoped to the 'ui-components' package.

Frequently Asked Questions about monorepo-architect-skill

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

FAQPage Schema
How do I manage package.json exports in a Node.js monorepo?

Managing package.json exports in a Node.js monorepo involves strictly defining public APIs by adding new export entries without removing existing ones. This ensures package boundaries remain stable and feature additions adhere to established architectural rules.

How do I run scoped builds and tests for a specific Yarn workspace?

Running scoped builds and tests for a Yarn workspace requires using `yarn workspace` with `--scope` and executing tests via `npx vitest run`. This limits operations to affected packages rather than running tasks across the entire project root.

Why should I avoid using the cd command in a monorepo?

Avoiding the `cd` command in a monorepo prevents directory navigation errors by enforcing root-level operations. Instead of changing directories, you execute scripts and package management tasks using `yarn workspace` or the `--cwd` flag.

Can I use npm instead of Yarn for monorepo package management?

Using npm instead of Yarn is not supported in this architectural workflow. The monorepo maintenance rules strictly enforce Yarn exclusively for all package management, script execution, and build tasks to ensure environment consistency.

What is the best way to enforce architectural rules across multiple monorepo packages?

Enforcing architectural rules across multiple monorepo packages is achieved by governing Node.js code design and feature additions through strict command enforcement. This mandates scoped Yarn operations and manages package.json exports to prevent deviations from established patterns.