agentleFS
Alex7developAlex7develop/my-agent-skills/skills/systematic-debugging/SKILL.md

systematic-debugging

Skill2 starsChanged 4 months agoMITView on GitHub

Находить корневую причину бага системно — через сужение области, а не через угадывание и случайные правки. Используй при сообщениях "не работает", "падает с ошибкой", "неожиданное поведение", "баг", когда причина неочевидна из первого взгляда на стектрейс. Особенно важно применять вместо того, чтобы менять код наугад и смотреть, помогло ли.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, building-chatgpt-apps and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 6 projects that use this

  • mjunaidcaSkill

    building-chatgpt-apps

    Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).

    Also in 4 projects that use this

  • mjunaidcaSkill

    building-chat-interfaces

    Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.

    Also in 4 projects that use this

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 4 projects that use this

  • +8 more from mjunaidca

The file

Files
SKILL.md

Systematic Debugging

Главная ловушка при отладке — начать менять код до того, как понята причина. Это либо случайно "лечит" симптом, оставляя причину, либо создаёт новый баг.

Процесс

  1. Воспроизвести надёжно. Если баг не воспроизводится стабильно — сначала добиться стабильного воспроизведения (минимальный набор шагов/ входных данных), иначе непонятно, исчез баг или просто не проявился.
  2. Сформулировать гипотезу явно. Одно предложение: "я думаю, причина — X, потому что Y". Не переходить к правке кода без этого шага.
  3. Проверить гипотезу минимальным способом — логом, брейкпоинтом, изолирующим тестом. Не чинить, пока гипотеза не подтверждена.
  4. Сузить область бинарным поиском, если причина не очевидна: отключать/изолировать половину системы за раз, а не проверять компоненты по одному в случайном порядке.
  5. Найти корневую причину, не только точку симптома. "Здесь падает NullPointerException" — это симптом. "Функция X не гарантирует инициализацию перед вызовом Y при условии Z" — это причина.
  6. Написать тест, который воспроизводит баг, прежде чем чинить (см. навык test-driven-development) — это доказательство, что причина понята верно, и защита от регрессии.
  7. Исправить причину, не симптом. Если фикс — это просто добавленная проверка if x is None: return, спросить себя, почему x стал None и не должен ли быть исправлен источник, а не место обнаружения.

Сигналы, что вы гадаете, а не отлаживаете

  • Меняете код и запускаете "чтобы посмотреть, поможет ли"
  • Не можете сформулировать причину бага одним предложением
  • Правка "работает", но вы не понимаете, почему баг исчез

Если заметили один из этих сигналов — вернуться на шаг 2 и явно сформулировать гипотезу, прежде чем продолжать.

Формат вывода при передаче результата

**Причина:** <корневая причина одним-двумя предложениями>
**Как воспроизвести:** <минимальные шаги>
**Тест, воспроизводящий баг:** <ссылка/код>
**Фикс:** <что изменено и почему это устраняет причину, а не симптом>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.