本文へスキップ
Skillpedia
APIとサーバー(バックエンド)9.5k · #12253

convex-performance-audit

できること

このスキルは、Convexのアプリの遅い、またはコストのかかる部分を診断し、一度に一つの問題ずつ直します。対象は、アプリが遅く感じる、または利用のレポートで大量のデータ読み取りが見える開発者です。

使う場面

  • ✓Convexのアプリのあるページや機能が遅く感じるとき。
  • ✓利用のレポートで、ある関数が予想よりはるかに多くのデータを読んでいるとき。
  • ✓多くの更新が同時に起き、書き込みの競合のエラーが出ているとき。

スキルのリンク

https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-performance-audit/SKILL.md

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“私のConvexのダッシュボードのページの読み込みが遅いです。理由を見つけて、遅い部分を直してください。”

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

仕組み

エージェントは、デプロイまたはコードから性能のデータを集め、最も強いシグナルを特定し、問題に合った最もシンプルな修正を適用します。データが本当に必要と示さない限り、大きな再構成は避けます。

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

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

Convex Performance Audit

Diagnose and fix performance problems in Convex applications, one problem class at a time.

When to Use

  • A Convex page or feature feels slow or expensive
  • npx convex insights --details reports high bytes read, documents read, or OCC conflicts
  • Low-freshness read paths are using reactivity where point-in-time reads would do
  • OCC conflict errors or excessive mutation retries
  • High subscription count or slow UI updates
  • Functions approaching execution or transaction limits
  • The same performance pattern needs fixing across sibling functions

When Not to Use

  • Initial Convex setup, auth setup, or component extraction
  • Pure schema migrations with no performance goal
  • One-off micro-optimizations without a user-visible or deployment-visible problem

Guardrails

  • Prefer simpler code when scale is small, traffic is modest, or the available signals are weak
  • Do not recommend digest tables, document splitting, fetch-strategy changes, or migration-heavy rollouts unless there is a measured signal, a clearly unbounded path, or a known hot read/write path
  • In Convex, a simple scan on a small table is often acceptable. Do not invent structural work just because a pattern is not ideal at large scale

First Step: Gather Signals

Start with the strongest signal available:

  1. If deployment Health insights are already available from the user or the current context, treat them as a first-class source of performance signals.
  2. If CLI insights are available, run npx convex insights --details. Use --prod, --preview-name, or --deployment-name when needed.
    • If the local repo's Convex CLI is too old to support insights, try npx -y convex@latest insights --details before giving up.
  3. If the repo already uses convex-doctor, you may treat its findings as hints. Do not require it, and do not treat it as the source of truth.
  4. If runtime signals are unavailable, audit from code anyway, but keep the guardrails above in mind. Lack of insights is not proof of health, but it is also not proof that a large refactor is warranted.

Signal Routing

After gathering signals, identify the problem class and read the matching reference file.

Signal Reference
High bytes or documents read, JS filtering, unnecessary joins references/hot-path-rules.md
OCC conflict errors, write contention, mutation retries references/occ-conflicts.md
High subscription count, slow UI updates, excessive re-renders references/subscription-cost.md
Function timeouts, transaction size errors, large payloads references/function-budget.md
General "it's slow" with no specific signal Start with references/hot-path-rules.md

Multiple problem classes can overlap. Read the most relevant reference first, then check the others if symptoms remain.

Escalate Larger Fixes

If the likely fix is invasive, cross-cutting, or migration-heavy, stop and present options before editing.

Examples:

  • introducing digest or summary tables across multiple flows
  • splitting documents to isolate frequently-updated fields
  • reworking pagination or fetch strategy across several screens
  • switching to a new index or denormalized field that needs migration-safe rollout

When correctness depends on handling old and new states during a rollout, consult the convex-migration-helper skill for the migration workflow.

Workflow

1. Scope the problem

Pick one concrete user flow from the actual project. Look at the codebase, client pages, and API surface to find the flow that matches the symptom.

Write down:

  • entrypoint functions
  • client callsites using useQuery, usePaginatedQuery, or useMutation
  • tables read
  • tables written
  • whether the path is high-read, high-write, or both

2. Trace the full read and write set

For each function in the path:

  1. Trace every ctx.db.get() and ctx.db.query()
  2. Trace every ctx.db.patch(), ctx.db.replace(), and ctx.db.insert()
  3. Note foreign-key lookups, JS-side filtering, and full-document reads
  4. Identify all sibling functions touching the same tables
  5. Identify reactive stats, aggregates, or widgets rendered on the same pag
よくある質問

データの構造を全部作り直しますか?

いいえ。測定された根拠か、明らかに無制限の読み取りの経路がない限り、大きな構造の変更は避けます。

どのシグナルを使いますか?

コードを変える前に、デプロイの健全性のインサイトなど、利用できる最も強いシグナルから始めます。

小さなテーブルのスキャンは常に問題ですか?

必ずしもそうではありません。小さなテーブルでは単純なスキャンで十分なことが多く、スキルは不要な作業を作りません。

詳細

作者による元の説明

Audits Convex performance for reads, subscriptions, write contention, and function limits. Use for slow features, insights findings, OCC conflicts, or read amplification.

repo: openclaw/clawhub

人気

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

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

0

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

コメント

  • …

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

似ているスキル