Applies ChangeDetectionStrategy.OnPush to Angular components with explicit data flow and immutable updates to reduce unnecessary rendering checks.
Ships in ngautopilot-angular. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to improve Angular rendering performance by applying ChangeDetectionStrategy.OnPush safely and intentionally. The goal is to reduce unnecessary checks without hiding state mutation bugs or breaking view updates.
This skill is complementary to change-detection-optimization; keep it focused on explicit OnPush adoption and mutation safety.
Use this skill when:
Prefer OnPush when the component has explicit data flow and immutable updates:
@Component({
selector: "app-user-card",
templateUrl: "./user-card.component.html",
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UserCardComponent {
@Input({ required: true }) user!: UserViewModel;
}
Prefer replacing object mutation with new references:
this.user = {
...this.user,
displayName: nextDisplayName,
};
For asynchronous data, prefer template subscriptions with async or state exposed through signals:
<app-user-card [user]="user$ | async" />
readonly fullName = computed(() => {
const user = this.user();
return `${user.firstName} ${user.lastName}`;
});
Use markForCheck only when an external callback updates state outside Angular's normal path and the component still needs the view refreshed.
Avoid applying OnPush blindly:
@Component({
selector: "app-user-editor",
templateUrl: "./user-editor.component.html",
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UserEditorComponent {
@Input() user!: User;
rename(value: string): void {
this.user.name = value;
}
}
Avoid using OnPush as a cosmetic change when the component relies on hidden side effects, mutable shared objects, or untracked state changes.
Avoid turning unrelated services, global stores, or routing state into an OnPush justification if the real issue is elsewhere.
OnPush is applied only where the component data flow is explicit.async, signals, or explicit lifecycle-safe subscriptions.set, update, or computed values instead of hidden mutation.OnPush.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/ngautopilot-angular:angular--performance--onpush-change-detectionfrom ngautopilot-angular
npx claudepluginhub janpereira-dev/ngautopilot --plugin ngautopilot-angular350 skills in this plugin
/angular--ai--angular-v22-agent-skills-integrationAngular v22 Agent Skills IntegrationUse official Angular Agent Skills as reference material without copying them blindly or replacing NgAutoPilot routing. For Angular 22 projects and 21-to-22 upgrade planning.
/angular--ai--angular-v22-ai-tutor-safe-usageAngular v22 AI Tutor Safe UsageUse AI tutor workflows to teach Angular concepts without allowing unsafe code or secret exposure. For Angular 22 projects and 21-to-22 upgrade planning.
/angular--ai--angular-v22-angular-mcp-agent-workflowAngular v22 Angular MCP Agent WorkflowReview the workspace boundary, permissions, and runtime evidence of an Angular MCP integration. For Angular 22 projects and 21-to-22 upgrade planning.
Other plugins' skills for the same job