bug-diagnose-and-root-cause-and-fix

【Bug 诊断专用】当遇到程序错误、异常行为、性能问题、功能故障时必须使用本技能。触发关键词:报错、Bug、问题、异常、故障、不工作、诊断、排查、修复。本技能提供系统性根因分析,输出详细诊断报告和可执行修复方案,包含代码位置引用、步骤指导、注意事项。仅提供分析和方案,不直接修改代码。

242 stars

Best use case

bug-diagnose-and-root-cause-and-fix is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. 【Bug 诊断专用】当遇到程序错误、异常行为、性能问题、功能故障时必须使用本技能。触发关键词:报错、Bug、问题、异常、故障、不工作、诊断、排查、修复。本技能提供系统性根因分析,输出详细诊断报告和可执行修复方案,包含代码位置引用、步骤指导、注意事项。仅提供分析和方案,不直接修改代码。

【Bug 诊断专用】当遇到程序错误、异常行为、性能问题、功能故障时必须使用本技能。触发关键词:报错、Bug、问题、异常、故障、不工作、诊断、排查、修复。本技能提供系统性根因分析,输出详细诊断报告和可执行修复方案,包含代码位置引用、步骤指导、注意事项。仅提供分析和方案,不直接修改代码。

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "bug-diagnose-and-root-cause-and-fix" skill to help with this workflow task. Context: 【Bug 诊断专用】当遇到程序错误、异常行为、性能问题、功能故障时必须使用本技能。触发关键词:报错、Bug、问题、异常、故障、不工作、诊断、排查、修复。本技能提供系统性根因分析,输出详细诊断报告和可执行修复方案,包含代码位置引用、步骤指导、注意事项。仅提供分析和方案,不直接修改代码。

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/bug-diagnose-and-root-cause-and-fix/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/727474430/bug-diagnose-and-root-cause-and-fix/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/bug-diagnose-and-root-cause-and-fix/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How bug-diagnose-and-root-cause-and-fix Compares

Feature / Agentbug-diagnose-and-root-cause-and-fixStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

【Bug 诊断专用】当遇到程序错误、异常行为、性能问题、功能故障时必须使用本技能。触发关键词:报错、Bug、问题、异常、故障、不工作、诊断、排查、修复。本技能提供系统性根因分析,输出详细诊断报告和可执行修复方案,包含代码位置引用、步骤指导、注意事项。仅提供分析和方案,不直接修改代码。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Bug 诊断与根因分析技能

本技能提供系统性的 Bug 诊断能力,专注于分析问题根源并提供详细的解决方案指导。

## 核心功能

**诊断问题根本原因,输出详细的解决方案报告,为用户提供修复指导。**

## 执行流程

### 1. 信息收集

- 确认错误症状、复现步骤、错误信息
- 如信息不足,主动询问关键细节

### 2. 代码审查(强制第一步)

- 使用 Read/Grep/Glob 查看相关代码
- 定位可疑的文件和函数
- 使用 Bash 运行诊断命令(如 git log、git blame、npm list 等)
- 检查最近的代码变更

### 3. 根因分析

- 基于代码和错误信息形成假设
- 逐步验证各个假设
- 如需查询技术文档,在报告中说明需要查询的内容

### 4. 方案制定

- 确定根本原因
- 制定详细的修复方案
- 如有多个方案,分析优缺点并推荐最佳方案

## 输出格式

本技能输出完整的诊断报告,用户可根据此报告进行修复:

---

### 问题诊断报告

**问题概述**:
简述用户报告的问题

**环境信息**:

- 相关文件:列出所有相关文件路径
- 错误位置:精确到文件名和行号
- 技术栈:涉及的框架、库、版本等

**根本原因分析**:

- 详细的技术解释
- 引用关键代码片段(使用 `文件路径:行号` 格式)
- 解释为什么会出现这个问题

**解决方案**:

**方案一**:[推荐/备选]

1. 步骤一:具体操作说明

   - 需要修改的文件:`文件路径`
   - 修改位置:第 X 行
   - 修改内容:旧代码 → 新代码

2. 步骤二:...

3. 验证步骤:
   - 运行命令:`具体命令`
   - 预期结果:...

**方案二**(如有):...

- 优点:...
- 缺点:...

**注意事项**:

- 需要保留的代码或注释
- 可能的副作用
- 其他需要注意的点

---

## 执行准则

- **仅提供分析和指导** - 本技能仅提供分析和指导,不执行代码修改
- **基于证据** - 所有结论必须有代码或日志支持
- **详细具体** - 方案要足够详细,让用户可以直接照着执行
- **引用准确** - 使用 `文件:行号` 格式标注所有相关代码位置

Related Skills

root-cause-tracing

242
from aiskillstore/marketplace

Use when errors occur deep in execution and you need to trace back to find the original trigger - systematically traces bugs backward through call stack, adding instrumentation when needed, to identify source of invalid data or incorrect behavior

azure-quotas

242
from aiskillstore/marketplace

Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".

DevOps & Infrastructure

raindrop-io

242
from aiskillstore/marketplace

Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.

Data & Research

zlibrary-to-notebooklm

242
from aiskillstore/marketplace

自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。

discover-skills

242
from aiskillstore/marketplace

当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。

web-performance-seo

242
from aiskillstore/marketplace

Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.

project-to-obsidian

242
from aiskillstore/marketplace

将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置

obsidian-helper

242
from aiskillstore/marketplace

Obsidian 智能笔记助手。当用户提到 obsidian、日记、笔记、知识库、capture、review 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入三条硬规矩(00_Inbox/AI/、追加式、白名单字段) 3. 按 STEP 0 → STEP 1 → ... 顺序执行 4. 不要跳过任何步骤,不要自作主张 【禁止行为】: - 禁止不读 SKILL.md 就开始工作 - 禁止跳过用户确认步骤 - 禁止在非 00_Inbox/AI/ 位置创建新笔记(除非用户明确指定)

internationalizing-websites

242
from aiskillstore/marketplace

Adds multi-language support to Next.js websites with proper SEO configuration including hreflang tags, localized sitemaps, and language-specific content. Use when adding new languages, setting up i18n, optimizing for international SEO, or when user mentions localization, translation, multi-language, or specific languages like Japanese, Korean, Chinese.

google-official-seo-guide

242
from aiskillstore/marketplace

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

github-release-assistant

242
from aiskillstore/marketplace

Generate bilingual GitHub release documentation (README.md + README.zh.md) from repo metadata and user input, and guide release prep with git add/commit/push. Use when the user asks to write or polish README files, create bilingual docs, prepare a GitHub release, or mentions release assistant/README generation.

doc-sync-tool

242
from aiskillstore/marketplace

自动同步项目中的 Agents.md、claude.md 和 gemini.md 文件,保持内容一致性。支持自动监听和手动触发。