Agent skill
angular-patterns
Angular 21 development patterns for this project. Use when writing or reviewing Angular components, services, templates, or tests.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/angular-patterns
SKILL.md
Angular Patterns
Component Design
- Use
input(),output(),viewChild(),contentChild()signal-based functions instead of decorators - Do not add
standalone: true—it's the default in Angular 20+ - Use
ChangeDetectionStrategy.OnPushfor performance - Use Angular control flow syntax (
@if,@for,@switch) instead of*ngIf/*ngFor - Use
hostobject in decorator instead of@HostBinding/@HostListener - Use
class/stylebindings instead ofngClass/ngStyle - Use
providedIn: 'root'for singleton services
State Management
- Use
signal(),computed(), andeffect()for reactive state - Use
update()orset()on signals—nevermutate() - Use
toSignal()when interoperating with RxJS observables
Templates
- Keep templates simple; move logic to component classes
- No arrow functions in templates (not supported)
- No globals like
new Date()in templates - Use
@forwithtrackfor efficient list rendering
Styling
- Use Tailwind CSS with
@applyfor composite styles - Reference styles:
@reference '../../../styles.css'; - Support dark mode via
.dark:variants
Testing
- Use
TestBedwith standalone component imports - Set inputs via
fixture.componentRef.setInput('name', value) - Mock HTTP requests and dependencies
- Run with
ng test --include path/to/file.spec.ts
Accessibility
- Must pass AXE checks and meet WCAG AA standards
- Ensure proper focus management and ARIA attributes
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?