Skills · Coding

Nx Workspace Patterns

Unverified30/40

Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.

Originally by wshobson · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
CursorPartialPlain prose you can paste in — but no Cursor rules file
CodexPartialPlain prose you can paste in — but no AGENTS.md
Gemini CLIPartialPlain prose you can paste in
CopilotPartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add nx-workspace-patterns

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who is stuck, and on what

Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.

The whole source

No sign-in, no blur, nothing truncated
nx-workspace-patterns/SKILL.md70 lines2.2 KBRawView on GitHub
Frontmatter — 2 properties
namenx-workspace-patterns
descriptionConfigure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.
1---
2name: nx-workspace-patterns
3description: Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.
4---A5No allowed-tools declared — no way to tell what this skill may touch
5 
6# Nx Workspace Patterns
7 
8Production 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```
24workspace/
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 
52Full 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 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Coding