nx-generators

Run Nx generators to create new projects, libraries, components. Use when user needs to generate code, scaffold projects, or understand generator options.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 5, 2026

When & Why to Use This Skill

This Claude skill automates the use of Nx generators to streamline development workflows within monorepos. It enables users to efficiently scaffold new projects, libraries, and components while providing deep insights into generator options and configurations. By integrating Nx CLI commands, it ensures consistent project structures, reduces manual boilerplate setup, and helps developers maintain high-quality codebases through automated formatting and dry-run previews.

Use Cases

  • Project Scaffolding: Quickly initialize new applications or libraries within an existing Nx workspace using standardized templates for React, Angular, or Node.js.
  • Component & Feature Generation: Automatically create UI components, services, or state management modules with pre-configured testing and styling files.
  • Generator Discovery: List and explore available plugins and generators to identify the best tools for specific architectural needs without leaving the terminal environment.
  • Safe Code Execution: Use the dry-run capability to preview file system changes and validate generator options before committing changes to the codebase.
  • Workspace Standardization: Ensure all generated code adheres to project-wide standards by automatically running formatting tools like Prettier after generation.
namenx-generators
descriptionRun Nx generators to create new projects, libraries, components. Use when user needs to generate code, scaffold projects, or understand generator options.
allowed-toolsBash, Glob, Grep, Read

Nx Generators

Finding and Installing new plugins

  • List plugins: pnpm nx list
  • Install plugins pnpm nx add <plugin>. Example: pnpm nx add @nx/react.

Commands

  • List generators for plugin: pnpm nx list @nx/react
  • Generator help: pnpm nx g @nx/react:application --help
  • Dry run: pnpm nx g @nx/react:application myapp --dry-run
  • Execute: pnpm nx g @nx/react:application myapp

Workflow

  1. Identify which plugin has needed generator
  2. Check generator options with --help
  3. Use --dry-run to preview changes
  4. Execute generator
  5. Run pnpm nx format:write after generation