nx-generators

Automate Nx generator creation with Nx DevKit and TypeScript tooling.

1|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/pantheon-org/opencode-plugins --skill nx-generators-pantheon-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-generators
Source: https://github.com/pantheon-org/opencode-plugins/tree/main/.opencode/skills/nx-generators
Command: npx skills add https://github.com/pantheon-org/opencode-plugins --skill nx-generators-pantheon-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Nx workspaces often require custom generators to automate scaffolding, enforce conventions, and accelerate project setup. This Skill helps teams create consistent Nx generators that streamline library and application creation, reducing boilerplate and errors.

Core Features & Use Cases

  • Generate and compose generators to scaffold code, templates, and configurations.
  • Enforce best practices in Nx workspaces by validating schemas and wiring up project structure.
  • Use cases include creating consistent plugin scaffolds, templates for libraries, and automated testing boilerplates.

Quick Start

Install dependencies, set up an Nx workspace, and run the provided generator skeleton with: nx generate @nx/plugin:generator plugins/<namespace>/src/generators/my-generator

Frequently Asked Questions about nx-generators

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

FAQPage Schema
How do I create custom Nx generators to scaffold libraries in a monorepo?

Custom Nx generators automate scaffolding for libraries and applications in monorepos by composing templates and configurations. You create them using the Nx Devkit and TypeScript to define generator logic, validate schemas, and wire up project structure.

What are Nx generators used for in workspace automation?

Nx generators are used to automate project scaffolding, enforce workspace conventions, and accelerate setup. They reduce boilerplate and errors by generating consistent code, templates, and configurations for libraries and applications.

Do I need TypeScript and Nx Devkit to build custom generators?

Yes, you need TypeScript and Nx Devkit to implement custom Nx generators. These tools provide the necessary APIs to define generator logic, create templates, and write unit tests for your scaffolding workflows.

What's the best way to enforce conventions when scaffolding new Nx projects?

The best way to enforce conventions is by building custom Nx generators. They validate schemas and standardize project structure, ensuring consistent plugin scaffolds and automated testing boilerplates across all newly created libraries and applications.

How do I compose multiple Nx generators together?

You compose multiple Nx generators by using Nx Devkit to chain their logic and templates. This allows you to scaffold complex project structures, combining code generation, configuration files, and automated testing boilerplates into one workflow.

When should I use custom Nx generators instead of manual scaffolding?

Use custom Nx generators when your monorepo requires consistent project structures, repeated boilerplate, or strict convention enforcement. If your workspace needs automated library and application creation with validated schemas, custom generators reduce manual errors.