Skillshub 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/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/HoangNguyen0403/agent-skills-standard/angular-tooling" ~/.claude/skills/comeonoliver-skillshub-angular-tooling && rm -rf "$T"
manifest:
skills/HoangNguyen0403/agent-skills-standard/angular-tooling/SKILL.mdsource content
Angular Tooling
Priority: P2 (OPTIONAL)
CLI Essentials
- Command:
(orng generate component
)ng g c - Flags: Use
to preview output first. Add--dry-run
to set CD strategy at generation time. Use--change-detection=OnPush
if spec is not needed.--skip-tests - Workflow: Always use
— 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: Check
budgets — do not hand-editangular.json
values; analyze the bundle first to understand what's large.angular.json budgets
Update Angular
- Command:
to check available updates.ng update - Apply:
— this runs official codemods to migrate your code.ng update @angular/core @angular/cli - Rule: Never use --force; fix peer dependency conflicts properly instead.
Anti-Patterns
- No manual file creation: Always use
for consistency and proper registration.ng generate - No
: Fix peer dependency conflicts instead of skipping checks.ng update --force - No hand-editing angular.json budgets: Lower budgets cause CI failures; analyze bundles first.