angular-coding
16
总安装量
13
周安装量
#21637
全站排名
安装命令
npx skills add https://github.com/khaihuynhvn/mcp-server_ai-interaction --skill angular-coding
Agent 安装分布
claude-code
9
codex
8
gemini-cli
8
opencode
7
antigravity
5
Skill 文档
Angular Coding Standards
Version-aware Angular development patterns.
Pre-Edit Analysis
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).
Setup
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 |
Quick Reference
Naming Conventions (All Versions)
| Type | Convention | Example |
|---|---|---|
| Signal | Prefix $ |
$user, $state |
| Observable | Suffix $ |
isLoading$, data$ |
| Private | Prefix _ |
_destroyed$, _load() |
Core Principles
| 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 |
Decision Flow
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%)
File Index
- base.md – Common patterns all versions
- module-based.md – NgModule patterns (v13-14)
- standalone.md – Standalone components (v15+)
- signals.md – Signals API (v16+)
- control-flow.md – @if/@for/@defer (v17+)
- advanced-v18-19.md – Signal inputs, linkedSignal (v18+)