Claude-skill-registry frontend-angular-store
Use when implementing state management with PlatformVmStore for complex components requiring reactive state, effects, and selectors.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/angular-store" ~/.claude/skills/majiayu000-claude-skill-registry-frontend-angular-store && rm -rf "$T"
manifest:
skills/data/angular-store/SKILL.mdsource content
Angular Store Development Workflow
Use when implementing PlatformVmStore state management for lists, CRUD, complex state, or shared/cached data.
Decision Tree
What kind of state? ├── Component-scoped CRUD list → @Injectable() + providers: [Store] ├── Shared state between components → @Injectable({ providedIn: 'root' }) ├── Form with dependent lookups → @Injectable() + forkJoin for parallel load ├── Cached lookup data → @Injectable({ providedIn: 'root' }) + enableCaching └── Simple component (no store) → Use AppBaseVmComponent instead
Workflow
- Search existing stores:
grep "{Feature}Store" --include="*.ts" - Read design system docs (see Read Directives below)
- Define state interface with all required properties
- Implement
with default statevmConstructor - Add selectors via
, effects viaselect()
, updaters viaeffectSimple()updateState() - Integrate with component: extend
, provide storeAppBaseVmStoreComponent - Verify checklist below
Key Rules
- Effects use
- second param auto-tracks loading stateeffectSimple(fn, 'requestKey') - State updates must be immutable:
updateState(state => ({ items: [...state.items, newItem] })) - Selectors are memoized via
- returnselect()Signal<T> - Use
inside effectstapResponse(success, error) - Component-scoped:
inproviders: [Store]@Component - Singleton cached:
+@Injectable({ providedIn: 'root' })enableCaching
File Location
src/Frontend/apps/{app-name}/src/app/features/{feature}/ ├── {feature}.store.ts └── {feature}.component.ts
⚠️ MUST READ Before Implementation
IMPORTANT: You MUST read these files before writing any code. Do NOT skip.
- ⚠️ MUST READ
— hierarchy, platform APIs.claude/skills/shared/angular-design-system.md - ⚠️ MUST READ
— BEM template examples.claude/skills/shared/bem-component-examples.md - ⚠️ MUST READ
— CRUD, dependent data, caching, integration.claude/skills/frontend-angular-store/references/store-patterns.md - ⚠️ MUST READ target app design system:
docs/design-system/06-state-management.md
Anti-Patterns
- Direct
withoutapi.subscribe()
- no loading state trackingeffectSimple
- mutates state directlythis.currentVm().items.push(newItem)- Missing
in component decoratorproviders: [Store] - Using
insideobserverLoadingErrorState
(it handles loading internally)effectSimple - Store as singleton when it should be component-scoped (or vice versa)
Verification Checklist
- State interface defines all required properties
-
provides default statevmConstructor - Effects use
with request keyeffectSimple() - Effects use
for handlingtapResponse() - Selectors use
for memoizationselect() - State updates are immutable
- Store provided at correct level (component vs root)
- Caching configured if needed (
,enableCaching
)cachedStateKeyName
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