Skip to content

GravionLabs/elysion / .agents/skills/ng-implementation

ng-implementation

Verified

Angular 21+ implementation and review rules (standalone, signals, DI, forms). Use when writing or changing Angular code.

FileKindSize
SKILL.mdskill md3.7 KB
references/component.mdmarkdown1.4 KB
references/mcp.mdmarkdown2.3 KB
references/signal-store.mdmarkdown982 B
references/version-notes.mdmarkdown3.0 KB

references/signal-store.md

View on GitHub
# Scaffold an NgRx Signal Store

Scaffold NgRx Signal Store for Angular feature state.

## Steps

1. Ask: feature name, state shape (fields + types + defaults), scope (`root` or feature), async operations needed
2. Create `<feature>.models.ts` with state interface and supporting types
3. Create `<feature>.store.ts`:

   ```typescript
   export const <Feature>Store = signalStore(
     { providedIn: 'root' },
     withState<FeatureState>(initialState),
     withComputed((store) => ({...})),
     withMethods((store) => ({...})),
     withHooks({ onInit(store) {...} })
   );
   ```
4. For async: use `rxMethod` or `patchState` with loading/error state fields
5. Register in component or feature providers as needed

## Constraints

- Use `@ngrx/signals` — not `@ngrx/store`
- Keep store files focused on a single feature slice
- Prefer `withComputed` for derived values over manual subscriptions
- Export store type: `type <Feature>Store = InstanceType<typeof <Feature>Store>`
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall