nx-generate

Generate consistent Nx monorepo scaffolds with dry-run verification.

6|4|Updated Nov 1, 2025
One-click install
npx skills add https://github.com/Montte-erp/montte-nx --skill nx-generate-montte-erp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generate
Source: https://github.com/Montte-erp/montte-nx/tree/main/.opencode/skills/nx-generate
Command: npx skills add https://github.com/Montte-erp/montte-nx --skill nx-generate-montte-erp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generating and maintaining consistent project structure and boilerplate in an Nx monorepo is error-prone when done manually; this Skill removes that friction by using Nx generators to scaffold projects, enforce workspace conventions, and reduce human mistakes.

Core Features & Use Cases

  • Generator discovery and selection: Locate available plugin and local workspace generators and prefer local workspace generators when present.
  • Safe, non-interactive execution: Always run generators with --no-interactive and perform a dry-run to verify file placement before making changes.
  • Source inspection and verification: Read generator source code to understand side effects, adjust options to match repo patterns, and run formatting and verification (lint/test/build/typecheck) after generation.
  • Use Case: Create a new library or app following repo naming and layout conventions, or run workspace migrations to update multiple projects consistently.

Quick Start

Scaffold a new non-buildable library in libs/my-lib using the repository's preferred Nx generator, prefer a local workspace generator, run the generator with dry-run and --no-interactive to verify placement, then format and run verification targets.

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 Nx library without triggering interactive prompts?

Scaffold an Nx library without interactive prompts by running the generator with the --no-interactive flag. This ensures non-interactive execution, preventing the process from hanging during automated workflows.

What is the best way to verify file placement before an Nx generator modifies my monorepo?

Verify file placement before modifying an Nx monorepo by performing a dry-run. Running the generator with dry-run verification allows you to preview exactly where files will be placed without writing them.

How does source inspection help when generating feature scaffolds in an Nx workspace?

Source inspection helps generate feature scaffolds by reading generator source code to understand side effects. This allows you to adjust options to match existing repository patterns and conventions accurately before execution.

Can I use local workspace generators instead of plugin generators for consistent project structure?

Yes, you can use local workspace generators. The system prefers local workspace generators over plugin generators when present to ensure your project structure and boilerplate follow specific repository conventions.

What should I run after creating a new application in an Nx monorepo to ensure it passes verification?

After creating an application in an Nx monorepo, run formatting and verification targets. This means executing lint, test, build, and typecheck commands to verify the scaffolded code integrates correctly.

Why use an automated generator for monorepo boilerplate instead of manually creating files?

Using an automated Nx generator for monorepo boilerplate removes the friction of manual file creation. It enforces workspace conventions, ensures structural consistency, and reduces human mistakes during project setup.