
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-codeInstalls 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
- Always use
--no-interactive- Prevents prompts that would hang execution - Read the generator source code - The schema alone is not enough; understand what the generator actually does
- Match existing repo patterns - Study similar artifacts in the repo and follow their conventions
- 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