Generate code using nx generators. USE WHEN scaffolding code or transforming existing code - for example creating libraries or apps, creating components, or anything else that is boilerplate code or automates repetitive tasks. ALWAYS use this first when generating code with Nx instead of calling MCP tools and running nx generate immediately.
View on GitHubnrwl/nx-ai-agents-config
nx
generated/nx-claude-plugin/skills/nx-generate/SKILL.md
January 23, 2026
Select agents to install to:
npx add-skill https://github.com/nrwl/nx-ai-agents-config/blob/main/generated/nx-claude-plugin/skills/nx-generate/SKILL.md -a claude-code --skill nx-generateInstallation paths:
.claude/skills/nx-generate/# Run Nx Generator Nx generators are powerful tools that scaffold code, create projects, add components, 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 libraries, applications, or projects - Add components, services, modules, or other code artifacts - Scaffold features or boilerplate code - Run workspace-specific or custom generators - Do anything else that an nx generator exists for ## Generator Discovery Flow ### Step 1: List Available Generators Use `mcp__nx-mcp__nx_generators` to get a list of all available generators in the workspace. This includes: - Plugin generators (e.g., `@nx/react:component`, `@nx/js:library`) - Local workspace generators (defined in the repo's own plugins) ### Step 2: Match Generator to User Request Based on the user's request, identify which generator(s) could fulfill their needs. Consider: - What artifact type they want to create (library, component, service, etc.) - Which framework or technology stack is relevant - Whether they mentioned specific generator names **IMPORTANT**: When both a local workspace generator and an external plugin generator could satisfy the request, **always prefer the local workspace generator**. Local generators are customized for the specific repo's patterns and conventions. It's possible that the user request is something that no Nx generator exists for whatsoever. In this case, you can stop using this skill and try to help the user another way. HOWEVER, the burden of proof for this is high. Before aborting, carefully consider each and every generator that's available. Look into details for any that could be related in any way before making this decision. ## Pre-Execution Checklist Before running any generator, complete these steps: ### 1. Fetch Generator Schema Use `mcp__nx-mcp__nx_generator_schema` to understand all available options.