nx-generate

Generates code artifacts in an Nx monorepo using Nx generators.

11|2|Updated Apr 17, 2023
One-click install
npx skills add https://github.com/Eventiva/Eventiva --skill nx-generate-eventiva
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generate
Source: https://github.com/Eventiva/Eventiva/tree/main/.cursor/skills/nx-generate
Command: npx skills add https://github.com/Eventiva/Eventiva --skill nx-generate-eventiva

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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

Core Features & Use Cases

  • Code Scaffolding: Generates new Nx projects (apps/libs) based on predefined templates.
  • Workspace Consistency: Enforces project structure and conventions across the monorepo.
  • Use Case: Quickly set up a new React library for shared components using npx nx g @nx/react:library --directory=libs/shared/ui.

Quick Start

Use the nx-generate skill to create a new React library named 'my-feature-lib' 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 scaffold a new library in an Nx monorepo?

To scaffold a new library in an Nx monorepo, use Nx generators to automate project creation based on predefined templates, ensuring workspace consistency. This enforces conventions by applying commands like `npx nx g @nx/react:library` to generate the desired directory structure.

What is code scaffolding used for in a monorepo?

Code scaffolding in a monorepo automates the creation of new applications, libraries, features, and boilerplate. It enforces project structure and conventions, ensuring workspace consistency while reducing manual setup efforts.

Does Nx code generation work with existing repo patterns?

Yes, Nx code generation requires adherence to existing repo patterns when scaffolding new projects. It applies templates to maintain workspace consistency, ensuring newly generated applications and libraries align with established monorepo conventions.

When do I need to use Nx generators for project structure?

You need Nx generators for project structure when requiring automated setup for new applications, libraries, or features within an Nx monorepo. This ensures workspace consistency and reduces manual boilerplate configuration across your development environment.

What is the best way to verify code generated by Nx?

The best way to verify code generated by Nx is to run build, lint, and test targets immediately after scaffolding. This ensures newly created projects, libraries, or features integrate correctly with existing monorepo patterns and pass quality checks.