nx-workspace-patterns

Codify Nx workspace patterns for monorepo setup, boundary enforcement, and caching.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill nx-workspace-patterns-ccf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-workspace-patterns
Source: https://github.com/ccf/claude-code-ccf-marketplace/tree/main/plugins/developer-essentials/skills/nx-workspace-patterns
Command: npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill nx-workspace-patterns-ccf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a curated set of Nx workspace patterns to optimize monorepo structure, boundary enforcement, caching, and project coordination, reducing setup guesswork and improving build times.

Core Features & Use Cases

  • Standardized Nx workspace layout with apps/ libs/ tools for scalable growth.
  • Library boundary templates and tagging to enforce architectural rules.
  • CI caching and affected commands templates to speed up builds and tests.
  • Migration guides and examples for Nx version upgrades and plugin usage.

Quick Start

Use this skill to scaffold a new Nx workspace pattern by running nx g @nx/react:lib feature-auth --directory=libs/web --tags=type:feature,scope:web

Frequently Asked Questions about nx-workspace-patterns

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

FAQPage Schema
How do I enforce project boundaries in an Nx monorepo?

Enforce Nx monorepo boundaries by applying library tagging templates and standard architectural rules to restrict cross-project imports. This provides curated configurations to prevent invalid dependencies and maintain structural governance across your apps and libs.

What is the best way to optimize build caching for Nx workspaces?

Optimize Nx build caching by implementing CI caching templates and affected commands. This approach speeds up builds and tests by reusing cached outputs and only re-running tasks for projects impacted by specific code changes.

How do I scaffold a new library with specific tags in an Nx workspace?

Scaffold a new Nx library with tags by running standard generator commands like `nx g @nx/react:lib` with directory and tag flags. This applies standardized workspace layouts to ensure scalable growth and immediate team adoption.

Can I use these Nx patterns to migrate my workspace to a newer version?

Yes, you can migrate your Nx workspace using included migration guides and examples. These templates support Nx version upgrades and plugin usage, reducing setup guesswork and ensuring standard configurations remain intact during updates.

Does this Nx workspace setup work for both new and existing monorepos?

This Nx workspace setup applies to both new workspace creation and existing project governance. It provides standardized layout templates, boundary enforcement, and caching optimization to scale apps and libs coordination effectively.

Why should I use standard tagging for libraries in an Nx monorepo?

Use standard tagging for Nx libraries to enforce architectural rules and project boundary restrictions. This governance mechanism prevents unauthorized dependencies and maintains a scalable, organized monorepo structure across multiple teams.