
Angular Schematics
If you're building custom Angular CLI commands or code generators, this is your reference. It covers the core schematics API from Angular 21, including creating rules, working with the Tree abstraction for file manipulation, and using templates to generate boilerplate code. The examples are straightforward: setting up a schematic project, writing basic rules that modify the file tree, and applying templates with the standard apply/url/template pattern. It's lean but hits the essential patterns you need when you're tired of manually scaffolding components or want to enforce project conventions through generated code. Good starting point if you're moving beyond using schematics to actually writing them.
- skills.sh installs
- 184
- GitHub stars
- 7
- last updated
- Aug 21, 2026
Install
$ npx -y skills add oguzhan18/angular-ecosystem-skills --skill angular-schematics --agent claude-codeInstalls into .claude/skills of the current project.
Files
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)]);
}
Sponsors
Details
- Repository
- github.com/oguzhan18/angular-ecosystem-skills
- Categories
- Frontend Development, CLI & Terminal
- First seen
- Jun 3, 2026
More from oguzhan18/angular-ecosystem-skills
All 45- Angular Components182
- Angular Destroyref182
- Angular Forms182
- Angular Pipes180
- Angular Resolvers179
- Angular Deferrable178
- Angular Resource178
- Angular Signals178
- Angular Signals Forms178
- Angular Reactive177
- Angular Directives176
- Angular Lifecycle176
- Angular Di175
- Angular Viewchild174
- Angular Cypress172
- Angular Router172
- Angular Control Flow170
- Angular Zoneless170
- Nx170
- Angular Signals Http169
- Angular Ssr168
- Angular Injector165
- Angular Query160
- Shadcn Ng152