Generated banner for Nx Workspace Patterns
Generated logo for Nx Workspace Patterns

Nx Workspace Patterns

Seth HobsonCommunityCreated by Seth Hobson

  • Skill
  • Tool integration
  • Software development
  • MIT
  • No issues found

From the author

Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.
— the description by Seth Hobson

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill offers architectural guidance and configuration templates for Nx monorepos. It covers workspace structure, library categorization, and configuration settings for build caching and module boundaries to help manage dependencies and project organization within an Nx environment.

What it does

  • Defines standard directory structures for apps and libraries
  • Provides configuration templates for nx.json and project.json files
  • Outlines library types such as feature, ui, and data-access
  • Details module boundary enforcement rules
  • Explains how to implement affected commands for CI optimization
  • Offers best practices for dependency management and workspace maintenance

When to use it

  • When initializing a new Nx workspace
  • When configuring project boundaries and dependency constraints
  • When setting up or optimizing build caching
  • When implementing affected commands for CI pipelines
  • When migrating an existing codebase to Nx

Advantages

  • Provides consistent project structure patterns
  • Includes ready-to-use configuration templates
  • Helps enforce architectural boundaries between libraries
  • Supports efficient CI workflows through caching and affected commands

Usage examples

“How should I structure my Nx workspace?”
The agent provides a recommended directory layout separating apps and libraries, with specific library types like feature, ui, and data-access.
“Show me how to configure caching in nx.json.”
The agent provides a template for tasksRunnerOptions and targetDefaults to enable caching for build, lint, and test operations.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/wshobson/nx-workspace-patterns/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip nx-workspace-patterns.zip -d .agents/skills

Documentation by Seth Hobson

Nx Workspace Patterns

Production patterns for Nx monorepo management.

When to Use This Skill

  • Setting up new Nx workspaces

  • Configuring project boundaries

  • Optimizing CI with affected commands

  • Implementing remote caching

  • Managing dependencies between projects

  • Migrating to Nx

Core Concepts

1. Nx Architecture
workspace/
├── apps/              # Deployable applications
│   ├── web/
│   └── api/
├── libs/              # Shared libraries
│   ├── shared/
│   │   ├── ui/
│   │   └── utils/
│   └── feature/
│       ├── auth/
│       └── dashboard/
├── tools/             # Custom executors/generators
├── nx.json            # Nx configuration
└── workspace.json     # Project configuration
2. Library Types
TypePurposeExample
featureSmart components, business logicfeature-auth
uiPresentational componentsui-buttons
data-accessAPI calls, state managementdata-access-users
utilPure functions, helpersutil-formatting
shellApp bootstrappingshell-web

Templates and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's
  • Use tags consistently - Enforce with module boundaries

  • Enable caching early - Significant CI savings

  • Keep libs focused - Single responsibility

  • Use generators - Ensure consistency

  • Document boundaries - Help new developers

Don'ts
  • Don't create circular deps - Graph should be acyclic

  • Don't skip affected - Test only what changed

  • Don't ignore boundaries - Tech debt accumulates

  • Don't over-granularize - Balance lib count

Files

SKILL.md

Nx Workspace Patterns

Production patterns for Nx monorepo management.

When to Use This Skill

  • Setting up new Nx workspaces

  • Configuring project boundaries

  • Optimizing CI with affected commands

  • Implementing remote caching

  • Managing dependencies between projects

  • Migrating to Nx

Core Concepts

1. Nx Architecture
workspace/
├── apps/              # Deployable applications
│   ├── web/
│   └── api/
├── libs/              # Shared libraries
│   ├── shared/
│   │   ├── ui/
│   │   └── utils/
│   └── feature/
│       ├── auth/
│       └── dashboard/
├── tools/             # Custom executors/generators
├── nx.json            # Nx configuration
└── workspace.json     # Project configuration
2. Library Types
TypePurposeExample
featureSmart components, business logicfeature-auth
uiPresentational componentsui-buttons
data-accessAPI calls, state managementdata-access-users
utilPure functions, helpersutil-formatting
shellApp bootstrappingshell-web

Templates and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's
  • Use tags consistently - Enforce with module boundaries

  • Enable caching early - Significant CI savings

  • Keep libs focused - Single responsibility

  • Use generators - Ensure consistency

  • Document boundaries - Help new developers

Don'ts
  • Don't create circular deps - Graph should be acyclic

  • Don't skip affected - Test only what changed

  • Don't ignore boundaries - Tech debt accumulates

  • Don't over-granularize - Balance lib count

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Seth Hobson
Publisher
Seth Hobson (Community)
Source
wshobson/agents · plugins/developer-essentials/skills/nx-workspace-patterns · commit 4bde316
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Seth Hobson or Seth Hobson.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download nx-workspace-patterns.zip