Skip to main content
skill CX Codex

nx-workspace · tech-leads-club — Claude Code skill: what it does, how to install

nx-workspace — a skill for exploring an Nx monorepo from the CLI: list projects, read resolved config, find affected projects and wire affected commands into CI.

MIT ★ 7,191 updated 2026-10-24

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tech-leads-club/agent-skills --skill nx-workspace -a claude-code
Open on GitHub

What nx-workspace does

The skill points the agent at the Nx CLI. nx show projects lists the workspace and accepts --type, --projects and --withTarget filters. For a single project the agent runs nx show project <name> --json. Reading project.json directly is discouraged because it holds only part of the configuration, so targets can go missing.

For change analysis there are nx show projects --affected --base=main and nx affected -t test --base=main, and nx graph opens the dependency graph. Bundled reference files cover nx.json and module boundaries, remote caching, a command reference, CI examples for GitHub Actions, GitLab CI, Jenkins, Azure Pipelines and CircleCI, and a troubleshooting guide. The skill also sorts libraries into feature, ui, data-access and util types.

Task running and code generation belong to other skills, nx-run-tasks and nx-generate. In CI, affected commands need the full git history, so set fetch-depth: 0 or they will not work. When the cache acts up, run nx reset.

What it helps with

  • list the apps and libraries in a monorepo
  • get the full resolved config and targets of one project
  • find projects touched by changes against main
  • add affected commands to a GitHub Actions or GitLab CI pipeline
  • reset the Nx cache when builds behave oddly

Example prompts for the agent

  • Show every app in this Nx workspace and the targets of each one
  • Which projects are affected compared to main? Use nx-workspace
  • Set up GitHub Actions to run nx affected -t test and add fetch-depth: 0

How to install nx-workspace

1Skills CLI (Vercel)

npx skills add tech-leads-club/agent-skills --skill nx-workspace -a claude-code

2Manually: put the files in place

~/.claude/skills/nx-workspace/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/nx-workspace/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about nx-workspace

How do I install nx-workspace in Claude Code?

Run npx skills add tech-leads-club/agent-skills --skill nx-workspace -a claude-code. The skill file lives at ~/.claude/skills/nx-workspace/SKILL.md.

What does nx-workspace do?

It helps the agent inspect an Nx monorepo: show projects and their full configuration, find affected projects, deal with the cache and set up CI.

How is nx-workspace different from nx-run-tasks and nx-generate?

nx-workspace covers structure, configuration and change analysis. Running tasks goes to nx-run-tasks, and code generators go to nx-generate.

Source text

SKILL.md · MIT
---
name: nx-workspace
description: 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).
---

# 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`/`yarn` if nx isn't installed globally.

## Core Commands

### List and Explore Projects

```bash
# 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.

```bash
# 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

```bash
# 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](reference/configuration.md) for:

- nx.json templates and options
- project.json structure
- Module boundary rules
- Remote caching setup

**Commands**: See [reference/commands.md](reference/commands.md) for:

- Complete command reference
- Advanced filtering options
- Common workflows

**CI/CD**: See [reference/ci-cd.md](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](reference/best-practices.md) for:

- Do's and don'ts
- Complete troubleshooting guide
- Performance optimization
- Migration guides

## Common Workflows

**"What's in this workspace?"**

```bash
nx show projects --type app  # List applications
nx show projects --type lib  # List libraries
```

**"How do I run project X?"**

```bash
nx show project X --json | jq '.targets | keys'
```

**"What changed?"**

```bash
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: 0` in CI)
- **Cache issues**: Run `nx reset`

For detailed troubleshooting, see [reference/best-practices.md](reference/best-practices.md).

© tech-leads-club · MIT · tech-leads-club/agent-skills

Similar skills

All skills for DevOps and infrastructure →

nx-workspace by other authors comes first.

nx-workspace nrwl A skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that gives AI agents the commands to navigate an Nx workspace. CX Codex +1 100,600installs pnpm-workspace oakoss pnpm-workspace teaches coding agents to configure pnpm monorepos and version catalogs. Useful when managing multi-package repositories. CX Codex +1 195installs nx-console nrwl nx-console — an MCP server for Nx monorepos in Claude Code, Cursor, Codex and other IDEs. Feeds the agent workspace structure, available generators, task configurations and up-to-date Nx docs. CX Codex +1 ★ 1,416repo stars nx-monorepo giuseppe-trisciuoglio A skill for Claude Code, Codex, Cursor, and other AI agents that guides Nx monorepo work in TypeScript and JavaScript projects. Covers workspace setup, project generation, affected commands, CI/CD pipelines, and Module Federation. CX Codex +1 4,000installs monorepo-ci-optimizer patricio0312rev monorepo-ci-optimizer — a CI skill for monorepos: it works out which packages a change touches and runs builds and tests only for those. Useful when every PR runs the whole workspace. CX Codex +1 264installs om-smart-test open-mercato om-smart-test — a skill that analyzes what files changed, identifies which tests matter, and runs only them. Saves time on large projects where a full test suite would take hours. CX Codex +1 991installs monorepo-management Seth Hobson The monorepo-management skill guides monorepo setup with Turborepo, Nx, and pnpm workspaces. Use it for builds, shared dependencies, CI/CD, and package releases. CX Codex +1 14,548installs

From the same set130

The whole set →
js-batch-dom-css js-batch-dom-css prevents layout thrashing by separating style updates from layout queries. Helps Claude write performant DOM and React code. CX Codex +1 ★ 7,191repo stars docs-writer The docs-writer skill creates, edits, and reviews project documentation. Use it for READMEs, Markdown files, and pages under docs/. CX Codex +1 ★ 7,191repo stars perf-astro The perf-astro Claude Code skill tunes Astro builds with inlined critical CSS, minification, non-blocking fonts and an LCP preload, aiming for 95+ Lighthouse scores. CX Codex +1 ★ 7,191repo stars tactical-ddd Audits domain models for anemia and refactors them into rich aggregates using tactical DDD patterns in Claude Code. CX Codex +1 ★ 7,191repo stars perf-web-optimization perf-web-optimization guides front-end performance tuning by shrinking JS bundles, deferring heavy scripts, and configuring cache headers. Best when pages load slowly or fail speed benchmarks. CX Codex +1 ★ 7,191repo stars state-context-interface The state-context-interface rule separates a component’s UI from its state implementation with a context split into state, actions, and meta. Use it when the same UI needs to work with different providers. CX Codex +1 ★ 7,191repo stars learning-opportunities learning-opportunities adds optional 10–15 minute exercises to a Claude session, so the person who shipped the code can still explain how it works. CX Codex +1 ★ 7,191repo stars confluence-assistant confluence-assistant operates Confluence spaces through Atlassian MCP tools. Helps Claude Code search team documentation, create structured pages, and update existing entries using Markdown. CX Codex +1 ★ 7,191repo stars

Project sponsors

Companies that keep this analytics open