New advertisers: 50% off your first month with code FIRSTMONTHSee slots
nrwl avatar

Nx Generate

Generate Nx workspace code through local or plugin generators, with source reading, dry-runs, and verification built in.

skills.sh installs
4K
GitHub stars
29
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers discovery via npx nx list, option inspection with --help, and generator source reading before any run
  • Enforces --no-interactive, a --dry-run placement check, and a prefer-local-generator rule when both local and plugin generators apply
  • Includes a buildable versus non-buildable library decision table, with non-buildable as the default
  • Designed for scaffolding apps and libs, then running format plus build, lint, test, and typecheck across affected projects

Install

$ npx -y skills add nrwl/nx-ai-agents-config --skill nx-generate -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Run Nx Generator

Nx generators are powerful tools that scaffold projects, make automated code migrations or automate repetitive tasks in a monorepo. They ensure consistency across the codebase and reduce boilerplate work.

This skill applies when the user wants to:

  • Create new projects like libraries or applications
  • Scaffold features or boilerplate code
  • Run workspace-specific or custom generators
  • Do anything else that an nx generator exists for

Key Principles

  1. Always use --no-interactive - Prevents prompts that would hang execution
  2. Read the generator source code - The schema alone is not enough; understand what the generator actually does
  3. Match existing repo patterns - Study similar artifacts in the repo and follow their conventions
  4. Verify with lint/test/build/typecheck etc. - Generated code must pass verification. The listed targets are just an example, use what's appropriate for this workspace.

Steps

1. Discover Available Generators

Use the Nx CLI to discover available generators:

  • List all generators for a plugin: npx nx list @nx/react
  • View available plugins: npx nx list

Details

Repository
github.com/nrwl/nx-ai-agents-config
Categories
Frontend & UI Code, DevOps & Cloud

More from nrwl/nx-ai-agents-config

All 7

Similar to Nx Generate

More Frontend & UI Code