nx-generate

Generate applications and libraries using Nx generators within a monorepo.

Updated Oct 21, 2023
One-click install
npx skills add https://github.com/andre-goldmann/jdg.digital --skill nx-generate-andre-goldmann
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generate
Source: https://github.com/andre-goldmann/jdg.digital/tree/main/apps/.opencode/skills/nx-generate
Command: npx skills add https://github.com/andre-goldmann/jdg.digital --skill nx-generate-andre-goldmann

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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

Core Features & Use Cases

  • Code Scaffolding: Generate new apps, libraries, or features using predefined Nx generators.
  • Project Structure: Set up new project structures adhering to repository conventions.
  • Use Case: When a user asks to "create a new React component library for shared UI elements," this skill will identify and run the appropriate Nx generator to scaffold it.

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 scaffold a new library in an Nx monorepo?

To scaffold a new library in an Nx monorepo, use Nx generators to automatically create the project structure and boilerplate code. This ensures new libraries adhere to established repository conventions and patterns.

What is the best way to automate code generation for new applications in a monorepo?

Automating code generation for new applications in a monorepo is best handled by using Nx generators. They apply predefined schemas to scaffold projects, reducing boilerplate and enforcing structural consistency across the workspace.

Can I use Nx generators to create a shared React component library?

Yes, you can use Nx generators to create a shared React component library. When prompted to create UI elements, the generator identifies and runs the appropriate schema to scaffold the library within your specified directory.

Do I need to understand Nx CLI commands to generate project structures?

Yes, understanding Nx CLI commands and generator schemas is required to scaffold project structures effectively. This knowledge allows you to discover options and verify the source code when generating new applications and libraries.

Why use Nx for code scaffolding instead of manual project setup?

Using Nx for code scaffolding automates the creation of new projects and libraries, ensuring consistency across your monorepo. It eliminates manual boilerplate code creation and enforces adherence to established repository patterns.