angular-spa
Skill36 starsChanged 6 months agoMITView on GitHub
Angular 21.x SPA development skill with TailwindCSS 4.x and daisyUI 5.5.5. Use when building Angular standalone components, services, lazy-loaded routes, unit tests, or creating UI with TailwindCSS + daisyUI. Covers component scaffolding, UI/UX design, accessibility audits, and design systems.
In this repository157 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a2ui-angularSkill
- accessibility-auditSkill
- adk-deploy-guideSkill
- adk-dev-guideSkill
- adk-eval-guideSkill
- adk-observability-guideSkill
- agentic-ai-coding-standardSkill
- agentic-ai-devSkill
- ai-auditSkill
- ai-chatSkill
- ai-decision-recordSkill
- ai-incident-responseSkill
- ai-launch-checkSkill
- ai-playbookSkill
- angular-best-practicesSkill
- angularSkill
- angular-ui-patternsSkill
- api-design-principlesSkill
- app-store-optimizationSkill
- architect-reviewSkill
- architecture-decision-recordsSkill
- architecture-designSkill
- asc-cli-usageSkill
- asc-crash-triageSkill
- asc-id-resolverSkill
- asc-release-flowSkill
- asc-signing-setupSkill
- asc-submission-healthSkill
- asc-testflight-orchestrationSkill
- browser-testingSkill
- changelog-generatorSkill
- claude-actions-auditorSkill
- clean-codeSkill
- codebase-onboardingSkill
- code-explainerSkill
- code-reviewerSkill
- code-simplifierSkill
- comment-analyzerSkill
- database-schema-designerSkill
- ddd-architectSkill
- decision-frameworksSkill
- dedup-code-agentSkill
- deployment-ci-cdSkill
- design-systemSkill
- dockerSkill
- documentation-generationSkill
- domain-finderSkill
- error-detectiveSkill
- eval-guideSkill
- feature-forgeSkill
- firebase-basicsSkill
- firebase-hosting-basicsSkill
- fixing-accessibilitySkill
- fixing-motion-performanceSkill
- flutter-animationsSkill
- flutter-genuiSkill
- flutter-mobileSkill
- flutter-security-expertSkill
- frontend-designSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 5 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
ANIMATION LAW: Use @angular/animations for ALL interactive animations.
- Distinctive: line 33
Before generating code, consult these sources for current syntax and APIs:
- Very specific: line 54
Do NOT pass --standalone (removed/default since v19).
- Distinctive: line 58
Before creating or modifying any component template or styles:
- Distinctive: line 63
If not → read the reference files before writing any template or style code
- Very specific: line 108
NEVER: create NgModule — Angular 21 is fully standalone.
- Distinctive: line 109
NEVER: call HTTP or business logic directly in a component — delegate to an injectable service
- Very specific: line 112
NEVER: use @Input() / @Output() decorators for new code — use input(), output(), and model() signals (Angular 21 standard)
- Very specific: line 113
NEVER: use BehaviorSubject for component state — use signal() and computed()
- Very specific: line 117
NEVER: use *ngIf, *ngFor, *ngSwitch structural directives — use @if, @for, @switch control flow (Angular 17+, standard in v21)
- Very specific: line 118
NEVER: import CommonModule in standalone components — it is a compatibility shim.
- Very specific: line 122
NEVER: import HttpClientModule — use provideHttpClient() in app.config.ts (functional API)
- Very specific: line 126
NEVER: use ngOnDestroy to unsubscribe — use DestroyRef and takeUntilDestroyed() instead
- Very specific: line 129
NEVER: use document.getElementById or direct DOM manipulation — use viewChild() signal or Angular CDK
- Very specific: line 130
NEVER: use inline style="" attributes — use TailwindCSS utilities or SCSS
- Very specific: line 133
NEVER: use style="color: #3B82F6" inline — use class="text-primary"
- Very specific: line 134
NEVER: use hardcoded Tailwind primitive color classes like bg-blue-500 — use semantic bg-primary
- Very specific: line 135
NEVER: use style="padding: 16px" — use class="p-4"
- Very specific: line 140
Build failures (
NG0908,NullInjectorError): Read reference/angular-troubleshooting.md for common errors and fixes. - Very specific: line 142
TailwindCSS not applied: Verify .postcssrc.json exists (not postcss.config.js) and global styles use .css (not .scss).
- Very specific: line 144
Blank screen on load: Check browser console for lazy-loading errors.
- Distinctive: line 179
Never use primitive tokens directly in component CSS.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Iron Law
NO ANGULAR CODE WITHOUT READING reference/angular-conventions.md FIRST — conventions, folder structure, and daisyUI token rules are all there
STYLE LAW: Strictly follow https://angular.dev/style-guide for ALL naming, file structure, and code organization. See reference/angular-conventions.md for the quick reference.
ANIMATION LAW: Use @angular/animations for ALL interactive animations. Never raw CSS transitions on stateful elements. See reference/angular-animations.md.
Angular 21.x SPA Development Skill
Tech Stack: Angular 21+, TailwindCSS 4.x, daisyUI 5.5.5
Conventions & Structure
For code conventions, styling rules, design principles, key patterns, folder structure, and common commands, read
reference/angular-conventions.md
Documentation Sources
Before generating code, consult these sources for current syntax and APIs:
| Source | URL / Tool | Purpose |
| Angular v21 | angular-cli MCP (ng mcp) | Workspace-aware help, schematics, builds, best practices |
| Angular v21 | https://angular.dev/assets/context/llms-full.txt | Static docs bundle — API reference, deprecated features |
| daisyUI v5.5.5 | https://daisyui.com/llms.txt | Component reference, color system, themes |
| TailwindCSS / RxJS | Context7 MCP | Latest syntax, utilities, operators |
| Angular + Tailwind official guide | https://angular.dev/guide/tailwind | Canonical install steps, ng add tailwindcss, build integration |
Cross-check all Angular APIs and CLI flags against fetched docs — do NOT use deprecated or removed features.
For Angular & TypeScript best practices, read reference/angular-best-practices.md
Quick Scaffold — New Angular Project
npx @angular/cli@latest new my-app --style=scss --ssr=false
cd my-appDo NOT pass --standalone (removed/default since v19). Verify flags against fetched docs.
Before Writing Any UI Code
Before creating or modifying any component template or styles:
- Read
reference/daisyui-v5-components.md— for semantic color tokens and component patterns - Read
reference/tailwind-v4-config.md— for TailwindCSS 4.x setup constraints - Verify token awareness — can you name the color token (
bg-primary,text-base-content), spacing base (4px), and typography approach you will use? - If not → read the reference files before writing any template or style code
- For accessibility: read
reference/accessibility-checklist.mdbefore adding interactive elements
Process
- Understand Requirements — Clarify feature scope, API endpoints, data models, and UI requirements
- Scaffold Structure — Create feature folder under
src/app/features/<feature-name>/ - Generate Component — Read
reference/angular-templates.mdfor templates; create with signals-based state - Create Service — Read
reference/angular-templates.mdfor service template; implement API calls with HttpClient + RxJS - Configure Routes — Add lazy-loaded route using
loadComponentinapp.routes.tsor feature routes - Write Tests — Read
reference/angular-templates.mdfor test templates; write unit tests with zoneless TestBed - Style Component — Use daisyUI components + TailwindCSS utilities; fallback to SCSS with BEM naming
- Verify Build — Run
ng buildto ensure no compilation errors
Reference Files
Detailed patterns are in reference/:
Angular Best Practices & Code Templates
angular-best-practices.md— TypeScript, component, template, state management, services, forms, zoneless, accessibility, and testing best practicesangular-templates.md— Standalone component, service, lazy routes, app.config, interceptor, guard, and test templatesangular-troubleshooting.md— Common errors (NG0908, NullInjectorError, blank screen), CLI commands, and best practices
UI/UX & Design System
tailwind-v4-config.md— TailwindCSS 4.x setup, breaking changes from v3daisyui-v5-components.md— Full component reference, color system, themes, quick setup patternsangular-forms-fields.md— Input fields, select, textarea, checkbox, radio patternsangular-forms-validation.md— Validation patterns, error messages, async validatorsangular-forms-advanced.md— Multi-step forms, dynamic fields, form arraysangular-ui-tables.md— Table and grid patterns with sorting, filtering, paginationangular-ui-lists.md— List, card, and feed UI patternsangular-ui-navigation.md— Navigation, breadcrumbs, tabs, and sidebar patternsangular-ui-feedback-components.md— Toasts, dialogs, themes, error handling, utilitiesaccessibility-checklist.md— WCAG 2.1 AA checklist, ARIA patterns, test protocolangular-aria.md— Angular CDK accessible headless components (FocusTrap, ListKeyManager, LiveAnnouncer, Accordion, Combobox)component-harnesses.md— Angular CDK component harnesses for stable UI testingtesting-vitest.md— Vitest setup, zoneless TestBed, testing Signals and resource(), migration from Karmae2e-cypress.md— Cypress E2E setup, component testing, custom commands, data-cy conventionsmart-dumb-components.md— Smart (container) vs Dumb (presentational) component pattern, decision tree, signal-based examples, hard rules, file location enforcementangular-animations.md— Angular Animations API (animate.enter/animate.leave,trigger(),state(),keyframes(),stagger()), timing standards, animation rulesuser-research.md— Persona templates, journey mapping, usability testing, SUS survey
Anti-Patterns — What to Avoid
Architecture
- NEVER create
NgModule— Angular 21 is fully standalone; all components, pipes, and directives are standalone by default - NEVER call HTTP or business logic directly in a component — delegate to an injectable service
State & Change Detection
- NEVER use
@Input()/@Output()decorators for new code — useinput(),output(), andmodel()signals (Angular 21 standard) - NEVER use
BehaviorSubjectfor component state — usesignal()andcomputed() - NEVER rely on default change detection (
ChangeDetectionStrategy.Default) — always useOnPushwith signals
Templates
- NEVER use
*ngIf,*ngFor,*ngSwitchstructural directives — use@if,@for,@switchcontrol flow (Angular 17+, standard in v21) - NEVER import
CommonModulein standalone components — it is a compatibility shim; import nothing or use control flow syntax
Dependency Injection
- NEVER inject services via constructor parameters — use the
inject()function in Angular 21 - NEVER import
HttpClientModule— useprovideHttpClient()inapp.config.ts(functional API)
Subscriptions & Memory
- NEVER subscribe manually without
takeUntilDestroyed(destroyRef)— memory leaks in long-lived components - NEVER use
ngOnDestroyto unsubscribe — useDestroyRefandtakeUntilDestroyed()instead
DOM & Styling
- NEVER use
document.getElementByIdor direct DOM manipulation — useviewChild()signal or Angular CDK - NEVER use inline
style=""attributes — use TailwindCSS utilities or SCSS
Design Tokens
- NEVER use
style="color: #3B82F6"inline — useclass="text-primary" - NEVER use hardcoded Tailwind primitive color classes like
bg-blue-500— use semanticbg-primary - NEVER use
style="padding: 16px"— useclass="p-4" - NEVER use
style="font-size: 16px"— useclass="text-base"
Error Handling
Build failures (NG0908, NullInjectorError): Read reference/angular-troubleshooting.md for common errors and fixes.
TailwindCSS not applied: Verify .postcssrc.json exists (not postcss.config.js) and global styles use .css (not .scss).
Blank screen on load: Check browser console for lazy-loading errors. Verify route paths and loadComponent imports.
Common Commands
ng serve # Dev server (http://localhost:4200)
ng test --watch=false # Run unit tests once (no watch)
ng test # Run unit tests in watch mode
ng build # Production build
ng lint # ESLint check
ng generate component features/my-feature/my-component --standalone # Scaffold component
ng generate service features/my-feature/my-service # Scaffold serviceDesign Token System
Full token definitions are in .claude/skills/ui-standards-tokens/reference/ui-design-tokens.md. This section covers Angular-specific usage.
Token Hierarchy (3 Tiers)
Primitive → Semantic → Component/* Primitive */
--color-blue-500: #3B82F6;
/* Semantic */
--color-primary: var(--color-blue-500);
/* Component */
--button-bg-primary: var(--color-primary);Never use primitive tokens directly in component CSS. Components reference component tokens; component tokens reference semantic tokens.
daisyUI Token Mapping
| Category | daisyUI / Tailwind classes |
| Colors | bg-primary, text-base-content, bg-base-100/200/300, text-error, bg-success |
| Spacing | p-2 = 8px, p-4 = 16px, p-6 = 24px (4px base scale) |
| Typography | text-sm, text-base, text-lg, font-semibold, font-bold |
| Borders | rounded-sm, rounded-md, rounded-lg, rounded-full, border border-base-300 |
| Shadows | shadow-sm, shadow-md, shadow-xl |
| Motion | transition-all duration-200 |
| Z-index | custom CSS vars: --z-dropdown: 1000, --z-modal: 1050, --z-tooltip: 1070 |
Theme Switching
// theme.service.ts
import { Injectable } from '@angular/core';
@Injectable({ providedIn: 'root' })
export class ThemeService {
setTheme(theme: 'light' | 'dark' | 'custom'): void {
document.documentElement.setAttribute('data-theme', theme);
localStorage.setItem('theme', theme);
}
getTheme(): string {
return localStorage.getItem('theme') ?? 'light';
}
}daisyUI v5.5.5 uses the data-theme attribute on <html>. All daisyUI semantic classes switch automatically — no additional CSS is needed per component.
Verify
ng serve # Starts at http://localhost:4200 — no errors in terminal
ng test --watch=false # All unit tests pass
ng build # Exit code 0, no NG build errors
npx ng lint # Zero lint violations- App serves without console errors
- All Vitest unit tests pass (>90% coverage enforced)
- Production build completes successfully
- No TypeScript errors (
tsc --noEmit) - Shared components in
shared/components/have zeroinject()calls (dumb rule) - Service-injecting components live in
pages/orfeatures/(smart rule)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

