agentsclimarketplace

Ng22 deferrable views

Skill PavanAnguluri/angular22-agent-skills/skills/ng22-deferrable-views

Angular 22 Agent Skills

Install
npx -y skills add PavanAnguluri/angular22-agent-skills --skill ng22-deferrable-views

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Automates chunk splitting and deferred lazy-loading setup for heavy viewport components.

SKILL.md

2.4 KB, as published. Nobody here has run it

Angular 22 Deferrable Views Layout Guideline

Wrap heavy UI sections, dashboards, or complex components in @defer blocks to reduce initial bundle work and keep first paint responsive.

Core Rules

  1. Defer expensive UI that is not required for initial interaction.
  2. Use on viewport for below-the-fold content by default.
  3. Use on interaction or on hover for drawers, menus, dialogs, and infrequently used tools.
  4. Always provide a @placeholder and usually a minimum duration to avoid flicker.
  5. Provide @loading and @error states when the deferred content has visible loading or failure states.
  6. Combine deferral with route splitting when the content is an entire feature page.

Standard Execution

@defer (on viewport; prefetch on idle) {
  <app-heavy-analytics-chart [data]="metrics()" />
} @placeholder (minimum 500ms) {
  <div class="skeleton-loader">Preparing data layout blocks...</div>
} @loading {
  <app-spinner />
} @error {
  <div class="alert-box">Failed to load asset bundle. Try again later.</div>
}

Trigger Guide

@defer (on interaction) {
  <app-settings-drawer />
} @placeholder {
  <button type="button">Open settings</button>
}
@defer (on hover; prefetch on idle) {
  <app-insight-popover />
} @placeholder {
  <span>Hover for details</span>
}

Practical Rules

  • Use @defer for charts, data grids, WYSIWYG editors, and other heavy widgets.
  • Avoid deferring content that must be immediately available for primary navigation.
  • Keep placeholders structurally close to the final layout so dimensions stay stable.
  • Use prefetch on idle when you want the browser to prepare the chunk before the user reaches it.
  • Be cautious with server rendering and hydration; ensure the placeholder and deferred content transition cleanly.

Anti-Patterns

  • Do not defer critical page chrome or the first interactive control.
  • Do not omit a placeholder for heavy content that would otherwise cause layout shift.
  • Do not nest unrelated business logic inside the deferred block.

Review Checklist

  • The deferred content is truly non-essential at first paint.
  • The trigger matches the user’s expected interaction model.
  • Placeholder, loading, and error states are intentional.
  • The layout remains stable while the chunk loads.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.