nx-workspace-patterns

Configure Nx monorepo workspaces with project structures, module boundaries, and CI caching.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ACGSpgp/ACGS --skill nx-workspace-patterns-acgspgp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-workspace-patterns
Source: https://github.com/ACGSpgp/ACGS/tree/main/.agent/workflows/developer-essentials/1.0.0/skills/nx-workspace-patterns
Command: npx skills add https://github.com/ACGSpgp/ACGS --skill nx-workspace-patterns-acgspgp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill streamlines the setup, configuration, and optimization of Nx monorepos, ensuring efficient development workflows and maintainable project structures.

Core Features & Use Cases

  • Nx Workspace Setup: Provides best practices for initializing and structuring Nx workspaces.
  • Project Boundary Enforcement: Implements rules to manage dependencies between projects within the monorepo.
  • CI Optimization: Configures CI pipelines to leverage Nx's affected commands for faster builds and tests.
  • Caching Strategies: Sets up local or remote caching for build artifacts to speed up CI/CD.
  • Use Case: When starting a new project that will use Nx, apply these patterns to establish a robust and scalable monorepo architecture from day one.

Quick Start

Configure nx.json with optimal settings for build caching and affected commands.

Frequently Asked Questions about nx-workspace-patterns

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

FAQPage Schema
How do I optimize Nx monorepo configurations for faster CI builds?

Optimize Nx monorepo CI builds by configuring affected commands and implementing caching strategies in nx.json, which ensures pipelines only rebuild changed projects and maintain code quality through strict dependency rules.

What is the best way to enforce module boundaries in an Nx workspace?

Enforce module boundaries in an Nx workspace using ESLint rules and project.json configurations. This manages dependencies between projects, preventing unauthorized imports and maintaining code quality across large monorepos.

How do I set up build caching strategies in an Nx monorepo?

Set up build caching in an Nx monorepo by configuring nx.json with local or remote caching for build artifacts, which speeds up CI/CD pipelines by reusing previously built outputs instead of rebuilding unchanged projects.

Can I use Nx affected commands to optimize my JavaScript and TypeScript project pipelines?

Yes, you can use Nx affected commands to optimize JavaScript and TypeScript project pipelines. By configuring nx.json, CI pipelines only execute build and test tasks on projects affected by recent changes, maximizing efficiency in large monorepos.

When do I need to enforce dependency rules in a large Nx monorepo?

Enforce dependency rules in a large Nx monorepo when managing complex project structures to maintain code quality. Utilizing ESLint rules for module boundary enforcement prevents cross-project dependency violations and ensures maintainable architecture.

What are the limitations of caching strategies in Nx workspaces?

Limitations of caching strategies in Nx workspaces arise when build artifacts cannot be reused due to environment differences or non-deterministic build processes. Properly configuring nx.json is required to ensure cache integrity and consistent CI pipeline optimization.