nx-workspace-patterns — Claude Code skill for Nx workspaces
This skill covers Nx monorepo structure, project boundaries, build caching, and affected commands. Use it when setting up a workspace or moving a project to Nx.
/plugin marketplace add wshobson/agents
/plugin install developer-essentials@claude-code-workflowsWhat nx-workspace-patterns does
The skill outlines an Nx workspace with apps, shared libraries, and tools. It groups libraries by purpose: feature, ui, data-access, util, and shell. These patterns give you a starting point for organizing code and setting boundaries between projects.
It covers tags and module boundaries, generators, build caching, affected commands for CI, and migration to Nx. A link to references/details.md points to templates and worked examples. Install it when you are shaping an Nx monorepo or its CI workflow; it is less relevant to projects that do not use Nx.
What it helps with
- organize apps and shared libraries in an Nx workspace
- define project boundaries with consistent tags
- select affected projects for CI commands
- plan project dependencies without circular links
- prepare a project migration to Nx
Example prompts for the agent
- Suggest an Nx workspace layout for web and api apps with shared libraries.
- Show how to use tags and module boundaries for feature and data-access libraries.
- How should I use affected commands and build caching in my Nx CI workflow?
How to install nx-workspace-patterns
1Plugin marketplace
/plugin marketplace add wshobson/agents/plugin install developer-essentials@claude-code-workflowsThis installs the whole developer-essentials plugin with all its skills
2Skills CLI (Vercel)
npx skills add wshobson/agents --skill nx-workspace-patterns -a claude-code3Manually: put the files in place
~/.claude/skills/nx-workspace-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/nx-workspace-patterns/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill nx-workspace-patterns -a codex2Manually: put the files in place
.agents/skills/nx-workspace-patterns/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill nx-workspace-patterns -a cursor2Manually: put the files in place
.cursor/skills/nx-workspace-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshobson/agents nx-workspace-patterns2Manually: put the files in place
.github/skills/nx-workspace-patterns/SKILL.mdPlatform CLI
gemini skills install https://github.com/wshobson/agents --path plugins/developer-essentials/skills/nx-workspace-patternsManually: put the files in place
.devin/skills/nx-workspace-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set213
The whole set →Similar
Questions about nx-workspace-patterns
How do I install nx-workspace-patterns in Claude Code?
Run npx skills add wshobson/agents --skill nx-workspace-patterns -a claude-code. The skill path shown in the install details is ~/.claude/skills/nx-workspace-patterns/SKILL.md.
What does nx-workspace-patterns do?
It provides patterns for structuring Nx workspaces, defining project boundaries and dependencies, configuring caching, and selecting affected changes for CI.
Which library types does nx-workspace-patterns cover?
It describes feature, ui, data-access, util, and shell libraries, covering business logic, presentational components, API access, helpers, and app bootstrapping.
Source text
SKILL.md · MIT
--- 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 ## 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
© Seth Hobson · MIT · wshobson/agents