nx-workspace
What it does
This skill helps set up and understand an Nx monorepo workspace. It is for developers and tech leads who manage several apps and libraries in one repository and want faster builds.
When to use it
- βWhen you are setting up Nx or need to understand how a monorepo is structured.
- βWhen you want to set project boundaries or see which projects depend on each other.
- βWhen you want to speed up CI with affected commands and build caching.
Skill link
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(tooling)/nx-workspace/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you explain how my Nx workspace is organized and suggest how to speed up our CI builds?β
5 new skills a week. 1 minute to read.
How it works
The agent lists the projects, reads their full resolved configuration with Nx commands, and maps out the structure. It then suggests changes to boundaries, caching, and affected commands for faster pipelines.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Nx Workspace Management
Quick Start
Exploring workspace: nx show projects and nx show project <name> --json
Running tasks: nx <target> <project> (e.g., nx build my-app)
Affected analysis: nx show projects --affected or nx affected -t <target>
Note: Prefix commands with
npx/pnpx/yarnif nx isn't installed globally.
Core Commands
List and Explore Projects
# List all projects
nx show projects
# Filter by type, pattern, or target
nx show projects --type app
nx show projects --projects "apps/*"
nx show projects --withTarget build
# Find affected projects
nx show projects --affected --base=main
Get Project Information
Critical: Always use nx show project <name> --json for full resolved configuration. Do NOT read project.json directly - it contains only partial configuration.
# Get full configuration
nx show project my-app --json
# Extract targets
nx show project my-app --json | jq '.targets | keys'
Configuration schemas:
- Workspace:
node_modules/nx/schemas/nx-schema.json - Project:
node_modules/nx/schemas/project-schema.json
Run Tasks
# Run specific project
nx build web --configuration=production
# Run affected
nx affected -t test --base=main
# View dependency graph
nx graph
Workspace Architecture
workspace/
βββ apps/ # Deployable applications
βββ libs/ # Shared libraries
β βββ shared/ # Shared across scopes
β βββ feature/ # Feature-specific
βββ nx.json # Workspace configuration
βββ tools/ # Custom executors/generators
Library Types
| Type | Purpose | Example |
|---|---|---|
| feature | Business logic, smart components | feature-auth |
| ui | Presentational components | ui-buttons |
| data-access | API calls, state management | data-access-users |
| util | Pure functions, helpers | util-formatting |
Detailed Resources
Configuration: See reference/configuration.md for:
- nx.json templates and options
- project.json structure
- Module boundary rules
- Remote caching setup
Commands: See reference/commands.md for:
- Complete command reference
- Advanced filtering options
- Common workflows
CI/CD: See reference/ci-cd.md for:
- GitHub Actions configuration
- GitLab CI setup
- Jenkins, Azure Pipelines, CircleCI examples
- Affected commands in pipelines
Best Practices: See reference/best-practices.md for:
- Do's and don'ts
- Complete troubleshooting guide
- Performance optimization
- Migration guides
Common Workflows
"What's in this workspace?"
nx show projects --type app # List applications
nx show projects --type lib # List libraries
"How do I run project X?"
nx show project X --json | jq '.targets | keys'
"What changed?"
nx show projects --affected --base=main
Quick Troubleshooting
- Targets not showing: Use
nx show project <name> --json, not project.json - Affected not working: Ensure git history available (
fetch-depth: 0in CI) - Cache issues: Run
nx reset
For detailed troubleshooting, see reference/best-practices.md.
FAQ
Why not read project.json directly?
The skill says project.json only has partial settings, so the full configuration comes from Nx.
Can it show the dependency graph?
Yes. It can show the project dependency graph with an Nx command.
Does it run tasks too?
Running tasks is a separate skill, but it can run a target when you ask.
Details
Original description by the author
Configure, explore, and optimize Nx monorepo workspaces. Use when setting up Nx, exploring workspace structure, configuring project boundaries, analyzing affected projects, optimizing build caching, or implementing CI/CD with affected commands. Keywords β nx, monorepo, workspace, projects, targets, affected. Do NOT use for running tasks (use nx-run-tasks) or code generation with generators (use nx-generate).
Popularity
- GitHub stars
- 7.1k
- Ranking position
- #13574
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
component-common-domain-detection
7.1kHelps your agent find business logic that is repeated across several parts of a codebase and suggests how to combine it.
component-flattening-analysis
7.1kHelps your agent find misplaced code and flatten messy component folder structures, so each piece sits where it belongs.
component-identification-sizing
7.1kHelps your agent map the parts of a codebase and measure their size, to find which module to split first.
coupling-analysis
7.1kHelps your agent check how tightly parts of a codebase depend on each other, and which connections to loosen first.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.