AI Review Skill for Angular

November 17, 2026 · 3 min readLucian Ciobanu
Tags:AIAngularmarkdown

I'm continuing to improve how AI assists me and I've been trying to create a skill that could help me review various repos with Angular based on the other prompt which generates the analysis and rules per project.

This is what I came up with so far, it's fairly lightweight and doesn't impose a lot of things but more encourages to erad the documentation.

Hope this helped!

Cheers,
Lucian

---
name: review
description: Senior-level review of Angular code (components, templates, NgRx, RxJS, SCSS, specs) on the current diff, a commit range, a branch or given files. Use when asked to review Angular changes or a PR in an Angular repo. Applies the project's own conventions first, reports only verified findings, and changes nothing until the user picks what to fix.
---

# Angular code review

Review the target named in the request (files, commit range, branch or PR). With no target, review the working tree (staged and unstaged) against `HEAD`; if that is empty, ask what to review.

## 1. Scope
- For a branch or PR, diff against its real base: the PR's base branch or the merge-base with it, fetched from origin. Do not assume `main`.
- Start with `git diff --stat`, then read the full changed files, not only the hunks. When a contract changes (input, output, selector, action, model, GraphQL field), find its consumers.
- Above ~500 changed lines, list files by area first and review area by area.

## 2. Project rules first
- Read the project's instruction files (`CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `CONTRIBUTING.md`) and the convention docs they point to.
- Their rules override this checklist. A violation of an explicit team rule is at least a Warning, or Critical if the project says the rule is blocking.
- Follow their process rules too (language of the reply, what not to post or commit).

## 3. Match the codebase, not the latest Angular
- Check from `package.json` and existing code: Angular version, NgModule or standalone, `@Input()` or signal inputs, `*ngIf` or `@if`, `inject()` or constructors, state library, test runner, i18n library.
- Review against the patterns the codebase actually uses. Never flag code for not adopting an API the project has not adopted, and never put such an API in a suggested fix.

## 4. Leave tooling's job to tooling
- Find the lint and format config (ESLint, stylelint, Prettier, commitlint, lint-staged). Do not report what they enforce: import order, property order, quotes, formatting.
- If it is cheap, run the linter on the changed files and report its errors as a single item.

## 5. What to look for
Prioritise what breaks behaviour. Style only matters when a project rule covers it.

- **Correctness:** null, empty and single-item cases; inverted or incomplete conditions; off-by-one; dates and time zones (absolute instants vs local display); async ordering; state that is stale or missing after a reload or navigation.
- **Angular:** OnPush with inputs mutated in place (the view will not update); lifecycle misuse (async work in the constructor, logic in `ngOnInit` that must react to input changes); subscriptions without teardown; function calls or heavy work in templates; lists without `track` / `trackBy`; `detectChanges()` or `setTimeout` used to hide a data-flow problem; services provided at the wrong level.
- **NgRx:** selectors pure and memoised (`createSelector`); logic combining several selectors lives in one selector, not in the component; reducers immutable and free of business logic; `catchError` inside the flattening operator so the effect survives; the flattening operator matches the semantics (`switchMap` cancels, so not for writes; `concatMap` for ordered writes, `exhaustMap` for submits); one action per event.
- **RxJS:** nested `subscribe`; `Subject` where late subscribers need the current value; `shareReplay` without `refCount: true` when the source must stop; `combineLatest` waiting on a source that may never emit; timers never torn down; errors that silently complete a stream the UI depends on.
- **Templates and accessibility:** real `<button>` / `<a href>` instead of clickable `div`s; keyboard reachability and visible focus; accessible names on icon-only controls; labels on form fields; focus moved into and back out of modals; `aria-live` for messages that appear dynamically; colour never the only signal of state.
- **i18n:** hardcoded visible text; new keys present in every locale file the project keeps; locale-aware date, number and currency formatting.
- **Security:** `[innerHTML]` and `bypassSecurityTrust*`; tokens, personal data or booking identifiers in logs, storage or URLs; secrets in code; URLs or queries built from user input; trusting client-side flags for authorisation.
- **Tests:** new behaviour has a spec; specs assert behaviour, not private details; async handled (`fakeAsync` / `tick`, `waitForAsync`); spies created are asserted; empty, error and loading states covered.
- **Maintainability** (Suggestion unless there is a concrete cost): duplication, dead code introduced by the change, magic values, commented-out code, TODO without a ticket.

## 6. Verify before reporting
For each candidate finding:
- Re-read the code and state a concrete scenario: which input or state leads to which wrong result.
- Check that the scenario is reachable (callers, guards, types, data actually sent by the backend).
- Check whether the problem is pre-existing. Outside the diff, mention it only if the change makes it worse, in a separate "Pre-existing" list.
- Drop what you cannot support, or turn it into a question for the author.

## 7. Report
Reply in the language the project or user uses. Group findings by severity:

- **Critical:** wrong behaviour, crash, data loss, a security, privacy or payment risk, or a blocking project rule.
- **Warning:** a likely bug in an edge case, a leak, a team-rule violation, new logic without tests.
- **Suggestion:** non-blocking improvement.

For each finding:
```
path/to/file.ts:42  [Critical] Short title
Problem: what goes wrong, in which scenario.
Fix: corrected snippet or concrete action.
```

End with the counts per severity, a verdict (Approve / Approve with suggestions / Changes requested) with one or two sentences of reasoning, and what you did not review. No empty category tables.

Then ask how to proceed: fix all, fix Critical only, fix specific items, or nothing. Change no code before the answer. When fixing, follow the project's branch and commit rules and do not commit unless asked.

Picture of author

Web Development & Software Delivery