mcpField
A
angular-schematics

angular-schematics

github.com/oguzhan18Development7184 installsUpdated 31w ago
Repository

About angular-schematics

A skill reference for building Angular schematics, aimed at developers creating code generators. It covers schematic rules and template-based file generation using the Angular schematics APIs.

Key features

  1. 01Create schematics and rules
  2. 02Generate files from templates
  3. 03Apply and move template sources

Use cases

  1. 01Build a custom Angular code generator
  2. 02Create files from options and templates

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/oguzhan18/angular-ecosystem-skills --skill angular-schematics

After installing, type/angular-schematicsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/discussions/
_INDEX.md
references/docs/
_INDEX.md
references/issues/
_INDEX.md
references/releases/
_INDEX.md

Details

From the project README

Angular Schematics

Version: Angular 21 (2025) Tags: Schematics, Generators, CLI, Code Generation

References: Schematics Guide • @schematics/angular

Best Practices

  • Create schematic
npm install -g @angular-devkit/schematics-cli
schematics schematics .:my-schematic
  • Create rule
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';

export function myScheme(options: any): Rule {
  return (tree: Tree, context: SchematicContext) => {
    tree.create(options.path + '/file.ts', 'content');
    return tree;
  };
}
  • Use templates
import { apply, url, template } from '@angular-devkit/schematics';

export function myScheme(options: any): Rule {
  const templateSource = apply(url('./files'), [
    template({ ...options }),
    move(options.path)
  ]);
  return chain([mergeWith(templateSource)]);
}

Comments

Markdown supported