Skip to content
Skills Library
Programming · Building & coding

nx

/nx

Nx build system and monorepo tools. Advanced task orchestration, generators, and plugins. Use for complex enterprise monorepos with multiple technologies. USE WHEN: user mentions "Nx", "nx.json", "Nx monorepo", "Nx generators", asks about "Nx workspace", "affected commands", "module boundaries" DO NOT USE FOR: Turborepo (use turborepo skill), simple monorepos (Turborepo is simpler), single-package projects

Licence
MIT
Last repository change
21.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 21.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Nx build system and monorepo tools. Advanced task orchestration, generators, and plugins. Use for complex enterprise monorepos with multiple technologies. USE WHEN: user mentions "Nx", "nx.json", "Nx monorepo", "Nx generators", asks about "Nx workspace", "affected commands", "module boundaries" DO NOT USE FOR: Turborepo (use turborepo skill), simple monorepos (Turborepo is simpler), single-package projects

Triggers from the description

nx.jsonNx monorepoNx generatorsNx workspaceaffected commandsmodule boundaries
Original author description

Nx build system and monorepo tools. Advanced task orchestration, generators, and plugins. Use for complex enterprise monorepos with multiple technologies. USE WHEN: user mentions "Nx", "nx.json", "Nx monorepo", "Nx generators", asks about "Nx workspace", "affected commands", "module boundaries" DO NOT USE FOR: Turborepo (use turborepo skill), simple monorepos (Turborepo is simpler), single-package projects

How it works

  1. Setup
  2. Project Structure
  3. Configuration (nx.json)
  4. Running Tasks
  5. Generators
  6. Plugins
  7. Caching
  8. Comparison: Nx vs Turborepo
  9. When NOT to Use This Skill
  10. Anti-Patterns
Original SKILL.md headings · 154 lines, 526 words
SKILL.md preview
---
name: nx
description: |
  Nx build system and monorepo tools. Advanced task orchestration, generators, and plugins.
  Use for complex enterprise monorepos with multiple technologies.

  USE WHEN: user mentions "Nx", "nx.json", "Nx monorepo", "Nx generators", asks about "Nx workspace", "affected commands", "module boundaries"

  DO NOT USE FOR: Turborepo (use turborepo skill), simple monorepos (Turborepo is simpler), single-package projects
allowed-tools: Read, Grep, Glob, Write, Edit, Bash
---
# Nx - Quick Reference

> **Full Reference**: See [advanced.md](advanced.md) for custom generators, custom executors, remote/self-hosted cache, module boundaries, and CI/CD GitHub Actions setup.

> **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `nx` for comprehensive documentation.

## Setup

```bash
# New workspace
npx create-nx-workspace@latest my-workspace

# Add to existing repo
npx nx@latest init
```

## Project Structure

```
my-workspace/
├── nx.json
├── apps/
│   ├── web/project.json
│   └── api/project.json
└── libs/
    ├── ui/project.json
    └── utils/project.json
```

## Configuration (nx.json)

```json
{
  "targetDefaults": {
    "build": {
      "dependsOn": ["^build"],
      "inputs": ["production", "^production"],
      "cache": true
    },
    "test": {
      "inputs": ["default", "^production"],
      "cache": true
    }
  },
  "namedInputs": {
    "default": ["{projectRoot}/**/*", "sharedGlobals"],
    "production": ["default", "!{projectRoot}/**/*.spec.ts"]
  }
}
```

## Running Tasks

```bash
# Run target
nx build web
nx test api

# Run for all projects
nx run-many -t build
nx run-many -t build test lint

# Affected (changed since base)
nx affected -t build
nx affected -t test --base=main

# Graph
nx graph
```

## Generators

```bash
# Generate application
nx g @nx/react:app my-app
nx g @nx/node:app my-api

# Generate library
nx g @nx/react:lib ui --directory=libs/shared

# Generate component
nx g @nx/react:component button --project=ui

# Dry run
nx g @nx/react:lib feature --dry-run
```

## Plugins

```bash
# Add plugin
nx add @nx/react
nx add @nx/node
nx add @nx/vite
```

## Caching

```bash
# Skip cache
nx build web --skip-nx-cache

# Clear cache
nx reset
```

## Comparison: Nx vs Turborepo

| Feature | Nx | Turborepo |
|---------|-----|-----------|
| Configuration | TypeScript | JSON |
| Generators | Advanced | Basic |
| Plugins | 50+ | Limited |
| Module boundaries | Enforced | Manual |
| Learning curve | Steeper | Lower |

## When NOT to Use This Skill

- **Simple monorepos** - Turborepo has simpler configuration
- **Single package** - No need for monorepo tools
- **Quick setup needed** - Turborepo is faster to configure

## Anti-Patterns

| Anti-Pattern | Why It's Bad | Correct Approach |
|--------------|--------------|------------------|
| Ignoring module boundaries | Tight coupling | Enforce with @nx/enforce-module-boundaries |
| Circular dependencies | Build failures | Use nx graph to detect and fix |
| Not using affected | Wastes CI time | Always use nx affected in CI |
| Missing project tags | Can't enforce constraints | Tag all projects properly |
| No workspace generators | Inconsistent code | Create generators for common patterns |

## Quick Troubleshooting

| Issue | Cause | Solution |
|-------|-------|----------|
| Module boundary violation | Wrong import | Check depConstraints in .eslintrc.json |
| Circular dependency | Projects import each other | Use nx graph, refactor to shared lib |
| Affected not working | Missing dependencies | Check implicit dependencies |
| Cache not working | Missing outputs | Add outputs to target configuration |
| Build order wrong | Missing dependsOn | Add dependsOn: ["^build"] |

## Production Checklist

- [ ] nx.json configured
- [ ] project.json for each project
- [ ] Module boundaries with tags
- [ ] Affected in CI pipeline
- [ ] Nx Cloud for remote cache
- [ ] Generators for consistency

## Reference Documentation
- [Nx Docs](https://nx.dev/getting-started/intro)
Files in this package (2)
  • SKILL.md 4 KB
  • advanced.md 4 KB

Versions

RepositoryScoreLicence
This page · claude-dev-suite/claude-dev-suite100MIT
TerminalSkills/skills100Apache-2.0

Database snapshot: 13.11.2026 · package version 18711937a0d7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95monorepo
    Use this skill when the user says 'monorepo', 'Nx', 'Turborepo', 'NX', 'nx build', 'nx affected', 'workspace', 'dependency graph', 'build orchestration', 'remote caching', 'task orchestration', 'shared configuration', 'lerna', 'pnpm workspace', 'yarn workspace', 'npm workspace',…
  • 91turborepo
    Configure and troubleshoot Turborepo monorepos. Use for turbo.json, task pipelines, dependsOn, caching, filters, affected packages, CI optimization, environment variables, package boundaries, or shared internal packages.
  • 80role-fullstack:monorepo-management
    Manage monorepos with Turborepo (pipelines, local/remote caching, task graph) or Nx (generators, affected commands, module boundaries). Covers pnpm workspaces setup, shared packages (ui, types, utils, config, database, validators), cross-project dependency rules, and CI…
  • 100turborepo-monorepo
    Provides comprehensive Turborepo monorepo management guidance for TypeScript/JavaScript projects. Use when creating Turborepo workspaces, configuring turbo.json tasks, setting up Next.js/NestJS apps, managing test pipelines (Vitest/Jest), configuring CI/CD, implementing remote…
  • 100nx-workspace-patterns
    Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.
  • 95local-turborepo-8a2b3ad8
    Turborepo expert guidance. Use when setting up or optimizing monorepo builds, configuring task caching, remote caching, parallel execution, or the --affected flag for incremental CI.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.