Angular coding standards with version-aware patterns. Automatically detects Angular version from package.json and applies appropriate patterns. Use when writing Angular components, services, or TypeScript code.
Version-aware Angular development patterns.
Trước khi edit Angular code, read:
→ C:\Users\BLogic\.cursor\skills\project-scanner\SKILL.md
Quality gates cho high-risk edits (change signature, shared service, delete/rename).
Step 0: Scan Existing Patterns (Nếu project có code)
Trước khi tạo mới, scan project để follow convention đang dùng:
Glob: **/*.service.ts → Xem service pattern
Glob: **/*.component.ts → Xem component pattern
Glob: **/*.model.ts → Xem model/interface pattern
Grep: FormGroup → Xem form pattern
Step 1: Detect Angular Version
Read package.json and find @angular/core version:
"@angular/core": "^17.0.0" // → v17
"@angular/core": "~15.2.0" // → v15
Step 2: Load Appropriate Patterns
Based on detected version, read the relevant files:
| Version | Files to Read | |---------|---------------| | v13-14 | base.md + module-based.md | | v15-16 | base.md + standalone.md + signals.md (preview) | | v17 | base.md + standalone.md + signals.md + control-flow.md | | v18-19+ | base.md + standalone.md + signals.md + control-flow.md + advanced-v18-19.md |
| Type | Convention | Example |
|------|------------|---------|
| Signal | Prefix $ | $user, $state |
| Observable | Suffix $ | isLoading$, data$ |
| Private | Prefix _ | _destroyed$, _load() |
| Priority | Principle | Guideline | |----------|-----------|-----------| | 🥇 | Angular-native first | 95% dùng Angular built-in (reactive forms, validators, pipes, directives). 5% custom code khi Angular không hỗ trợ | | 🥈 | Performance | OnPush, signals, object mapping > array loop, minimal subscriptions | | 🥉 | Readability | Simple code, dễ đọc, dễ sửa cho dev khác. OOP + SOLID |
Có vấn đề cần giải quyết?
↓
Angular có built-in? (FormControl, Pipe, Directive, Validator...)
├─ YES → Dùng Angular (95%)
└─ NO → Tạo custom với SOLID pattern (5%)
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer