nx-generate

Scaffold Nx monorepo projects using local workspace generators with dry-run validation.

Updated Oct 9, 2024
One-click install
npx skills add https://github.com/pengtoshi/pengtoshi-boilerplate --skill nx-generate-pengtoshi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generate
Source: https://github.com/pengtoshi/pengtoshi-boilerplate/tree/main/.cursor/skills/nx-generate
Command: npx skills add https://github.com/pengtoshi/pengtoshi-boilerplate --skill nx-generate-pengtoshi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffolds projects in a Nx monorepo using local workspace generators. This approach enforces consistency, accelerates setup, and reduces boilerplate when creating apps or libraries.

Core Features & Use Cases

  • Discover available generators and prefer local workspace generators to align with repository patterns.
  • Validate changes with dry-run before applying changes and follow up with verification steps (lint, test, typecheck) as appropriate.
  • Use cases include scaffolding new apps/libs, structuring project layouts, and applying standard conventions across the workspace.

Quick Start

Create a new app or library in your workspace using an appropriate nx generator with non-interactive mode.

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 app or library in an Nx monorepo?

Scaffold apps or libraries in an Nx monorepo using local workspace generators to enforce consistency and reduce boilerplate. It discovers available generators and applies repository patterns for new project creation.

What is the best way to ensure a new Nx project aligns with repo conventions?

Using local workspace generators ensures alignment with repository conventions when scaffolding new projects. They enforce standard layouts and patterns across the Nx monorepo workspace.

How do I validate an Nx generator before applying changes to my workspace?

Validate Nx generator changes before applying them by running a dry-run. This allows you to preview scaffolding actions and ensure correctness before modifying workspace files.

What verification steps should I run after scaffolding a project with Nx?

After scaffolding a project with Nx, run verification steps such as lint, test, and typecheck. These validate that the newly generated app or library integrates correctly into the workspace.

Can I use Nx generators in non-interactive mode for monorepo automation?

Yes, you can use Nx generators in non-interactive mode to scaffold applications and libraries programmatically. This accelerates monorepo automation by bypassing manual command-line prompts.

Why does scaffolding with local workspace generators reduce boilerplate in an Nx monorepo?

Scaffolding with local workspace generators reduces boilerplate by applying predefined templates to new apps or libraries. This enforces consistency and eliminates repetitive manual setup across the Nx monorepo.