angular-v21-development

Develop Angular v21 components, services, and directives with signals. Use when implementing standalone components, OnPush change detection, inject() function, and input()/output() functions.

16 stars

Best use case

angular-v21-development is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Develop Angular v21 components, services, and directives with signals. Use when implementing standalone components, OnPush change detection, inject() function, and input()/output() functions.

Teams using angular-v21-development should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/angular-v21-development/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/frontend/angular-v21-development/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/angular-v21-development/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How angular-v21-development Compares

Feature / Agentangular-v21-developmentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Develop Angular v21 components, services, and directives with signals. Use when implementing standalone components, OnPush change detection, inject() function, and input()/output() functions.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Angular v21 Development

Development guide for components, services, and directives based on Angular v21 modern patterns.

## When to Use This Skill

- Creating new components, services, or directives
- Implementing signals-based state management
- Implementing Reactive Forms
- Refactoring existing code to Angular v21 patterns
- Using inject() function for dependency injection

**When NOT to use:**

- Styling only → `tailwindcss-v4-styling`
- Page routing configuration → `analogjs-development`
- UI/UX design application → `material-design-3-expressive`

## Core Principles

- **Standalone First:** All components are standalone (do NOT write `standalone: true` in decorator, it's default)
- **OnPush Detection:** Always set `changeDetection: ChangeDetectionStrategy.OnPush`
- **Signals-First:** Prefer `signal()`, `computed()`, `effect()`
- **Modern DI:** Use `inject()` function instead of constructor injection
- **Function-Based APIs:** Use `input()` / `output()` functions instead of `@Input()` / `@Output()` decorators
- **Host Bindings in Decorator:** Use `host` object instead of `@HostBinding` / `@HostListener`
- **Native Control Flow:** Use `@if` / `@for` / `@switch` instead of `*ngIf` / `*ngFor` / `*ngSwitch`
- **Class Binding:** Use `[class]` binding instead of `ngClass`
- **Style Binding:** Use `[style]` binding instead of `ngStyle`

## Implementation Guidelines

### Component Creation

Patterns to apply when creating components:

1. Set `changeDetection: ChangeDetectionStrategy.OnPush` in `@Component` decorator
2. Define inputs/outputs with `input()` / `output()` functions
3. Calculate derived state with `computed()`
4. Use `@if` / `@for` / `@switch` control flow in templates

→ Details: [Component Examples](references/component-examples.md)

### Service Creation

Patterns to apply when creating services:

1. Use `@Injectable({ providedIn: 'root' })` for singleton
2. Inject dependencies with `inject()` function
3. Manage state with `signal()`, expose with `asReadonly()`
4. Define derived state with `computed()`
5. Update state with `set()` or `update()` (do NOT use `mutate()`)

→ Details: [Signal Patterns](references/signal-patterns.md)

### Reactive Forms

Patterns to apply when implementing forms:

1. Get `FormBuilder` via `inject()`
2. Use typed forms for type safety
3. Get values with `getRawValue()`
4. Add `ReactiveFormsModule` to imports

→ Details: [Component Examples](references/component-examples.md#reactive-forms)

### Host Bindings

Host binding implementation patterns:

1. Do NOT use `@HostBinding` / `@HostListener` decorators
2. Use `host` object in `@Component` / `@Directive` decorator

→ Details: [Component Examples](references/component-examples.md#host-bindings)

### Image Optimization

Patterns to apply when displaying images:

1. Use `NgOptimizedImage` (not for inline base64 images)
2. Always specify `width` / `height` attributes
3. Add `priority` attribute for above-the-fold images

→ Details: [Component Examples](references/component-examples.md#image-optimization)

## Workflow

1. **Requirement Check:** Define component responsibility and inputs/outputs
2. **TDD Red Phase:** Create test cases first
3. **TDD Green Phase:** Minimal implementation to pass tests
4. **TDD Refactor Phase:** Optimize code
5. **Pattern Verification:**
   - Is `changeDetection: ChangeDetectionStrategy.OnPush` set?
   - Are `input()` / `output()` functions used?
   - Is DI done with `inject()` function?
   - Are signals (`signal()`, `computed()`) used?
6. **Accessibility:** Check ARIA attributes, keyboard navigation

## Related Skills

- **analogjs-development:** Use together when creating page components (*.page.ts)
- **tailwindcss-v4-styling:** When styling is needed
- **material-design-3-expressive:** When applying UI/UX design patterns

## Reference Documentation

For detailed patterns and code examples, see:

- [Signal Patterns](references/signal-patterns.md) - Detailed signal usage
- [Component Examples](references/component-examples.md) - Various component patterns

Related Skills

vue-3-nuxt-3-development-cursorrules-prompt-file-cursorrules

16
from diegosouzapw/awesome-omni-skill

Apply for vue-3-nuxt-3-development-cursorrules-prompt-file. --- description: Applies to Vue 3 and Nuxt 3 projects, enforcing best practices for frontend development including TypeScript, TailwindCSS, and Composition API. globs: **/*.{vue,ts,js,jsx,tsx}

umbraco-development

16
from diegosouzapw/awesome-omni-skill

Apply when working with Umbraco CMS, Composers, services, or content APIs

Frontend Development

16
from diegosouzapw/awesome-omni-skill

พัฒนา Frontend ด้วย Angular, React, Vue, Next.js อย่างมืออาชีพ

frontend-angular-store

16
from diegosouzapw/awesome-omni-skill

Use when implementing state management with PlatformVmStore for complex components requiring reactive state, effects, and selectors.

frontend-angular-form

16
from diegosouzapw/awesome-omni-skill

Use when creating reactive forms with validation, async validators, dependent validation, and FormArrays using platform patterns.

frontend-angular-api-service

16
from diegosouzapw/awesome-omni-skill

Use when creating API services for backend communication with proper patterns for caching, error handling, and type safety.

App Development

16
from diegosouzapw/awesome-omni-skill

Build features in the AI Coaching Platform Next.js app. Use for creating pages, components, server actions, TanStack tables, and understanding application architecture.

angular

16
from diegosouzapw/awesome-omni-skill

Modern Angular (v20+) expert with deep knowledge of Signals, Standalone Components, Zoneless applications, SSR/Hydration, and reactive patterns.

angular-v17

16
from diegosouzapw/awesome-omni-skill

Angular 17. Proyecto usa este skill; contenido canónico en .ai-system.

angular-typescript-cursorrules-prompt-file-cursorrules

16
from diegosouzapw/awesome-omni-skill

Apply for angular-typescript-cursorrules-prompt-file. --- description: General rules for Angular components, focusing on code quality, performance, and maintainability. globs: **/*.component.ts

angular-tooling

16
from diegosouzapw/awesome-omni-skill

Use Angular CLI and development tools effectively in Angular v20+ projects. Use for project setup, code generation, building, testing, and configuration. Triggers on creating new projects, generating components/services/modules, configuring builds, running tests, or optimizing production builds.

angular-testing

16
from diegosouzapw/awesome-omni-skill

Write unit and integration tests for Angular v21+ applications using Vitest or Jasmine with TestBed, component harnesses, and modern testing patterns. Use for testing components with signals, OnPush change detection, services with inject(), and HTTP interactions. Triggers on test creation, testing signal-based components, mocking dependencies, or setting up test infrastructure.