angular-best-practices

angular-best-practices is a skill for Claude Code, Codex from tranhieutt/software_development_department. It costs 54 tokens per session (1,228 once invoked), scanned A, original, MIT.

A collection of recommended practices for Angular, a TypeScript framework for building web applications. It covers components, modules, services, observables, signals, and reactive code.

In plain words
What is it for?
Use it when writing or reviewing Angular components, templates, services, NgModules, RxJS code, or Angular CLI projects.
Why use it?
It helps avoid common Angular problems such as missed updates, unnecessary rendering, and subscriptions that keep running after a component is removed.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tranhieutt/software_development_department/angular-best-practices
Any agent
npx skills add tranhieutt/software_development_department --skill angular-best-practices
Clone the repo
git clone --depth 1 https://github.com/tranhieutt/software_development_department

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for angular-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/angular-best-practices.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/angular-best-practices)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/angular-best-practices"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/angular-best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,228 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00054 $0.01228
Opus 5 $0.00027 $0.00614
Sonnet 5 $0.00011 $0.00246
Haiku 4.5 $0.00005 $0.00123

Measured 5d ago against content hash afdbfd4230af, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

angular-best-practices scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

ids$.pipe(mergeMap(id => this.api.fetch(id), 3)) // 3 concurrent max
.claude/skills/angular-best-practices/SKILL.md · 158 lines

How it starts

The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Angular Best Practices

Critical rules (non-obvious)

  • Always unsubscribe from Observables in ngOnDestroy — use takeUntilDestroyed() (Angular 16+) or Subject + takeUntil
  • ChangeDetectionStrategy.OnPush: component only updates when input reference changes or async pipe emits — use for all leaf components
  • Never mutate input objects/arrays: OnPush won't detect mutation; create new reference instead
  • trackBy is mandatory on *ngFor with dynamic lists — without it, every change re-renders all DOM nodes
  • async pipe auto-unsubscribes — prefer it over manual subscription in templates

Component with OnPush + signals (Angular 17+)

@Component({
  selector: "app-product-list",
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: `
    @for (product of products(); track product.id) {
      <app-product-card [product]="product" />
    }
    @if (loading()) { <app-spinner /> }
  `,
})
export class ProductListComponent {
  products = input.required<Product[]>();
  loading = input(false);

  // Computed signal
  total = computed(() => this.products().length);
}

Service with signals store pattern

@Injectable({ providedIn: "root" })
export class CartService {
  private _items = signal<CartItem[]>([]);

  items = this._items.asReadonly();
  total = computed(() => this._items().reduce((sum, i) => sum + i.price * i.qty, 0));

  addItem(item: CartItem) {
    this._items.update(items =>
      items.some(i => i.id === item.id)
        ? items.map(i => i.id === item.id ? { ...i, qty: i.qty + 1 } : i)
        : [...items, { ...item, qty: 1 }]
    );
  }
}

HTTP with interceptors

// auth interceptor
export const authInterceptor: HttpInterceptorFn = (req, next) => {
  const token = inject(AuthService).token();
  if (!token) return next(req);
  return next(req.clone({ setHeaders: { Authorization: `Bearer ${token}` } })).pipe(
    catchError(err => {
      if (err.status === 401) inject(Router).navigate(["/login"]);
      return throwError(() => err);
    })
  );
};

// Register in app.config.ts
provideHttpClient(withInterceptors([authInterceptor]))

Read the full file on GitHub · 158 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 158 lines · 54 tokens per session scan A afdbfd4230af

Subscribe to this mod's changes

angular-best-practices is a skill published in the GitHub repository tranhieutt/software_development_department (71 stars, last pushed 3mo ago), licensed MIT. It adds 54 tokens to every session and 1,228 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

playwright-cli

Automates browser interactions for testing and validating your own web applications using playwright-cli. Use when you need terminal-first browser control for navigation, form filling, screenshots, tracing, bound browser sessions, debugging, or generating Playwright test code. Only use against applications you own or…

testdino-hq/playwright-skill · 64 tokens

flutter-ui

Build Flutter UI from Figma MCP or image input. Scans src for design tokens (colors, sizes, text styles), existing components, and naming conventions before writing a single line of code. Never hard-codes values.

datit309/supergraph · 48 tokens

serena

Serena code intelligence — LSP-powered symbol navigation, diagnostics, and targeted code surgery. Activate before complex refactors, cross-file analysis, or when graph tools need symbol-level depth.

datit309/supergraph · 40 tokens

database-migrations

Database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate).

datit309/supergraph · 56 tokens

tdd

Strict test-driven development for behavior changes. Requires verified RED before production code, minimal GREEN, and refactor only after passing tests.

datit309/supergraph · 29 tokens

analyze

Risk analysis and approach selection before planning. Use when requirements are ambiguous, approaches vary, or work touches hub/bridge nodes. Skip for typo fixes.

datit309/supergraph · 33 tokens