Agent skill
frontend-angular-component
Use when creating or modifying Angular components in Frontend (Angular 19) with proper base class inheritance, state management, and platform patterns.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/frontend-angular-component
SKILL.md
Angular Component Development Workflow
Use when creating/modifying Angular 19 components with EasyPlatform base classes.
Decision Tree
What type of component?
├── Simple display (no state) → AppBaseComponent
├── Mutable view model → AppBaseVmComponent
├── User input form → AppBaseFormComponent (see frontend-angular-form skill)
├── Complex state / CRUD / list → AppBaseVmStoreComponent (see frontend-angular-store skill)
└── Reusable presentational → AppBaseComponent + @Input/@Output
Rule: Always use AppBase* (not Platform* directly) to get auth/role context.
Workflow
- Search existing components:
grep "{Feature}Component" --include="*.ts" - Read design system docs (see Read Directives below)
- Select base class from decision tree above
- Create files:
{feature}.component.ts,.html,.scss, optionally.store.ts - Implement using patterns from references
- Verify checklist below
Key Rules
- Wrap content with
<app-loading-and-error-indicator [target]="this"> - Use
@for (item of items; track trackByItem)withngForTrackByItemProp - All subscriptions:
.pipe(this.untilDestroyed()).subscribe() - Store provided at component level:
providers: [FeatureStore] - All API calls through
PlatformApiServicesubclasses (neverHttpClientdirectly) - Place logic in LOWEST layer: Entity/Model > Service > Component
File Location
src/Frontend/apps/{app-name}/src/app/features/{feature}/
├── {feature}.component.ts|html|scss
└── {feature}.store.ts (if using store)
⚠️ MUST READ Before Implementation
IMPORTANT: You MUST read these files before writing any code. Do NOT skip.
- ⚠️ MUST READ
.claude/skills/shared/angular-design-system.md— hierarchy, SCSS, platform APIs - ⚠️ MUST READ
.claude/skills/shared/bem-component-examples.md— BEM HTML/SCSS examples - ⚠️ MUST READ
.claude/skills/frontend-angular-component/references/component-patterns.md— list, form, simple component patterns - ⚠️ MUST READ target app design system:
docs/design-system/README.mdand02-component-catalog.md
Anti-Patterns
extends PlatformComponentwhen auth needed -> useAppBaseComponentprivate sub: Subscription+ manual cleanup -> usethis.untilDestroyed()constructor(private http: HttpClient)-> usePlatformApiServicesubclass- Missing
<app-loading-and-error-indicator>wrapper - Template elements without BEM classes
Verification Checklist
- Correct
AppBase*class selected - Store provided at component level (if using store)
- Loading/error wrapped with
app-loading-and-error-indicator - All subscriptions use
untilDestroyed() - Track-by on
@forloops - Auth checks use
hasRole()from base class - All elements have BEM classes
IMPORTANT Task Planning Notes
- Always plan and break many small todo tasks
- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed
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?