Skip to content

Development & Engineering

Web Performance

Free

Remove accidental work: extra queries, giant client payloads, and layout-thrashing effects.

Difficulty advanced
Version v1.1

Purpose

Keep list and detail pages fast without a speculative rewrite.

Procedure

--- name: web-perf description: Remove accidental work: extra queries, giant client payloads, and layout-thrashing effects. ---

Web Performance

Purpose

Keep list and detail pages fast without a speculative rewrite.

Procedure

Measure before you invent a cache. For this stack, the usual wins are:

  • Do not select large text (skill bodies, guide articles) in list queries.
  • Paginate. Do not load the whole catalog to slice it in the browser.
  • Avoid N+1 queries. One query for the page of skills, one for their platforms (or a join), not a query per card.
  • Do not send premium procedure text to a caller who cannot read it.
  • Images: set dimensions, do not ship a hero background video.
  • Effects: do not subscribe to scroll or resize without a reason. Do not set state on every mousemove.

Do not add a client cache library, a service worker, or a CDN config as part of a small fix.

If you did not measure, do not claim a millisecond improvement. Say what work you removed (bytes, queries, or re-renders) and why it was safe.

Leave readability ahead of a clever micro-optimization that saves nothing visible.

Example requests

1. Shrink a list payload

Request: Apply Web Performance to the skill list. The card does not need the full procedure. Expected: The list query omits large text columns and stays paginated.

Dependencies

None. Work in the repository that is already open. Do not add packages unless the procedure names one.

Compatibility

This document follows the Agent Skills layout (a folder named web-perf containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it.

Example prompts

Shrink a list payload

Apply Web Performance to the skill list. The card does not need the full procedure.

Expected: The list query omits large text columns and stays paginated.

Choose the agent

This skill is installed for one agent at a time. Pick the section you are using.

Related

  • Query Scoping

    Scope every read and write of personal rows by the session user, in the query itself.

  • Skeleton States

    Build skeletons that match the loaded layout so content does not jump.

  • Scroll Restraint

    Use scroll-linked motion rarely, and never to hide content the reader needs.

Reviews

No reviews yet.

    Sign in to review.

    Report a problem

    Inaccurate steps, an unsafe instruction, or a licensing concern.

    Sign in to report.