angular-best-practices-v20▌
develite98/angular-best-practices · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Comprehensive performance optimization guide for Angular 20+ applications with modern features like Signals, httpResource, signal inputs/outputs, @defer blocks, and native control flow syntax. Contains 35+ rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
Angular Best Practices (v20+)
Comprehensive performance optimization guide for Angular 20+ applications with modern features like Signals, httpResource, signal inputs/outputs, @defer blocks, and native control flow syntax. Contains 35+ rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Writing new Angular 20+ components
- Using Signals for reactive state (signal, computed, linkedSignal, effect)
- Using httpResource/resource for data fetching
- Using signal inputs/outputs instead of decorators
- Implementing @defer for lazy loading
- Using native control flow (@if, @for, @switch)
- Implementing SSR with incremental hydration
- Reviewing code for performance issues
Key Features (v20+)
- Signals - Fine-grained reactivity (signal, computed, linkedSignal, effect)
- httpResource - Signal-based HTTP with automatic loading states
- Signal inputs/outputs - input(), output() replacing decorators
- @defer - Template-level lazy loading with hydration triggers
- @for / @if - Native control flow with required track
- Standalone by default - No standalone: true needed
- Host bindings - host object instead of @HostBinding decorators
- Functional interceptors - Simpler HTTP interceptors
- takeUntilDestroyed - Built-in subscription cleanup
- Incremental hydration - @defer (hydrate on ...) for SSR
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Change Detection | CRITICAL | change- |
| 2 | Bundle & Lazy Loading | CRITICAL | bundle- |
| 3 | RxJS Optimization | HIGH | rxjs- |
| 4 | Template Performance | HIGH | template- |
| 5 | Dependency Injection | MEDIUM-HIGH | di- |
| 6 | HTTP & Caching | MEDIUM | http- |
| 7 | Forms Optimization | MEDIUM | forms- |
| 8 | General Performance | LOW-MEDIUM | ssr- |
Quick Reference
1. Change Detection (CRITICAL)
change-signals- Use Signals instead of BehaviorSubject for reactive statechange-onpush- Use OnPush change detection strategychange-detach-reattach- Detach change detector for heavy operationschange-run-outside-zone- Run non-UI code outside NgZonecomponent-signal-io- Use signal inputs/outputs instead of @Input/@Output decoratorssignal-computed-pure- Keep computed() pure, no side effectssignal-effect-patterns- Use effect() correctly, avoid anti-patternssignal-linkedsignal- Use linkedSignal for derived + writable state
2. Bundle & Lazy Loading (CRITICAL)
bundle-standalone- Use standalone components (default in v20+)bundle-lazy-routes- Lazy load routes with loadComponent/loadChildrenbundle-defer- Use @defer blocks for heavy componentsbundle-preload- Preload routes on hover/focus for perceived speedbundle-no-barrel-imports- Avoid barrel files, use direct imports
3. RxJS Optimization (HIGH)
rxjs-async-pipe- Use async pipe instead of manual subscriptionsrxjs-takeuntil- Use takeUntilDestroyed for automatic cleanuprxjs-share-replay- Share observables to avoid duplicate requestsrxjs-operators- Use efficient RxJS operatorsrxjs-mapping-operators- Use correct mapping operators (switchMap vs exhaustMap)rxjs-no-nested-subscribe- Avoid nested subscriptions
4. Template Performance (HIGH)
template-trackby- Use track function in @for loops (required in v20+)template-pure-pipes- Use pure pipes for expensive transformationstemplate-ng-optimized-image- Use NgOptimizedImage for image optimizationtemplate-no-function-calls- Avoid function calls in templatestemplate-virtual-scroll- Use virtual scrolling for large lists
5. Dependency Injection (MEDIUM-HIGH)
di-provided-in-root- Use providedIn: 'root' for singleton servicesdi-injection-token- Use InjectionToken for non-class dependenciesdi-factory-providers- Use factory providers for complex initializationdirective-host-composition- Use hostDirectives for composition
6. HTTP & Caching (MEDIUM)
http-resource- Use httpResource/resource for signal-based data fetchinghttp-interceptors- Use functional interceptors for cross-cutting concernshttp-transfer-state- Use TransferState for SSR hydrationrouting-signal-inputs- Use signal-based route inputs
7. Forms Optimization (MEDIUM)
forms-reactive- Use reactive forms with typed FormGroup
8. General Performance (LOW-MEDIUM)
ssr-hydration- Use incremental hydration with @defer (hydrate on ...)perf-memory-leaks- Prevent memory leaks (timers, listeners, subscriptions)perf-web-workers- Offload heavy computation to Web Workersarch-smart-dumb-components- Use Smart/Dumb component pattern
How to Use
Read individual rule files for detailed explanations and code examples:
rules/change-signals.md
rules/bundle-defer.md
rules/http-resource.md
Each rule file contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Additional context and references
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md
How to use angular-best-practices-v20 on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add angular-best-practices-v20
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches angular-best-practices-v20 from GitHub repository develite98/angular-best-practices and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate angular-best-practices-v20. Access the skill through slash commands (e.g., /angular-best-practices-v20) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★67 reviews- ★★★★★Shikha Mishra· Dec 24, 2024
I recommend angular-best-practices-v20 for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Ganesh Mohane· Dec 20, 2024
We added angular-best-practices-v20 from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Amina Patel· Dec 16, 2024
angular-best-practices-v20 reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Amina Menon· Dec 12, 2024
Useful defaults in angular-best-practices-v20 — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Mateo Bansal· Dec 8, 2024
Registry listing for angular-best-practices-v20 matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Sophia Singh· Dec 4, 2024
Keeps context tight: angular-best-practices-v20 is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Alexander Khan· Dec 4, 2024
Solid pick for teams standardizing on skills: angular-best-practices-v20 is focused, and the summary matches what you get after install.
- ★★★★★Hana Perez· Dec 4, 2024
We added angular-best-practices-v20 from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Amina Johnson· Nov 27, 2024
angular-best-practices-v20 fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Hana Lopez· Nov 23, 2024
angular-best-practices-v20 is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 67