nx-generate

Installation
Summary

Scaffold projects, libraries, and code using Nx generators with workspace pattern consistency.

  • Discovers and runs Nx generators for creating apps, libraries, features, and custom workspace artifacts
  • Prioritizes local workspace generators over plugin generators to maintain repo-specific conventions
  • Performs dry-run validation before execution to verify correct file placement and structure
  • Reads generator source code to understand actual behavior beyond schema, ensuring generated code matches existing patterns and passes verification (lint, test, build, typecheck)
SKILL.md

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

Related skills

More from nrwl/nx-ai-agents-config

Installs
1.7K
GitHub Stars
19
First Seen
Jan 27, 2026