logic-review
Что он делает
Этот инструмент помогает находить логические ошибки в коде (в файле или функции). Он анализирует, по шагам, как код должен работать, и выясняет, где поведение отклоняется от ожидаемого.
Когда использовать
- ✓Когда вы подозреваете, что в коде есть ошибка, но не знаете, какая именно.
- ✓Когда вы проверяете код и хотите убедиться, что он работает так, как задумано.
- ✓Чтобы проверить, правильно ли работает конкретная функция в программе.
Ссылка на скилл
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/logic-review/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Проверьте этот код и скажите, есть ли в нём логические ошибки.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Инструмент изучает предпосылки (что код должен делать), отслеживает выполнение (что он делает на самом деле) и находит места, где фактическое поведение расходится с ожидаемым. После этого он предлагает исправление.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Supporting material availability
This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:
<support-root>/scripts/grade-iteration.py
Obtain the required material from the declared upstream source, or from a user-provided installation of that source. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.
Logic-Lens — Logic Review
When to Use
Use this skill when you need find logic bugs in a single file or function via semi-formal execution tracing (Premises → Trace → Divergence → Trigger → Remedy). Trigger when a user shares code and suspects something is wrong without naming a concrete failure — phrases like "review this", "does this look right",...
Output Skeleton Contract
The downstream grader (scripts/grade-iteration.py) and other Logic-Lens skills consume this report by substring-matching literal tokens defined in ../_shared/common.md §1 (header map), §2 (mandatory field labels + Logic Score), and ../_shared/report-template.md (skeleton). Paraphrasing those tokens — even with a synonym that reads fine to a human — breaks the contract regardless of analysis quality.
Three failure modes observed in benchmark that deserve specific callout beyond the general rule:
- Synonym substitution for field labels whose substituted form omits the required substring — replacing
Premises/前提with前置条件构建/前置条件(eval-201), orDivergence/偏差with根因/核心缺陷/结论(eval-252). Each substitution reads fine to a human and may even appear as a section heading or table column, but the substituted word does NOT contain the required substring, so grader and cross-skill consumers see the document as missing the field entirely. Use the literal token fromcommon.md§1; you can still add a descriptive subtitle alongside it. - Demoting a confirmed L-code finding to
### 附加观察(非 Finding)/### Additional observation— if Premises→Trace→Divergence holds, the finding belongs inside## Findingswith the five literal fields, even at Suggestion severity. This was a recurring cause of eval-279 (quicksort L4) failing on Sonnet runs. - Omitting
Divergence:/偏差:field entirely — the single most frequent failure mode. Many outputs correctly analyze the bug but write the divergence as prose, in a table cell, or under headings like根因,故障点,核心问题,缺陷. TheDivergence:field is the specific label for "the point where actual behavior diverges from the premise." It is NOT optional and has no acceptable synonym. For no-bug findings useDivergence: None — [why the premise holds](中文偏差:无——[原因]).
Correctly formatted finding — use as template:
### 🔴 Critical
**[L4] — Mutation during iteration skips elements**
Premises: `users` is `list[User]` passed by reference; `list.remove()` shifts subsequent elements left; the `for` iterator advances by index.
Trace: [1] index=0, user is inactive → `remove()` shifts list. [2] Iterator advances to index 1, which now holds the element originally at index 2 — the original index-1 element is skipped. Rebuttal check: PASSED — no defense found.
Divergence: `remove_inactive([inactive₁, inactive₂, active])` returns `[inactive₂, active]` (2 elements) instead of `[active]` (1 element) — the second inactive user is never visited.
Trigger: `remove_inactive([User(False), User(False), User(True)])` → expected 1, actual 2.
Remedy: Replace loop body with `return [u for u in users if u.is_active]`. Dry-run: ✅ divergence eliminated.
Each finding block MUST contain all five literal labels (Premises: / Trace: / Divergence: / Trigger: / Remedy: or 前提: / 追踪: / 偏差: / 触发: / 修复:) as line-starting prefixes. Section headers (### Premises, ## Execution Trace) do NOT satisfy this requirement — the labels must appear inside the finding block.
…
Частые вопросы
Что такое «Premises», «Trace», «Divergence», «Trigger» и «Remedy»?
Это шаги анализа: Premises (что должно происходить), Trace (что происходит на самом деле), Divergence (где фактическое поведение отличается от ожидаемого), Trigger (пример, который показывает ошибку) и Remedy (исправление).
Что будет, если логических ошибок нет?
Инструмент сообщит, что ошибок не найдено, и объяснит, почему код работает правильно.
Нужно ли что-то устанавливать дополнительно?
Да, инструменту могут понадобиться дополнительные скрипты, которые не входят в комплект. Их нужно получить из указанного внешнего источника.
Подробности
Оригинальное описание автора
Find logic bugs in a single file or function via semi-formal execution tracing (Premises → Trace → Divergence → Trigger → Remedy).
Популярность
- Звёзды на GitHub
- 48k
- Место в рейтинге
- #5101
- Лицензия
- MIT
- Обновлён
- 15.10.2026
Комментарии
- …
Другие скиллы из этого репозитория
00-andruia-consultant
48kПомогает агенту начинать или улучшать ИИ-проекты: анализирует код, подбирает инструменты и составляет план на испанском.
007
48kАгент проводит аудит безопасности и моделирование угроз для защиты проектов.
10-andruia-skill-smith
48kПомогает агенту создавать и улучшать ИИ-инструменты: описание работы, документация и проверка структуры.
20-andruia-niche-intelligence
48kАгент составляет обзор отрасли: контекст, правила, паттерны использования и риски по надёжным источникам.
Похожие скиллы
test-driven-development
311kУчит агента сначала писать падающий тест, увидеть, что он падает, и только затем писать минимальный код, который его проходит, прежде чем создавать любую функцию или исправление.
verification-before-completion
311kУчит агента запускать настоящие проверки и читать их вывод, прежде чем утверждать, что задача, исправление или сборка готовы или проходят.
migrate-to-shoehorn
310kЗаменяет рискованные приведения типов в тестовых файлах на библиотеку shoehorn, чтобы тесты могли использовать неполные данные и проходить проверку типов.