nx-generate

Scaffold Nx projects and run generators with dry-run validation.

7|2|Updated Jan 12, 2024
One-click install
npx skills add https://github.com/wghglory/ngx-lift-workspace --skill nx-generate-wghglory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generate
Source: https://github.com/wghglory/ngx-lift-workspace/tree/main/.opencode/skills/nx-generate
Command: npx skills add https://github.com/wghglory/ngx-lift-workspace --skill nx-generate-wghglory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the guesswork from creating and updating Nx workspace projects, helping you scaffold libraries, applications, and migrations in a way that matches the repository’s existing conventions.

Core Features & Use Cases

  • Generator Discovery: Finds the right Nx generator for the task, preferring local workspace generators when available.
  • Safe Scaffolding: Uses no-interactive, dry-run, and source-code inspection steps to avoid misplaced files and unexpected side effects.
  • Pattern Matching: Reviews similar projects in the repo so new code follows established naming, structure, and verification standards.
  • Use Case: Create a new Angular library, add a workspace feature, or run a migration while keeping the output aligned with existing monorepo practices.

Quick Start

Ask the assistant to create or update an Nx project using the appropriate generator, following the repository’s conventions and verification steps.

Frequently Asked Questions about nx-generate

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

FAQPage Schema
How do I scaffold an Nx monorepo library that matches existing repository conventions?

To scaffold an Nx monorepo library, this Skill discovers the appropriate local generator, inspects existing source code for naming and structural patterns, and validates the output through a dry-run before applying changes to ensure new code follows repository conventions.

How do I create an Angular application in an Nx workspace without triggering interactive prompts?

Creating an Angular application in an Nx workspace uses no-interactive execution and dry-run validation to safely generate boilerplate, inspecting similar projects to align the new application with established workspace patterns.

What is the safest way to run Nx code migrations across a monorepo?

Running Nx code migrations safely requires dry-run validation and source inspection to anticipate side effects, then executing the migration non-interactively followed by post-generation formatting and verification.

Can I use custom generators to set up feature boilerplate in an Nx workspace?

Yes, Nx workspace feature boilerplate can be set up using custom generators. The Skill prioritizes discovering local workspace generators and applies pattern matching to ensure the generated feature code matches existing structural standards.

Why does Nx generate place files in the wrong directory during monorepo scaffolding?

Misplaced files during Nx monorepo scaffolding occur when generator targets are not validated. This Skill prevents this by inspecting existing source code, reviewing similar projects, and performing a dry-run before actual code generation.

Do I need to manually format code after generating a new Nx project?

Manual formatting is not needed after Nx project generation. The Skill includes post-generation formatting and verification steps to ensure the newly scaffolded libraries and applications meet the repository's existing standards.