Agent-skills-standard angular-tooling
Angular CLI usage, code generation, build configuration, and bundle optimization. Use when creating Angular projects, generating components/services/guards, configuring builds, running tests, or analyzing bundles. (triggers: angular.json, ng generate, ng build, ng serve, ng test, ng add, angular cli, bundle analysis)
install
source · Clone the upstream repo
git clone https://github.com/HoangNguyen0403/agent-skills-standard
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/HoangNguyen0403/agent-skills-standard "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/angular/angular-tooling" ~/.claude/skills/hoangnguyen0403-agent-skills-standard-angular-tooling && rm -rf "$T"
manifest:
skills/angular/angular-tooling/SKILL.mdsource content
Angular Tooling
Priority: P2 (OPTIONAL)
CLI Essentials
- Command:
(orng generate component
)ng g c - Flags:
previews before write.--dry-run
sets CD at generation.--change-detection=OnPush
skips spec.--skip-tests - Workflow: Always
— never create files manually.ng generate
ng new my-app --style=scss --routing # Create project ng g c features/user-profile # Generate component ng g s services/auth # Generate service (providedIn: root) ng g guard guards/auth # Generate functional guard ng g interceptor interceptors/auth # Generate functional interceptor ng g pipe pipes/truncate # Generate standalone pipe
Code Generation Flags
— Preview output without writing files. Always use--dry-run
first for unfamiliar generators.--dry-run
— Skips spec file generation.--skip-tests
— Skips subfolder creation.--flat
— Sets CD strategy on generation.--change-detection=OnPush
— Sets stylesheet format.--style=scss
Build Configuration
- Dev:
ng serve --open - Prod:
. Output goes tong build -c production
.dist/my-app/browser/ - SSR:
thenng add @angular/ssr
(addsng build
output).server/ - Coverage:
. Coverage output goes tong test --code-coverage --watch=false
directory.coverage/
Bundle Analysis
ng build -c production --stats-json npx esbuild-visualizer --metadata dist/my-app/browser/stats.json --open
- Note: Analyze bundle before editing
budgets — don't lower without understanding what's large.angular.json
Update Angular
- Check:
— lists available updates.ng update - Apply:
— runs official codemods.ng update @angular/core @angular/cli - Rule: Never use --force; fix peer dependency conflicts instead.
Anti-Patterns
- No manual file creation: Use
for consistency and proper registration.ng generate - No
: Fix peer dependency conflicts instead of skipping.ng update --force - No hand-editing angular.json budgets: Analyze bundles first — lower budgets break CI.