Performance

From BuilderIO/agent-native · View interactive version

Performance is an AI agent skill from the GitHub repository BuilderIO/agent-native. Keep app loads and interactions responsive as data grows. Use when a page feels slow, jumps, or lags, or when changing a data read, list, polling path, startup path, or performance-sensitive UI.

How to use this skill

Skill file

Performance

Find the cost that users actually wait on, then reduce it without weakening

the result. A slow screen may be waiting on the server, moving too much data,

serial reads, repeated computation, or browser rendering; measure before adding

caches or extra complexity.

Load only what the current view needs

bodies, histories, rendered output, and other rarely viewed data on a detail

or on-demand path. Return a small preview when the list needs one.

recent or visible range and load more as the user asks for it.

other aggregates in the database when the result can be much smaller than

the source rows.

for unrelated settings, below-the-fold panels, or secondary details.

observed query cost justify it. Keep indexes aligned with real query shapes.

For action-backed screens, shape the action response for the screen's current

need and keep the UI on the app's existing action and query hooks. Do not add a

second fetch path that duplicates the same read.

Keep repeated work cheap

reformatting, or rebuilding large values on every read when the result can be

prepared once or computed only for the view that needs it.

screen. Poll only when needed, and keep polled reads bounded and cheap.

when the user opens the relevant item rather than sending them on every list

refresh.

content is usable. Window a rendered list when rendering all rows makes

scrolling or updates slow.

Protect startup and the first paint

and cache warming out of module evaluation and application startup. Hosted

serverless instances can restart, so startup work can repeat on user

requests. Use the app's deliberate migration, job, or on-demand path.

Load a browser, media processor, or other large dependency only in the

feature or job that needs it, and inspect the deployed bundle when adding

one.

Resolve user-specific state after the shell loads through the app's

authenticated client data path. Reads that must reflect a recent mutation

should not depend on cached server-rendered loader data.

for content whose size is known; avoid showing a temporary layout that shifts

the user's reading position when data arrives.

Keep interactions responsive

Show that an interaction registered as soon as it happens, aiming for 100 ms.

If the work needs the network or takes longer, acknowledge it before waiting

and show a focused pending state within 400 ms. Use an optimistic update when

it is safe, then confirm or roll back on failure.

When investigating a slow experience, separate server response time, data

transfer, serial waits, rendering, layout movement, and long interaction work.

Use representative data and the production build when development tooling

changes the cost. Verify that the user-visible action completed before

comparing timings or memory.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.