SKILL.md
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
