nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use for project boundaries, build caching, library organization, and implementing affected commands.
Introduction
The nx-workspace-patterns skill provides a comprehensive toolkit for managing enterprise-scale Nx monorepos. It is designed for software architects and full-stack developers who need to maintain code quality, build performance, and structural integrity across large-scale repositories containing multiple applications and shared libraries. The skill codifies best practices for library organization, dependency graph management, and CI/CD optimization using Nx's powerful command-line interface and configuration system.
-
Standardizes monorepo architecture by defining clear project boundaries, separating concerns into feature, UI, data-access, util, and shell-level libraries.
-
Implements advanced build caching and distributed computation strategies to minimize CI build times using Nx affected commands and task runners.
-
Configures strict module boundary rules via ESLint to prevent circular dependencies and enforce strict architectural layering, ensuring decoupled and maintainable codebases.
-
Provides production-ready templates for nx.json and project.json configurations, including custom executors, generators, and optimized namedInputs for granular cache invalidation.
-
Supports seamless integration for setting up new Nx workspaces or migrating existing polyrepo projects into a cohesive monorepo structure.
-
Use this skill when architecting a new TypeScript/JavaScript workspace to ensure scalability and developer experience from day one.
-
Leverage the provided module boundary rules to prevent 'spaghetti' dependencies between shared libraries and feature sets.
-
Apply the cacheableOperations and targetDefaults templates to optimize build, test, and linting tasks in your CI/CD pipeline.
-
Use the library type definitions (feature, UI, data-access, util, shell) to enforce consistent project tagging and ownership models.
-
Ensure all team members follow standardized generator settings to maintain uniform styling, linting, and bundling configurations across the entire workspace.
Repository Stats
- Stars
- 34,568
- Forks
- 3,746
- Open Issues
- 5
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 30, 2026, 11:51 AM