nx-generate
Originally fromnrwl/nx-ai-agents-config
Installation
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
- 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.