nrwl avatar

Nx Generate

This handles all the scaffolding work in Nx monorepos, from generating new apps and libraries to running custom workspace generators. It automatically discovers available generators, reads their source code to understand what they actually do (not just the schema), and matches your existing repo patterns before creating anything. The dry run step is smart, it catches the common directory flag gotcha where people accidentally generate files in the wrong location. It also has good opinions baked in, like defaulting to non-buildable libraries and always using no-interactive mode to avoid hanging on prompts. The verification step at the end runs your actual CI targets to make sure generated code doesn't break existing stuff. If you're working in an Nx workspace and need to create anything, this skill knows the right incantations.

skills.sh installs
3.9K
GitHub stars
30
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/nrwl/nx-ai-agents-config
Categories
Documentation, AI & Agent Building, Automation & Workflows, Sales & Marketing

More from nrwl/nx-ai-agents-config

All 7
1giuseppe-trisciuoglio avatarunit-test-parameterizedgiuseppe-trisciuoglio/developer-kitProvides parameterized testing patterns with JUnit 5, generates data-driven unit tests using @ParameterizedTest, @ValueSource, @CsvSource, @MethodSource. Create3.9Kskills.sh installs
2giuseppe-trisciuoglio avatarunit-test-json-serializationgiuseppe-trisciuoglio/developer-kitProvides patterns for unit testing JSON serialization/deserialization with Jackson and `@JsonTest`. Validates JSON mapping, custom serializers, date formats, an3.9Kskills.sh installs
3egonex-ai avatarunderstand-knowledgeegonex-ai/understand-anythingAnalyze a Karpathy-pattern LLM wiki knowledge base and generate an interactive knowledge graph with entity extraction, implicit relationships, and topic cluster3.9Kskills.sh installs
4minimax-ai avatarminimax-pdfminimax-ai/skillsUse this skill when visual quality and design identity matter for a PDF. CREATE (generate from scratch): "make a PDF", "generate a report", "write a proposal", 3.9Kskills.sh installs
5giuseppe-trisciuoglio avatarunit-test-exception-handlergiuseppe-trisciuoglio/developer-kitProvides patterns for unit testing `@ExceptionHandler` and `@ControllerAdvice` in Spring Boot applications. Validates error response formatting, mocks exception3.9Kskills.sh installs
6giuseppe-trisciuoglio avatarunit-test-mapper-convertergiuseppe-trisciuoglio/developer-kitProvides patterns for unit testing mappers, converters, and bean mappings. Validates entity-to-DTO and model transformation logic in isolation. Generates execut3.9Kskills.sh installs