nx-generate

Generate code artifacts in an Nx monorepo using Nx generators.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/vinhgiang/pet-store --skill nx-generate-vinhgiang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generate
Source: https://github.com/vinhgiang/pet-store/tree/main/.cursor/skills/nx-generate
Command: npx skills add https://github.com/vinhgiang/pet-store --skill nx-generate-vinhgiang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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 effort.

Core Features & Use Cases

  • Project Scaffolding: Create new applications and libraries using predefined Nx generators.
  • Code Generation: Generate boilerplate code for features, components, or other code artifacts.
  • Workspace Customization: Utilize local workspace generators tailored to the repository's specific patterns.
  • Use Case: When a user wants to add a new React library to the monorepo for shared UI components, this skill will generate the necessary files and configurations following established project conventions.

Quick Start

Use the nx-generate skill to create a new React library named 'ui-common' within the 'libs' 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 code and scaffold new projects in an Nx monorepo?

To generate code in an Nx monorepo, use Nx generators to scaffold applications, libraries, and features. This approach leverages predefined or custom generators to automate boilerplate creation and ensure adherence to repository-specific patterns.

What is the best way to add a new shared UI library to an Nx monorepo?

The best way to add a shared UI library to an Nx monorepo is by using Nx generators for project scaffolding. This automatically generates the necessary files and configurations, such as placing a React library in the libs directory, following established conventions.

Does Nx code generation work with custom workspace generators?

Yes, Nx code generation supports custom workspace generators. You can utilize local workspace generators tailored to your repository's specific patterns, allowing for customized boilerplate code creation that matches your exact project configurations.

How do I automate boilerplate code creation for features in an Nx workspace?

You can automate boilerplate code creation for features in an Nx workspace by running Nx generators. These generators solve the problem of manual project setup by producing code artifacts that adhere to your predefined repository configurations.

Can I use Nx generators to create both applications and libraries?

Yes, you can use Nx generators to create both applications and libraries within a monorepo. This project scaffolding capability ensures consistency across newly created apps and shared libraries while reducing manual setup effort.