Skip to main content
skill CX Codex

run-nx-generator — Claude Code skill: what it does, how to install

run-nx-generator — a skill for Claude Code and other platforms that automates Nx generator execution. It streamlines code scaffolding and task automation in monorepos by prioritizing workspace plugins.

MIT 100 installs ★ 29,485 updated 2026-10-23

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add nrwl/nx --skill run-nx-generator -a claude-code
Open on GitHub

What run-nx-generator does

This skill enables AI agents to run Nx generators efficiently, focusing on internal tooling located in tools/workspace-plugin/. It integrates with mcp__nx-mcp__nx_generators and mcp__nx-mcp__nx_generator_schema to discover available generators and their options before execution.

When using this skill, the agent can scaffold new features or libraries directly. Best practices include running the --dry-run flag to preview changes, formatting the output with npx oxfmt, and verifying the results with nx affected -t test.

It serves as a helper for repetitive tasks, such as updating internal configurations or creating migrations. The skill ensures that custom internal solutions are prioritized over standard Nx generators, maintaining consistency across the repository.

What it helps with

  • scaffold new features or libraries
  • automate repetitive setup tasks
  • update internal tools and configurations
  • create migrations or version updates

Example prompts for the agent

  • Run the Nx generator to scaffold a new React component
  • List all available generators in this workspace
  • Get the schema for the @nx/workspace-plugin:bump-maven-version generator

How to install run-nx-generator

1Skills CLI (Vercel)

npx skills add nrwl/nx --skill run-nx-generator -a claude-code

2Manually: put the files in place

~/.claude/skills/run-nx-generator/SKILL.md

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

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

Questions about run-nx-generator

How to install run-nx-generator in Claude Code?

Run the command npx skills add nrwl/nx --skill run-nx-generator -a claude-code in your project terminal.

What does run-nx-generator do?

It helps the agent execute Nx generators, prioritizing custom workspace plugins over standard core generators to ensure your internal tools are used first.

What is required to use run-nx-generator?

You need an existing Nx workspace. The skill also relies on the mcp__nx-mcp__nx_generators and mcp__nx-mcp__nx_generator_schema tools for full functionality.

Source text

SKILL.md · MIT
---
name: run-nx-generator
description: Run Nx generators with prioritization for workspace-plugin generators. Use this when generating code, scaffolding new features, or automating repetitive tasks in the monorepo.
allowed-tools: Bash, Read, Glob, Grep, mcp__nx-mcp__nx_generators, mcp__nx-mcp__nx_generator_schema
---

# Run Nx Generator

This skill helps you execute Nx generators efficiently, with special focus on workspace-plugin generators from your internal tooling.

## Generator Priority List

Use the `mcp__nx-mcp__nx_generator_schema` tool to get more information about how to use the generator

Choose which generators to run in this priority order:

### 🔥 Workspace-Plugin Generators (High Priority)

These are your custom internal tools in `tools/workspace-plugin/`

### 📦 Core Nx Generators (Standard)

Only use these if workspace-plugin generators don't fit:

- `nx generate @nx/devkit:...` - DevKit utilities
- `nx generate @nx/node:...` - Node.js libraries
- `nx generate @nx/react:...` - React components and apps
- Framework-specific generators

## How to Run Generators

1. **List available generators**:

2. **Get generator schema** (to see available options):
   Use the `mcp__nx-mcp__nx_generator_schema` tool to get more information about how to use the generator

3. **Run the generator**:

   ```bash
   nx generate [generator-path] [options]
   ```

4. **Verify the changes**:
   - Review generated files
   - Run tests: `nx affected -t test`
   - Format code: `npx oxfmt [files]`

## Best Practices

- ✅ Always check workspace-plugin first - it has your custom solutions
- ✅ Use `--dry-run` flag to preview changes before applying
- ✅ Format generated code immediately with oxfmt
- ✅ Test affected projects after generation
- ✅ Commit generator changes separately from manual edits

## Examples

### Bumping Maven Version

When updating the Maven plugin version, use the workspace-plugin generator:

```bash
nx generate @nx/workspace-plugin:bump-maven-version \
  --newVersion 0.0.10 \
  --nxVersion 22.1.0-beta.7
```

This automates all the version bumping instead of manual file edits.

## When to Use This Skill

Use this skill when you need to:

- Generate new code or projects
- Scaffold new features or libraries
- Automate repetitive setup tasks
- Update internal tools and configurations
- Create migrations or version updates

© nrwl · MIT · nrwl/nx

Similar skills

All skills for Automation and no-code: n8n, Zapier, Make →

From the same set2

Project sponsors

Companies that keep this analytics open