run-nx-generator

Run Nx generators with priority for workspace-plugin generators in monorepos.

29.2k|3.0k|Updated Aug 11, 2017
One-click install
npx skills add https://github.com/nrwl/nx --skill run-nx-generator-nrwl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-nx-generator
Source: https://github.com/nrwl/nx/tree/main/.claude/skills/run-nx-generator
Command: npx skills add https://github.com/nrwl/nx --skill run-nx-generator-nrwl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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

Core Features & Use Cases

  • Priority-based Generator Execution: Prioritize workspace-plugin generators before core Nx generators to accelerate monorepo changes.
  • Guided Usage: Provides a clear workflow to list, inspect, and run generators safely.
  • Use Case: When you need to scaffold new features in a monorepo quickly, use workspace-plugin generators to apply consistent templates and configurations.

Quick Start

Use the workspace-plugin generator to scaffold a new feature in your Nx workspace, for example: nx generate @nx/workspace-plugin:create-nodes-plugin --name my-plugin

Frequently Asked Questions about run-nx-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate code generation in an Nx monorepo?

Automating code generation in Nx monorepos uses generators to scaffold features, update configurations, and run migrations consistently across projects. This Skill prioritizes workspace-plugin generators, which apply custom templates faster than core Nx generators, reducing manual scaffolding work and ensuring standardized outputs across your workspace.

What's the difference between workspace-plugin generators and core Nx generators?

Workspace-plugin generators are internal tooling custom-built for your monorepo; core Nx generators are built-in. Workspace-plugin generators execute with priority in this workflow, accelerating adoption of your team's conventions and reducing boilerplate for feature scaffolding specific to your codebase.

How do I preview generator changes before applying them?

Run generators with the --dry-run flag to preview changes without committing them. This workflow integrates --dry-run execution, allowing you to inspect generated files, review formatting, and run tests before applying updates to your monorepo.

Can I list available generators in my Nx workspace?

Yes, this Skill lists all available generators in your workspace and fetches their schemas to show required and optional parameters. You inspect generator options before execution, ensuring you configure scaffolding correctly for your monorepo structure.

Do I need to manually commit generator changes after running them?

No, this workflow automates code formatting and test execution after generation, then commits updates directly. You avoid manual review cycles for routine scaffolding tasks while maintaining version control integration across your monorepo.

When should I use generators versus manually writing code?

Use generators for repetitive scaffolding—new features, configuration updates, migrations, and version bumps—especially when consistency matters across multiple projects. Generator-based automation prevents drift, accelerates onboarding, and standardizes patterns across a monorepo; manual coding suits one-off, non-templatable work.