nx-generate

Generate Nx monorepo projects with generator discovery and validation.

3|1|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/wahidyankf/ose-primer --skill nx-generate-wahidyankf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generate
Source: https://github.com/wahidyankf/ose-primer/tree/main/.opencode/skills/nx-generate
Command: npx skills add https://github.com/wahidyankf/ose-primer --skill nx-generate-wahidyankf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually creating Nx monorepo projects (apps, libraries, boilerplate) leads to inconsistent codebase structure, missed convention adherence, and wasted time on repetitive setup tasks.

Core Features & Use Cases

  • Generator Discovery & Matching: Automatically finds the correct local or plugin Nx generator for your request, prioritizing repo-specific local generators to match existing patterns.
  • Validation & Guardrails: Includes dry-run verification, generator source code review, and post-generation lint/test/typecheck validation to ensure generated code works out of the box.
  • Use Case: When adding a new shared utility library to a polyglot Nx monorepo, this skill generates the correctly structured library, aligns it with repo naming and configuration conventions, and runs verification to confirm it integrates with existing projects.

Quick Start

Ask the AI to create a new non-buildable React library named user-auth in the libs/features directory following the repo's existing library patterns.

Frequently Asked Questions about nx-generate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a new library in an Nx monorepo without breaking existing conventions?

Scaffolding an Nx monorepo library without breaking conventions requires automatically discovering repo-specific local generators to match existing patterns. This skill validates options, performs dry-run verification, and runs post-generation lint and type checks to ensure the new library integrates seamlessly with the existing codebase.

What is the best way to automate boilerplate code generation for Nx applications?

Automating boilerplate code generation for Nx applications is best handled by prioritizing local generators to align with workspace-specific configurations. This approach discovers the correct generator, validates input options, and executes post-generation quality checks to guarantee the new application works out of the box.

How does dry-run verification work when generating Nx monorepo projects?

Dry-run verification during Nx monorepo project generation simulates the scaffolding process to review generator source code and validate options before applying changes. This mechanism ensures generated artifacts align with repo-specific structural conventions and prevents inconsistent codebase modifications before execution.

Can I use this to create a shared utility library in a polyglot Nx monorepo?

Yes, you can use this to create a shared utility library in a polyglot Nx monorepo. It generates the correctly structured library, aligns it with repo naming and configuration conventions, and runs verification to confirm the generated project integrates with existing monorepo projects without manual setup.

Why does manual Nx app scaffolding lead to inconsistent codebase structure?

Manual Nx app scaffolding leads to inconsistent codebase structure because it relies on repetitive setup tasks and easily misses convention adherence. Automating generator discovery and pattern alignment eliminates wasted time and ensures new projects follow strict repo-specific structural and configuration rules consistently.