nx-generate

Run Nx generators non-interactively to scaffold apps and libraries.

1|Updated Jul 15, 2024
One-click install
npx skills add https://github.com/EelcoLos/nx-tinkering --skill nx-generate-eelcolos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generate
Source: https://github.com/EelcoLos/nx-tinkering/tree/main/.gemini/skills/nx-generate
Command: npx skills add https://github.com/EelcoLos/nx-tinkering --skill nx-generate-eelcolos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers quickly scaffold Nx-based projects (apps and libs) within a monorepo by providing a clear, reusable workflow for generator usage and repository conventions.

Core Features & Use Cases

  • Discover and invoke the appropriate Nx generators to scaffold new apps, libraries, or features with consistent structure.
  • Enforce non-interactive execution (-no-interactive) to ensure automation-friendly runs and predictable outputs.
  • Audit generated layouts with repository conventions by reviewing generator sources and existing patterns.

Quick Start

Ask me to scaffold a new library named my-lib in the workspace using an Nx generator.

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 interactive prompts?

To scaffold a new library in an Nx monorepo without interactive prompts, use the appropriate Nx generator with the --no-interactive flag. This enforces automation-friendly execution, ensuring predictable outputs while aligning with repository conventions for consistent project structuring.

What is the best way to automate generating apps and libraries in an Nx workspace?

The best way to automate generating apps and libraries in an Nx workspace is by invoking Nx generators with non-interactive execution. Investigating generator sources and validating outputs with lint, test, build, and typecheck ensures the scaffolding safely aligns with existing patterns.

Can I use Nx generators to create features that match my existing repository conventions?

Yes, you can use Nx generators to create features that match existing repository conventions. By auditing generated layouts against existing patterns and reviewing generator sources, the scaffolding process maintains structural consistency across new apps and libraries.

How do I validate that an Nx generated project is safe and ready for use?

To validate that an Nx generated project is safe and ready for use, run lint, test, build, and typecheck commands after scaffolding. This validation ensures the newly generated app or library integrates correctly without breaking existing monorepo functionality.

Why does my Nx generator execution stall in an automated environment?

Your Nx generator execution stalls in an automated environment because it is waiting for interactive input. Enforcing non-interactive execution by applying the --no-interactive flag allows the generator to run predictably without pausing for user prompts.

When should I avoid interactive prompts during Nx monorepo scaffolding?

You should avoid interactive prompts during Nx monorepo scaffolding when running in automated environments or pipelines. Enforcing --no-interactive ensures the generator executes without pausing, providing predictable outputs for new apps and libraries.