angular-services
ALWAYS use when working with Angular Services, @Injectable, dependency injection, or business logic services.
Works with
Agent Skills format with YAML frontmatter. Claude Code reads it as-is.
---
name: "angular-services"
description: "ALWAYS use when working with Angular Services, @Injectable, dependency injection, or business logic services."
license: "MIT"
---
# Angular Services
**Version:** Angular 21 (2025)
**Tags:** Services, @Injectable, DI
**References:** [Services Guide](https://angular.dev/guide/services) • [@Injectable API](https://angular.io/api/core/Injectable)
## Best Practices
- Create service with providedIn
```ts
@Injectable({ providedIn: 'root' })
export class DataService {
getData() {
return this.http.get('/api/data');
}
}
```
- Use inject() function
```ts
@Injectable({ providedIn: 'root' })
export class UserService {
private http = inject(HttpClient);
getUsers() {
return this.http.get<User[]>('/api/users');
}
}
```
- Use factory providers
```ts
@Injectable({
providedIn: 'root',
useFactory: () => new LoggerService(environment.production)
})
export class LoggerService {
constructor(private isProduction: boolean) {}
}
```
- Use providedIn: 'any' for lazy services
```ts
@Injectable({ providedIn: 'any' })
export class LazyService {}
```
- Use service in component
```ts
@Component({})
export class MyComponent {
private dataService = inject(DataService);
data$ = this.dataService.getData();
}
```
- Use multiple services
```ts
@Component({})
export class MyComponent {
private auth = inject(AuthService);
private http = inject(HttpClient);
private router = inject(Router);
}
```
- Use service for shared state
```ts
@Injectable({ providedIn: 'root' })
export class CartService {
private items = signal<Item[]>([]);
cartItems = this.items.asReadonly();
addItem(item: Item) {
this.items.update(items => [...items, item]);
}
}
```More Frontend Frameworks skills
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
design-taste-frontend
leonxlnx/taste-skill
Anti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.

