본문으로 건너뛰기
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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-performance-audit/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 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

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬