Configure and optimize Nx monorepo workspaces
Nx workspace patterns

Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.
--- name: nx-workspace-patterns description: Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands. --- # 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
Overview
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
Manual install (npx, ZIP)
Claude Code
npx skills add wshobson/agents --skill nx-workspace-patterns -g -a claude-codeClaude Code (manual)
mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \
| tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/developer-essentials/skills/nx-workspace-patternsWindows (PowerShell)
New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/9119715c73ffb87da9e6/nx-workspace-patterns.zip" -OutFile "$env:TEMP\nx-workspace-patterns.zip"; Expand-Archive "$env:TEMP\nx-workspace-patterns.zip" -DestinationPath "$HOME\.claude\skills" -ForceClaude.ai / desktop
Codex, Cursor, other agents
Connects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md2.2 KBreferences/1 file · 8.6 KB
Read the files here
SKILL.md
Show the full text70 lines
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
| Type | Purpose | Example |
|---|---|---|
| feature | Smart components, business logic | feature-auth |
| ui | Presentational components | ui-buttons |
| data-access | API calls, state management | data-access-users |
| util | Pure functions, helpers | util-formatting |
| shell | App bootstrapping | shell-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
| 1 | |
| 2 | name nx-workspace-patterns |
| 3 | description Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands. |
| 4 | |
| 5 | |
| 6 | # Nx Workspace Patterns |
| 7 | |
| 8 | Production patterns for Nx monorepo management. |
| 9 | |
| 10 | ## When to Use This Skill |
| 11 | |
| 12 | Setting up new Nx workspaces |
| 13 | Configuring project boundaries |
| 14 | Optimizing CI with affected commands |
| 15 | Implementing remote caching |
| 16 | Managing dependencies between projects |
| 17 | Migrating to Nx |
| 18 | |
| 19 | ## Core Concepts |
| 20 | |
| 21 | ### 1. Nx Architecture |
| 22 | |
| 23 | |
| 24 | workspace/ |
| 25 | ├── apps/ # Deployable applications |
| 26 | │ ├── web/ |
| 27 | │ └── api/ |
| 28 | ├── libs/ # Shared libraries |
| 29 | │ ├── shared/ |
| 30 | │ │ ├── ui/ |
| 31 | │ │ └── utils/ |
| 32 | │ └── feature/ |
| 33 | │ ├── auth/ |
| 34 | │ └── dashboard/ |
| 35 | ├── tools/ # Custom executors/generators |
| 36 | ├── nx.json # Nx configuration |
| 37 | └── workspace.json # Project configuration |
| 38 | |
| 39 | |
| 40 | ### 2. Library Types |
| 41 | |
| 42 | | Type | Purpose | Example | |
| 43 | | --------------- | -------------------------------- | ------------------- | |
| 44 | | **feature** | Smart components, business logic | `feature-auth` | |
| 45 | | **ui** | Presentational components | `ui-buttons` | |
| 46 | | **data-access** | API calls, state management | `data-access-users` | |
| 47 | | **util** | Pure functions, helpers | `util-formatting` | |
| 48 | | **shell** | App bootstrapping | `shell-web` | |
| 49 | |
| 50 | ## Templates and detailed worked examples |
| 51 | |
| 52 | Full template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates. |
| 53 | |
| 54 | ## Best Practices |
| 55 | |
| 56 | ### Do's |
| 57 | |
| 58 | **Use tags consistently** - Enforce with module boundaries |
| 59 | **Enable caching early** - Significant CI savings |
| 60 | **Keep libs focused** - Single responsibility |
| 61 | **Use generators** - Ensure consistency |
| 62 | **Document boundaries** - Help new developers |
| 63 | |
| 64 | ### Don'ts |
| 65 | |
| 66 | **Don't create circular deps** - Graph should be acyclic |
| 67 | **Don't skip affected** - Test only what changed |
| 68 | **Don't ignore boundaries** - Tech debt accumulates |
| 69 | **Don't over-granularize** - Balance lib count |
| 70 |
Details
- Updated
- Sep 21, 2026
- License
- MIT
- Stars on the repo
- ★ 39,857
- Checked
- Source
- wshobson/agents ↗
- Creator
- wshobson · 179 listings
Similar skills
See all →
SkillCreate branded architecture, architecture deltaDiagram design
SkillReview a PR against the Pascal architectural rulesReview architecture
SkillCreate and edit draw.io/diagrams.net diagramsDraw.io Architecture Studio
SkillCreate polished dark-themed architecture diagramsArchitecture Diagram Skill
SkillThe foundational knowledge distillation pattern for buildingLLM Wiki — Knowledge Distillation Pattern
SkillManage software complexity through deep modulesA Philosophy of Software Design FrameworkMore from wshobson
SkillMaster C/.NET backend development patterns for building
SkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliance
SkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Design
SkillMigrate from AngularJS to Angular using hybrid modeAngular migration
SkillUnderstand anti-reversing, obfuscationAnti reversing techniques
SkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patterns