本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)7.6k · #13171

performance

できること

このスキルは、データの量が多すぎることや、同じ処理の繰り返しなど、アプリの遅い部分をエージェントが見つけて減らせるよう案内します。ページの読み込みが遅い、動きがぎこちない、反応が鈍いと感じるときの開発者向けです。

使う場面

  • ✓ページの読み込みが遅く、操作すると反応が鈍いとき。
  • ✓データが増えるほど、リストの表示が遅くなるとき。
  • ✓性能に影響する画面で、データの読み込み、ポーリングの経路、起動時のコードを変更するとき。

スキルのリンク

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/performance/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/performance/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“レコードが多いと、ダッシュボードの読み込みに非常に時間がかかります。速くしてもらえますか。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、どこで待ち時間が生じているかを計測します。その画面に必要なデータだけを読み込み、読み込みをまとめ、計測でキャッシュが有効だと分かった場合にのみ追加します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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

  • Shape list reads around the fields the list displays. Keep large document 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.
  • Paginate or window unbounded histories and activity feeds. Start with the recent or visible range and load more as the user asks for it.
  • Batch related reads instead of issuing one query per row. Compute counts and other aggregates in the database when the result can be much smaller than the source rows.
  • Start independent reads together. Do not make the first useful content wait for unrelated settings, below-the-fold panels, or secondary details.
  • Index fields used by frequent filters, joins, and sorts when the data and 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

  • Keep list and frequently refreshed reads inexpensive. Avoid parsing, reformatting, or rebuilding large values on every read when the result can be prepared once or computed only for the view that needs it.
  • Use the app's existing live-update path when fresh data must reach an open screen. Poll only when needed, and keep polled reads bounded and cheap.
  • Keep large file contents and long records out of list responses. Load them when the user opens the relevant item rather than sending them on every list refresh.
  • Defer nonessential data and expensive child views until after the main content is usable. Window a rendered list when rendering all rows makes scrolling or updates slow.

Protect startup and the first paint

  • Keep migrations, backfills, data scans, aggregations, provider handshakes, 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.
  • Keep optional heavy runtimes out of modules loaded by ordinary page requests. 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.
  • Keep the server-rendered shell public and independent of a visitor's session. 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.
  • Give loading placeholders the final content's basic geometry. Reserve space 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.

よくある質問

エージェントは常にキャッシュを追加すべきですか?

いいえ。キャッシュは複雑さを増すため、まず計測すべきだとスキルは述べています。

どのデータは後から読み込むべきですか?

大きな文書の本文、長い履歴、めったに見ない詳細は、一覧の画面ではなく必要になったときに読み込むべきです。

表示される結果は変わりますか?

結果を損なうべきではありません。目指すのは、同じ結果のまま速くなった画面です。

詳細

作者による元の説明

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.

repo: BuilderIO/agent-native

人気

GitHubのスター
7.6k
ランキング
#13171
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル