nx-workspace-patterns

Configure Nx monorepo workspaces, project boundaries, caching, and CI orchestration.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Jhabbig/Habbig --skill nx-workspace-patterns-jhabbig
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-workspace-patterns
Source: https://github.com/Jhabbig/Habbig/tree/main/.claude/plugins/wshobson/developer-essentials/skills/nx-workspace-patterns
Command: npx skills add https://github.com/Jhabbig/Habbig --skill nx-workspace-patterns-jhabbig

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams structure, govern, and optimize Nx monorepos so applications and libraries stay maintainable as the workspace grows.

Core Features & Use Cases

  • Workspace Architecture: Organize apps, libs, and tools in a scalable Nx layout.
  • Boundary Enforcement: Set up dependency rules that prevent circular or out-of-scope imports.
  • Performance Optimization: Configure caching, affected commands, and target defaults for faster CI.
  • Automation Patterns: Create custom generators and project configuration for consistent repo scaffolding.
  • Use Case: A platform team can use this Skill to standardize how new apps are added, enforce library layering, and speed up builds across the entire monorepo.

Quick Start

Ask for an Nx monorepo setup that includes workspace structure, module boundaries, caching, affected commands, and CI guidance tailored to your repository.

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 imports?

Enforcing module boundaries in an Nx monorepo involves setting up dependency rules that prevent circular or out-of-scope imports. This boundary enforcement keeps applications and libraries maintainable as the workspace scales.

What is the best way to configure remote caching and affected commands for Nx CI?

Configuring remote caching and affected commands for Nx CI requires defining cacheable targets and target defaults. This performance optimization speeds up repeatable builds and tests across the monorepo.

How do I create custom generators for consistent project scaffolding in an Nx workspace?

Creating custom generators in an Nx workspace establishes automation patterns for consistent project configuration and scaffolding. Platform teams use these generators to standardize how new applications and libraries are added.

Can I use Nx workspace patterns to manage both applications and libraries in a single repository?

Yes, Nx workspace patterns are designed for managing both applications and libraries within a single monorepo. This scalable architecture layout organizes apps, libs, and tools while governing project boundaries.

Why do I need cacheable target definitions when setting up an Nx monorepo?

Cacheable target definitions are required in an Nx monorepo to enable performance optimization through caching and affected commands. They allow the CI orchestration to skip redundant builds and tests by reusing cached outputs.

Does this approach support migration workflows across modern Nx repositories?

Yes, this approach supports migration workflows across modern Nx repositories by applying standardized project configuration patterns. It ensures repeatable builds and tests during structural transitions while maintaining dependency graph integrity.