Prompt file imported from GranatenUdo/claudify (
.claude/commands/add-frontend-feature.md). Fill in{{arguments}}before use. Copyright stays with the author.
🎨 Frontend Feature: {{arguments}}
Phase 1: Parallel Design & Implementation (90 seconds)
@Task( description="UX design", prompt="Design UX for '{{arguments}}':
DELIVER:
- User flows and wireframes
- Component hierarchy
- Interaction patterns
- Responsive layouts
- Error states and loading UX
OUTPUT: Complete UX specification", subagent_type="ux-design-expert" )
@Task( description="Implementation", prompt="Implement '{{arguments}}' frontend:
PATTERN DETECTION (REQUIRED)
Examine existing code to detect conventions:
- Use Glob to find 2-3 similar files:
- Frontend components: /src/app//*.component.ts
- Frontend services: /src/app//*.service.ts
- Read those files and detect:
- Signal usage vs observables
- Change detection strategy (OnPush vs Default)
- Template syntax (*ngIf vs @if)
- Service patterns (BaseApiService inheritance)
- Error handling approach
- State management pattern
- Apply the patterns you observed
If no code files found, examine project configuration:
- Read package.json to check installed packages:
- @angular/core version 18+? Use signals and @if/@for syntax
- @angular/core version <18? Use observables and *ngIf/*ngFor
- ngrx or akita installed? Use that state management
- Check angular.json for project configuration and defaults
- Check CLAUDE.md for specified patterns
- If still unclear, ask user:
- "No existing code found. What patterns do you prefer?"
- "Options: Signals vs Observables, OnPush vs Default, @if vs *ngIf"
- Use user's explicit choice
Step 2: Generate Code
CREATE:
- Angular component(s) following project conventions
- TypeScript service(s) with appropriate error handling
- HTML template(s) with responsive design
- Component styles (CSS/SCSS)
USE: Angular 19 features, TypeScript, CLAUDE.md patterns OUTPUT: Working implementation", subagent_type="frontend-implementation-expert" )
@Task( description="Visual design", prompt="Style '{{arguments}}' UI:
DESIGN:
- Color schemes and typography
- Icons and visual elements
- Animations and transitions
- Visual hierarchy
OUTPUT: Beautiful, polished UI", subagent_type="visual-design-expert" )
@Task( description="Tests", prompt="Test '{{arguments}}' frontend:
PATTERN DETECTION (REQUIRED)
Examine existing test files:
- Use Glob: **/.spec.ts or **/.test.ts
- Read 1-2 test files and detect:
- Test framework (Jasmine vs Jest)
- Test patterns (AAA vs BDD)
- Mock approach (spies vs jest mocks)
- Apply observed patterns
If no test files found, examine project configuration:
- Read package.json to check test dependencies:
- jest installed? Use Jest patterns and mocks
- jasmine-core installed? Use Jasmine patterns and spies
- karma installed? Use Karma configuration
- Check angular.json test configuration
- Check CLAUDE.md for specified test patterns
- If still unclear, ask user:
- "No existing tests found. What test framework do you prefer?"
- "Options: Jest, Jasmine/Karma"
- Use user's explicit choice
CREATE:
- Component tests (test component logic and rendering)
- Service tests with mocked HTTP
- User interaction tests
- Test data factories if mock-data-helpers exist
OUTPUT: Comprehensive test suite", subagent_type="test-quality-analyzer" )
Phase 2: Parallel Validation (30 seconds)
@Bash(command="npm run update:api", description="Sync API") @Bash(command="npm run build", description="Build") @Bash(command="npm test -- --watch=false", description="Test") @Bash(command="npm run lint && npm run typecheck", description="Validate")
✅ Complete
Frontend feature with UX, implementation, and tests.
Remember to update CHANGELOG.md under "### Added" section.
