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
- 01Create schematics and rules
- 02Generate files from templates
- 03Apply and move template sources
Use cases
- 01Build a custom Angular code generator
- 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-schematicsAfter installing, type/angular-schematicsin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/discussions/_INDEX.mdreferences/docs/_INDEX.mdreferences/issues/_INDEX.mdreferences/releases/_INDEX.mdDetails
From the project READMEAngular 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