skills/angular/SKILL.md
Angular 20+ architecture with Scope Rule, Screaming Architecture, standalone components, and signals. Trigger: When writing Angular components, services, templates, or making architectural decisions about component placement.
npx skillsauth add alan-thegentleman/gentle-ai-enterprise scope-rule-architect-angularInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
standalone: trueinput() and output() functions instead of decoratorsChangeDetectionStrategy.OnPush for all componentsinject() instead of constructor injectionanyngOnInit — use signals and computed insteadsignal(), computed(), and effect()@if, @for, @switch) instead of structural directives@defer for lazy loading content and performanceclass and style bindings over ngClass and ngStyleNgOptimizedImage for all static images.component, .service, .module suffixes in filenames — the name should tell the behavior"Scope determines structure"
src/
app/
features/
[feature-name]/
[feature-name].ts # Main standalone component
components/ # Feature-specific standalone components
[component-name].ts
services/ # Feature-specific services with inject()
[service-name].ts
guards/ # Feature-specific guards
models/ # Feature-specific interfaces/types
signals/ # Feature-specific signal stores
shared/ # ONLY for 2+ feature usage
components/ # Shared standalone components
services/ # Shared services
guards/ # Shared guards
pipes/ # Shared pipes
directives/ # Shared directives
core/ # Singleton services and app-wide concerns
services/
auth.ts
api.ts
interceptors/
guards/
main.ts # Bootstrap with standalone component
app.config.ts # App configuration
app.ts # Root standalone component
routes.ts # Route configuration
{
"paths": {
"@features/*": ["src/app/features/*"],
"@shared/*": ["src/app/features/shared/*"],
"@core/*": ["src/app/core/*"]
}
}
import {
Component,
ChangeDetectionStrategy,
signal,
computed,
input,
output,
inject,
} from "@angular/core";
@Component({
selector: "app-feature-name",
imports: [/* required dependencies */],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
@if (isLoading()) {
<div>Loading...</div>
} @else {
@for (item of items(); track item.id) {
<div>{{ item.name }}</div>
}
}
`,
})
export class FeatureNameComponent {
// Use input() function instead of @Input()
readonly data = input<DataType>();
readonly config = input({ required: true });
// Use output() function instead of @Output()
readonly itemSelected = output<ItemType>();
// Use signals for state
private readonly loading = signal(false);
readonly isLoading = this.loading.asReadonly();
// Use computed for derived state
readonly items = computed(
() => this.data()?.filter((item) => item.active) ?? [],
);
// Use inject() instead of constructor injection
private readonly service = inject(FeatureService);
}
import { Injectable, signal, computed, inject } from "@angular/core";
@Injectable({
providedIn: "root",
})
export class FeatureService {
private readonly http = inject(HttpClient);
// Private signals for internal state
private readonly _state = signal<FeatureState>({
items: [],
loading: false,
error: null,
});
// Public readonly computed values
readonly items = computed(() => this._state().items);
readonly loading = computed(() => this._state().loading);
readonly error = computed(() => this._state().error);
loadItems(): void {
this._state.update((state) => ({ ...state, loading: true }));
// Implementation
}
}
providedIn: 'root' for shared services, local provision for feature-specific servicesdevelopment
TypeScript strict patterns and best practices. Trigger: When writing TypeScript code - types, interfaces, generics.
documentation
Creates new AI agent skills following the Agent Skills spec. Trigger: When user asks to create a new skill, add agent instructions, or document patterns for AI.
testing
Validate that implementation matches specs, design, and tasks. Trigger: When the orchestrator launches you to verify a completed (or partially completed) change.
testing
Break down a change into an implementation task checklist. Trigger: When the orchestrator launches you to create or update the task breakdown for a change.