nx-workspace-patterns

Configure Nx monorepo structures with templates for caching and boundaries.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/leonardoteodoroo/amino-advanced --skill nx-workspace-patterns-leonardoteodoroo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-workspace-patterns
Source: https://github.com/leonardoteodoroo/amino-advanced/tree/main/.agent/skills/nx-workspace-patterns
Command: npx skills add https://github.com/leonardoteodoroo/amino-advanced --skill nx-workspace-patterns-leonardoteodoroo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configure and optimize Nx monorepos to improve project organization, build performance, and caching efficiency.

Core Features & Use Cases

  • Streamlined workspace setup with apps/libs and standardized library types (feature, ui, data-access, util).
  • Enforced module boundaries to prevent circular dependencies and promote maintainability.
  • Templates and tooling guidance for nx.json and project.json, plus caching and affected commands to boost CI speed.

Quick Start

Set up a new Nx workspace with proper boundaries and caching by following the included templates.

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 module boundaries in an Nx monorepo to prevent circular dependencies?

Enforce module boundaries in an Nx monorepo by applying eslint rules with tags to restrict library imports. This prevents circular dependencies and promotes maintainability across your feature, ui, data-access, and util libraries.

How do I configure build cache and affected commands in nx.json?

Configure build cache and affected commands in nx.json by defining target inputs and outputs. This setup tracks file changes to cache build artifacts and run tasks only for affected projects, significantly boosting CI speed.

What is the best way to structure apps and libs when setting up a new Nx workspace?

The best way to structure apps and libs in a new Nx workspace is to separate applications from libraries and categorize libraries into standardized types like feature, ui, data-access, and util. This organization streamlines project configuration and maintainability.

Can I migrate an existing repository to an optimized Nx workspace structure?

Yes, you can migrate an existing repository to an Nx workspace by integrating nx.json and project.json templates. The migration process applies standardized library types and configures module boundaries without breaking your current project organization.

Why does configuring project.json matter for Nx monorepo performance?

Configuring project.json matters for Nx monorepo performance because it defines specific target inputs and outputs for each project. Proper target configuration enables precise build caching and allows the affected command to skip unchanged code efficiently.

When do I need to use remote caching instead of local build cache in Nx?

You need remote caching when local build cache limits CI speed across multiple machines or team members. It shares cached build artifacts across your environment by connecting nx.json to a remote cache server, ensuring faster workspace builds.