GravionLabs/elysion / .agents/skills/ng-implementation
ng-implementation
VerifiedAngular 21+ implementation and review rules (standalone, signals, DI, forms). Use when writing or changing Angular code.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.7 KB |
| references/component.md | markdown | 1.4 KB |
| references/mcp.md | markdown | 2.3 KB |
| references/signal-store.md | markdown | 982 B |
| references/version-notes.md | markdown | 3.0 KB |
SKILL.md
View on GitHub---
name: ng-implementation
description: 'Angular 21+ implementation and review rules (standalone, signals, DI, forms). Use when writing or changing Angular code.'
license: MIT
---
Paths to `references/` are relative to this skill's directory.
## Before writing code
- Run `ng version` first; conventions differ between majors. If it fails, use `npx @angular/cli@latest`.
- Generate with `ng generate`, then `ng build` immediately and fix errors before continuing.
- Do not guess APIs: use the Angular CLI MCP server or angular.dev. If the MCP server is not configured β read `references/mcp.md`.
- If working with Signal Forms, Angular Aria, `linkedSignal`/`resource`, functional route guards or Vitest setup β read `references/version-notes.md`.
The official `angular-developer` skill (dependency `angular/skills`) covers the basics: standalone components, signals, OnPush, control flow, DI, forms. Only project conventions follow.
## Conventions
- Standalone components only, no NgModules; do not add `standalone: true` (it is the default)
- Forms: Reactive Forms by default; Signal Forms (`@angular/forms/signals`) only when requested or already used in the codebase
- Subscriptions cleaned up via `DestroyRef` / `takeUntilDestroyed`
- Upgrades: one major at a time with `ng update`; `ng generate @angular/core:control-flow` migrates legacy templates
- Formatting: Angular stays on Prettier + angular-eslint (Biome lacks Angular template support and SCSS formatting); no `biome.json`
## File naming
Match the project's existing convention. New Angular 20+ projects follow the CLI default: no `.component` / `.service` suffix (`header.ts`, class `Header`); projects that still use `*.component.ts` keep it. Never mix both in one project.
## Libraries
- `ng generate library <name> --prefix=<prefix>` inside the workspace
- `public-api.ts` is the single export surface; no deep imports
- `ng-package.json`: `lib.entryFile` points to `public-api.ts`
- Verify with `ng build <lib>` before the task is complete
## Format
- Extensions: prettier `.ts .tsx .js .mjs .cjs .json .html .scss .css`; eslint only `.ts .tsx .js .mjs .cjs`
- Format: `npx --no-install prettier --write {files}` then `npx --no-install eslint --fix {files}`
- Check (read-only): `npx --no-install prettier --check {files}` and `npx --no-install eslint {files}`
- Biome project (`biome.json[c]`): `npx biome check --write --no-errors-on-unmatched {files}` / check `npx biome check --no-errors-on-unmatched {files}`
- Run after green tests, before the commit: `pwsh <implementation dir>/scripts/Format-Changed.ps1 -Language ng` (`-Check` for the check commands; not-configured, override: references/format.md of `implementation`)
## Tests
Load `ng-test` for TestBed setup, signal testing, mocking and async patterns.
## Review rules
- π΄ Lint run (`Format-Changed.ps1 -Lint -Language ng`, ESLint) exits non-zero: error-level findings; π‘ warning-level findings
- `OnPush`; signals for state, `computed()` for derived values
- `effect()` only for side effects, never for state updates (use `computed` or `linkedSignal`)
- `@if` / `@for` (with `track`) / `@switch`; `input()` / `output()`
- `inject()`; no constructor injection in new code
- Subscriptions cleaned up via `DestroyRef` / `takeUntilDestroyed`
- No complex template expressions; ARIA labels and `alt` text on interactive elements and images
- Library code exported only through `public-api.ts`
- New or changed behavior has tests per `ng-test`
## Scaffolding
- New standalone component β read `references/component.md`
- New NgRx Signal Store for feature state β read `references/signal-store.md`
## Related Skills
- `ng-ag-grid` β AG Grid Enterprise integration
- `ng-create-project` β new application or workspace
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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 implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |