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

recover — скилл для Claude Code: диагностика сбоев сборки

Скилл разбирает, что именно сломалось в сборке, и выбирает ответ: точечная правка, чистый перезапуск или пересмотр подхода.

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

Что делает recover

Когда ИИ-агент снова и снова правит код, а становится только хуже, дело обычно не в самой ошибке. Скилл recover сначала выясняет, с каким типом сбоя вы имеете дело, и лишь потом предлагает действие. Разработчик описывает, что ожидал увидеть, что получил и сколько раз уже пытался починить.

Дальше идёт разбор по трём режимам. Первый — локальная поломка: один компонент или функция, остальное работает. Тут скилл ищет корневую причину и предлагает точную правку, не трогая остальной код. Второй — сессия ушла не туда: правки накладываются на правки, контекст забит неудачными попытками. Тогда скилл советует сохранить заметку о том, что было задумано и что не сработало, закрыть сессию и начать заново. Третий — неверная основа: код запускается, но ведёт себя принципиально не так, потому что в основу заложено ошибочное допущение. Здесь скилл называет это допущение и предлагает другой подход, не торопясь переписывать код.

Перед любыми изменениями скилл ждёт подтверждения разработчика. Если предложенная правка не сработала, он не выдаёт следующую сразу, а перепроверяет диагноз: две неверные корневые причины — повод пересмотреть режим сбоя.

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

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

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

  • Сборка падает на шаге с авторизацией, я уже дважды пробовал починить — разбери, что это за сбой
  • Третий раз правлю одно и то же, код запутанный. Что делать?
  • Форма отправляется, но данные приходят не те. Кажется, я не так понял API

Как установить recover

1Через Skills CLI (Vercel)

npx skills add jsmastery-pro/jsm-agent-skill --skill recover -a claude-code

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

~/.claude/skills/recover/SKILL.md

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

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

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

Похожие

sentry-fix-issues getsentry Ищет ошибки в Sentry через MCP-сервер, разбирает трейсы и готовит исправления в коде. Пригодится при разборе инцидентов и багов в продакшене. CX Codex +1 10 000установок pua-en tanweai Скилл заставляет ИИ-кодера не сдаваться и действовать проактивно, когда задача зависает или падает второй раз. Вместо «попробую по-другому» — перебирает все варианты, ищет сам, доказывает результат. CX Codex +1 2 900установок recover-content calm-north Разбирает, почему страница потеряла поисковый трафик, и говорит, что с ней делать: обновить, слить с другой, перенаправить или удалить. CX Codex +1 2 100установок recover-eco-funds circlefin Скилл для возврата USDC, зависших в старых депозитах Circle CLI с методом eco. Ведёт по шагам с проверками и без угадывания данных интента. CX Codex +1 300установок fix parcadei Скилл-оркестратор: разбирает баг по цепочке от диагностики до коммита. Пригодится, когда непонятно, с чего начать починку. CX Codex +1 484установок Blueprint Mode официальный github Субагент переводит ассистента в строгий инженерный режим с четырьмя воркфлоу: Debug, Express, Main и Loop. Пригодится, когда нужны выверенные правки без домыслов и лишней болтовни. ★ 40 418звёзд репо

Рядом в теме «Настройка агента: память, контекст, субагенты»

Всё по теме «Настройка агента: память, контекст, субагенты» →

Вопросы о recover

Как установить recover в Claude?

Выполните npx skills add jsmastery-pro/jsm-agent-skill --skill recover -a claude-code. После этого файл скилла лежит в ~/.claude/skills/recover/SKILL.md.

Что делает recover?

Определяет тип сбоя в сборке и подбирает ответ под него: точечную правку, чистый перезапуск сессии или пересмотр подхода.

Нужно ли подтверждать правки вручную?

Да. Скилл описывает корневую причину и предлагает исправление, но ждёт вашего согласия, прежде чем что-то менять.

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

SKILL.md · MIT
---
name: recover
description: When something goes wrong during a build, diagnose what type of failure it is before deciding how to respond. Targeted fix, hard reset, or full rethink — the right response depends on the right diagnosis.
---

Not every problem is a bug. Not every bug needs debugging.

When something goes wrong with AI-assisted development, the instinct is to keep prompting — describe the problem, ask for a fix, get another broken version, describe that problem, ask for another fix. The session gets longer. The context gets polluted. The code gets worse.

The problem is not the code. The problem is not knowing what type of failure you are dealing with.

This skill diagnoses the failure first. Then it prescribes the right response. Those are two separate steps and they cannot be swapped.

---

## Step 1 — Describe What Went Wrong

The developer describes the problem. The skill listens before doing anything else.

Ask:

```
Describe what is wrong. Be specific:
- What did you expect to happen?
- What happened instead?
- How many times have you tried to fix it already?
```

Read the answer carefully. The number of fix attempts is important — it tells you whether this is a fresh problem or a session that has already gone wrong.

---

## Step 2 — Identify the Failure Mode

Based on the description, determine which of three failure modes this is.

### Failure Mode 1 — A specific thing is broken

**Signs:**

- The problem is isolated — one component, one function, one route
- The rest of the project works correctly
- This is the first or second attempt at fixing it
- The error message or wrong behaviour is clear and specific

**What it means:**
This is a normal bug. It has a root cause that can be found and fixed precisely.

**Response:** Targeted fix — go to Step 3A.

---

### Failure Mode 2 — The session has gone wrong

**Signs:**

- Multiple fix attempts have made things worse or created new problems
- The code has become tangled — fixes are patching fixes
- Context in this session is full of failed attempts
- It is no longer clear what the original problem was

**What it means:**
The session is polluted. More prompting will not help — it will compound the damage. The feature needs to be rebuilt in a clean context, not patched further.

**Response:** Hard reset — go to Step 3B.

---

### Failure Mode 3 — The foundation is wrong

**Signs:**

- The code runs but produces fundamentally wrong behaviour
- Claude has been confidently building something that misunderstands a core requirement, library API, or architectural pattern
- The problem is not a bug in the implementation — the implementation itself is wrong
- Fixing individual pieces will not help because the approach is incorrect

**What it means:**
This is not a debugging problem. The approach needs to be reconsidered before any code is written. More implementation in the wrong direction makes things harder to untangle.

**Response:** Rethink — go to Step 3C.

---

Tell the developer which failure mode this is before proceeding:

```
This looks like Failure Mode [1/2/3] — [name].

[One sentence explaining why you identified it this way.]

Here is how we handle this:
```

---

## Step 3A — Targeted Fix

For Failure Mode 1.

### Diagnose before touching code

Ask the developer to share:

- The exact error message or wrong behaviour
- The specific file or function where it happens
- What the code is supposed to do versus what it actually does

Read the relevant code. Do not read the entire codebase — only what is directly relevant to the problem.

### Find the root cause

Identify the root cause before suggesting any fix. A root cause is the actual reason the problem exists — not a symptom of it.

State the root cause clearly:

```
Root cause: [specific explanation of why this is happening]

This is different from the symptom because: [explanation]
```

### Suggest a precise fix

Describe the fix that addresses the root cause. Not a workaround. Not a patch on top of broken code.

```
Fix: [what needs to change and why]

This will resolve the root cause because: [explanation]
```

Wait for the developer to confirm before making any changes.

### If the fix does not work

If the suggested fix does not resolve the problem — stop. Do not suggest another fix immediately.

Re-examine the root cause diagnosis. If the fix did not work, the root cause was probably wrong. Diagnose again from the beginning before trying again.

If two root cause diagnoses have both been wrong — this may actually be Failure Mode 2 or 3. Re-evaluate.

---

## Step 3B — Hard Reset

For Failure Mode 2.

### Acknowledge the situation honestly

```
This session has gone too far in the wrong direction
to recover by patching. The right move is a clean start.

This is not a failure — it is the correct response
to a polluted context. A fresh session with clear intent
will be faster than continuing here.
```

### Save what is worth keeping

Before the session ends, extract anything valuable from the current state:

- What was the original feature supposed to do?
- What parts of the current implementation, if any, are actually correct?
- What has been learned about what does not work?
- What should the next session avoid?

Write this as a brief reset note:

```
## Reset Note — [Feature Name]

### What we were building
[Original feature description]

### What went wrong
[Honest summary of how the session went off track]

### What to avoid next time
[Specific approaches or patterns that did not work]

### Starting point for next session
[Where to begin fresh — what to keep, what to discard]
```

### Instruct the developer

```
Next steps:

1. Save this reset note somewhere accessible
2. End this session completely
3. Start a fresh session
4. Begin with /remember restore if memory exists
5. Approach [feature name] again with the reset note as context

Do not continue in this session.
```

---

## Step 3C — Rethink

For Failure Mode 3.

### Name the wrong assumption

The foundation being wrong means something was assumed that should not have been. Find it.

```
The core issue is not a bug — it is a wrong assumption:

Assumed: [what was assumed]
Reality: [what is actually true]

This means the current implementation cannot be fixed
by patching. The approach needs to change.
```

### Propose the correct approach

Based on the correct understanding, describe what the approach should have been:

```
Correct approach: [description]

Key difference from current approach: [explanation]

What needs to be discarded: [what cannot be salvaged]
What can be kept: [what is still valid]
```

### Do not start rebuilding immediately

A rethink needs the developer to understand and agree before any code changes. Present the analysis and wait for confirmation.

```
Does this diagnosis match your understanding?

If yes — we can start fresh with the correct approach.
If no — tell me what I am getting wrong.
```

Only after the developer confirms does any rebuilding begin.

---

## The Principle

The worst thing you can do when something is broken is keep doing the same thing faster.

Diagnose first. Respond correctly. Different failures need different responses — and knowing which failure you are dealing with is more than half the solution.

© jsmastery-pro · MIT · jsmastery-pro/jsm-agent-skill

Смотрите также

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

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