К основному содержанию
скилл CX Codex

convex-self-heal — скилл для Claude Code: чинит продовые ошибки

Скилл берёт ошибку из прода, находит причину, готовит патч и проверяет его на превью. Мержит человек.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add convex/agent-skills --skill convex-self-heal -a claude-code
Открыть на GitHub

Что делает convex-self-heal

Скилл замыкает цикл от падения в проде до подтверждения, что оно больше не повторяется. Сначала он требует sentinel — захват ошибок в вашем собственном деплое. Без него чинить нечего, и скилл предложит сначала поставить sentinel.

Дальше ошибка проходит триаж: разовый сетевой сбой отбрасывается, ошибка конфигурации уходит в env (секрет скилл угадывать не станет), а дефект кода или схемы идёт в починку. Причина ищется на шине находок: convex-insights даёт упавшие запросы и стеки, convex-advisor подключается при лимитах чтения и OCC, convex-reviewer и convex-authz — при дефектах логики и авторизации. Если причина неясна, скилл останавливается и докладывает: неверный фикс хуже открытой ошибки.

Правка идёт на ветке, не в проде. Перед PR скилл сертифицирует её: чистый tsc --noEmit, прогон через migrate-rehearse на превью со снимком прода, если затронуты схема или данные, воспроизведение исходного входа против исправленного кода и проверка, что новых находок не появилось. Не прошедший сертификацию фикс не предлагается — он помечается как «не удалось сертифицировать». Автомержа нет: кнопка остаётся у человека. После деплоя скилл сверяется с таблицей sentinel и logs, чтобы убедиться, что сигнатура ошибки исчезла.

Какие задачи решает

  • разобрать упавший запрос в проде и найти его причину
  • подготовить патч на ветке вместо правки прода напрямую
  • проверить фикс на превью со снимком прода
  • отсеять разовые сетевые сбои и не открывать по ним PR
  • подтвердить после деплоя, что ошибка больше не повторяется

Примеры запросов агенту

  • разбери ошибку из sentinel и подготовь PR с фиксом
  • проверь причину падения этой функции и сертифицируй правку
  • ошибка вернулась после деплоя — открой цикл заново с новыми данными

Как установить convex-self-heal

1Через Skills CLI (Vercel)

npx skills add convex/agent-skills --skill convex-self-heal -a claude-code

2Вручную: положить файлы

~/.claude/skills/convex-self-heal/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/convex-self-heal/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о convex-self-heal

Как установить convex-self-heal в Claude?

Выполните npx skills add convex/agent-skills --skill convex-self-heal -a claude-code. Скилл встанет в ~/.claude/skills/convex-self-heal/SKILL.md.

Что делает convex-self-heal?

Проводит продовую ошибку через триаж, поиск причины, починку и сертификацию, а затем открывает PR на ревью. Автомержа нет — решение за вами.

Что нужно, чтобы скилл заработал?

Нужен sentinel: он захватывает ошибки в вашем деплое и редактирует их при записи. Без захвата цикл не запускается, и скилл предложит сначала установить sentinel.

Исходный текст

SKILL.md · Apache-2.0
---
name: convex-self-heal
description: "Production error → triaged, root-caused, repaired, and certified (tsc + rehearsal + reproduce-then-gone) fix PR for a human to merge — then confirm the error stops recurring. Never auto-merges."
---

<!-- GENERATED from convex-agents content/capabilities/self-heal.json — do not edit by hand. -->

# Gated production self-healing loop

Sentry/Datadog/Vercel can go error→investigate→draft-PR, but they treat the backend as opaque and stop at the human merge gate with an unverified diff. Convex can do the step they can't: because the error rows live in the user's own deployment and the fix can be rehearsed on a preview of that deployment, the platform certifies the fix against real invariants before anyone reviews it. This capability is the composition capstone — it wires sentinel (capture) → the findings bus (diagnose) → the fixers (repair) → migrate-rehearse/tsc/probe (certify) → a human PR (decide) → deploy-guard (promote). The human keeps the merge button; the machine does everything up to and including proving the fix works.

## Workflow

1. GUARD: deploy-guard — this loop reads prod and PROPOSES prod changes; classify + announce the deployment and get the standing consent for the loop's scope up front (what classes of fix it may auto-prepare vs must always defer). Never auto-merge; the human merge is the fixed boundary.
2. CAPTURE: require sentinel (prod errors in the user's own deployment, redacted at write time). If absent, offer to install it and stop — there is nothing to heal without capture.
3. TRIAGE a new/ recurring error: pull it via the official MCP (data/run-once-query over the sentinel table, or the monitor's prod_error event). Classify: transient (retry/ignore — do NOT open a PR for a one-off network blip), config (env/secret — hand to env, never guess a secret), or a code/schema defect (proceed).
4. ROOT-CAUSE on the findings bus: run the relevant audit pass on the implicated function — convex-insights (the failing requests + stacks), convex-advisor (if it's a read-limit/OCC cause), convex-reviewer/convex-authz (if it's a logic/authz defect). Produce a bus finding with evidence (the stack + the reproducing input) and a fixCapability. If root cause is unclear, STOP and report — a wrong fix is worse than an open error.
5. REPAIR via the finding's fixCapability (convex-authz, reviewer fixers, convex-expert for perf) on a branch — never on prod directly.
6. CERTIFY against the backend's own invariants BEFORE proposing (this is the differentiator — do not skip any that apply):
   (a) `tsc --noEmit` clean;
   (b) if the fix touches schema/data, run it through migrate-rehearse on a preview seeded with a prod snapshot — the schema-conformance gate must pass on real-shaped data;
   (c) reproduce-then-confirm-gone: replay the error's triggering input against the fixed code (a convex-test case or an MCP run on the preview) and assert the failure no longer occurs;
   (d) no-regression: the finding must be gone AND no new bus finding introduced on the touched function.
   A fix that fails any applicable certification is NOT proposed — it's reported as 'attempted, could not certify' with what failed.
7. PROPOSE, never merge: open a PR (or a diff for review) containing the fix, the certification evidence (tsc result, rehearsal outcome, the reproduced-then-gone assertion), the original error + finding, and the reversibility note. Label the change class. The human reviews and merges.
8. PROMOTE on merge via deploy-guard's prod consent; after deploy, re-check the sentinel table + `logs` (failures) to confirm that error signature stops recurring (do NOT use `insights` for this — it tracks only OCC/read-limit perf events, not arbitrary error signatures) — the loop is only closed when the error stops recurring in prod. If it recurs, reopen with the new evidence.
9. BOUND it: only classes the user pre-approved in step 1 are auto-prepared (default-safe set: validator fixes, missing-index adds, ownership-check adds, non-destructive backfills); anything destructive, security-sensitive beyond an added check, or ambiguous is always deferred to explicit human direction. Log every action to an append-only record so the loop is auditable.

## Rules

- The human keeps the merge button — this loop prepares and certifies fixes, it NEVER auto-merges or auto-deploys to prod (matches the industry boundary: no credible system ships unattended prod auto-merge).
- Certify before proposing: tsc + (schema→migrate-rehearse on a prod-snapshot preview) + reproduce-then-confirm-the-failure-is-gone + no new bus finding. An uncertified fix is reported as 'could not certify', never proposed as done.
- Triage first: transient blips get retried/ignored, config errors go to env (never guess a secret), only real code/schema defects enter the repair loop.
- Repair on a branch/preview, never on prod directly; promote only through deploy-guard's fresh prod consent.
- Only pre-approved fix classes are auto-prepared (default-safe: validator/index/ownership/non-destructive backfill); destructive or ambiguous changes are always deferred to the human.
- Close the loop for real: after merge+deploy, confirm the error signature stops recurring via the sentinel table + logs (not insights, which only sees perf events); reopen if it persists.
- Every action is logged to an append-only, auditable record; data residency stays in the user's own deployment (sentinel discipline).
- If root cause is unclear, STOP and report — an uncertain fix is worse than an open, visible error.

© convex · Apache-2.0 · convex/agent-skills

Похожие скиллы

Всё по теме «DevOps и инфраструктура» →
sentry-node-sdk getsentry Скилл сканирует проект и ведёт по шагам подключения Sentry к серверному JavaScript и TypeScript: ошибки, трейсинг, логи, кроны. CX Codex +1 3 300установок sentry-go-sdk getsentry Скилл сканирует Go-проект и ведёт по шагам подключения Sentry: ошибки, трейсинг, логи, метрики, кроны. CX Codex +1 2 200установок fix-sentry-issues brianlovin Скилл находит сбои через Sentry MCP, сортирует их и устраняет первопричину в кодовой базе. Помогает при разборе аварийных всплесков и очистке логов от шума. CX Codex +1 2 700установок observability официальный Vercel Labs Скилл настраивает сбор логов и метрик для приложений на Vercel. Помогает внедрить structured logging и подключить OpenTelemetry при сбоях. CX Codex GP ChatGPT 7установок sentry официальный OpenAI Скилл обращается к Sentry API в режиме чтения: находит ошибки, события и базовые данные о состоянии. Подходит для проверки production-инцидентов. CX Codex GP ChatGPT 4установок inngest-middleware inngest Скилл учит ИИ настраивать middleware для Inngest v4: внедрять зависимости в обработчики и шифровать полезную нагрузку функций. CX Codex +1 3 600установок

Из того же набора32

convex-backup Настраивает регулярные снапшоты базы Convex и прогоняет учебное восстановление в одноразовый preview, чтобы проверить, что данные действительно возвращаются. CX Codex +1 35 900установок convex-migrate-rehearse Прогоняет изменение схемы и бэкфилл на превью-деплое с продовым снапшотом, а потом переносит проверенную миграцию в прод. CX Codex +1 35 900установок convex-cost Оценивает расходы на Convex и находит функции, сжигающие бюджет. Показывает график роста затрат и предлагает дешёвое исправление. CX Codex +1 35 900установок convex-insights Читает логи и состояние работающего Convex-развёртывания по запросу на естественном языке. Нужен для разбора сбоев и проверки связи ошибок с выкладкой. CX Codex +1 35 900установок convex-agent Ставит в приложение на Convex бэкенд для ИИ-агента: долгие треды, история сообщений, вызовы инструментов и поиск по векторам. CX Codex +1 35 900установок convex-test Помогает генерировать детерминированные тесты для функций Convex с помощью convex-test и vitest. Проверяет запросы, мутации и авторизацию без запуска реального бэкенда. CX Codex +1 35 900установок convex-sentinel Настраивает сбор ошибок продакшена прямо в базу данных деплоя Convex. Помогает отслеживать падения функций, сбои React и сигналы масштабирования без отправки логов сторонним сервисам. CX Codex +1 35 700установок convex-suggest Скилл замечает, когда вы пишете руками то, что уже решает готовый компонент Convex, и после задачи предлагает один подходящий вариант. CX Codex +1 35 800установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой