nx-generate

Generate code artifacts in an Nx monorepo using Nx generators.

1|Updated Apr 15, 2025
One-click install
npx skills add https://github.com/shanieMoonlight/moonlight-repo --skill nx-generate-shaniemoonlight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generate
Source: https://github.com/shanieMoonlight/moonlight-repo/tree/main/.gemini/skills/nx-generate
Command: npx skills add https://github.com/shanieMoonlight/moonlight-repo --skill nx-generate-shaniemoonlight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of new projects, features, and boilerplate code within an Nx monorepo, ensuring consistency and reducing manual setup.

Core Features & Use Cases

  • Project Scaffolding: Generate new applications and libraries.
  • Code Generation: Create boilerplate for features, components, or other code structures.
  • Workspace Consistency: Adheres to established patterns and conventions within the monorepo.
  • Use Case: When a user requests to "create a new React feature library for the admin dashboard," this skill will identify and run the appropriate Nx generator.

Quick Start

Use the nx-generate skill to create a new React library named 'ui-common' within the 'libs/shared' directory.

Frequently Asked Questions about nx-generate

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

FAQPage Schema
How do I generate a new library in an Nx monorepo?

To generate a new library in an Nx monorepo, use Nx generators to scaffold the project. This automates the creation of applications and libraries, ensuring adherence to established workspace conventions and patterns.

What is Nx project scaffolding used for?

Nx project scaffolding is used to automate boilerplate code creation and set up new features within a monorepo. It ensures consistency across the workspace by adhering to established patterns, reducing manual setup for new applications and libraries.

Can I use custom local generators to scaffold monorepo features?

Yes, you can use custom local generators to scaffold monorepo features. The system supports both plugin-provided and local custom generators, with a preference for local generators to maintain workspace conventions.

Does Nx code generation work for creating React feature libraries?

Yes, Nx code generation works for creating React feature libraries. When requested, the system identifies and runs the appropriate Nx generator to scaffold the specific library within your designated directory structure.

What is the best way to maintain workspace consistency when creating new applications?

The best way to maintain workspace consistency when creating new applications is to use Nx generators. They automate project scaffolding and enforce established patterns and conventions within the monorepo during code generation.

Why use Nx generators instead of manual project setup in a monorepo?

Using Nx generators instead of manual project setup ensures strict adherence to workspace conventions and patterns. It automates the creation of code artifacts, reducing manual configuration errors and maintaining structural consistency across the monorepo.