Skip to content
Back to skills

Bug Analyzer Agent

ASecurity

Bug 根因分析专家,使用独立上下文的 subagent 执行深度代码执行流分析和根因定位。当用户描述一个具体故障并要查根因(如「这个接口偶尔返回 500,帮我查根因」)时使用。

  • 6 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 25, 2026
ai-agentsgobash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 29, 2026

npx -y skills add nicholyx/ai-skills --skill bug-analyzer-agent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bug Analyzer Agent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bug Analyzer Agent
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nicholyx-bug-analyzer-agent/badge)](https://www.skillsdirectory.com/skills/nicholyx-bug-analyzer-agent)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bug-analyzer-agent
description: Bug 根因分析专家,使用独立上下文的 subagent 执行深度代码执行流分析和根因定位。当用户描述一个具体故障并要查根因(如「这个接口偶尔返回 500,帮我查根因」)时使用。
metadata:
  category: 代码质量
  tagline: "独立上下文深挖 Bug 根因,给出执行流级别的分析"
  example: "这个接口偶尔返回 500,帮我查根因"
---

# Bug 根因分析

使用上下文隔离的 subagent 执行深度 Bug 分析。

## 触发时机

- 用户要求分析 Bug 根因
- 用户提到"bug 分析"、"根因分析"、"调试"、"debug"等关键词
- 用户报告了错误或异常行为需要深入排查

## 步骤

### 第一步:整理用户需求

将用户的 Bug 描述整理为简洁的指令,包括:
- Bug 现象(错误信息、异常行为)
- 触发条件或复现步骤(如用户提供了的话)
- 相关代码位置(如用户已知)
- 重点关注方向(如用户未指定则不限定)

如果用户未指定相关代码位置,整理为"从项目入口和相关模块开始分析"。

### 第二步:启动分析 subagent

读取本目录下的 `bug-analyzer.md`,将其**完整内容**与第一步整理的需求拼接,作为 prompt 传给 Agent 工具 spawn subagent。

- `description`: "Bug 根因分析"
- `prompt`: `bug-analyzer.md` 完整内容 + "\n\n## 分析任务\n" + 用户需求指令
- `model`: 读取 `bug-analyzer.md` frontmatter 中的 `model` 字段决定(如未指定则默认 sonnet)

**关键原则**:
- **不要在主 agent 中搜集代码内容**,只传递分析目标的描述
- subagent 自己拥有 Bash、Read 等工具,会自行读取代码和 diff
- 必须将 `bug-analyzer.md` 的全部内容传递给 subagent,不可截断或摘要

### 第三步:输出分析结果

将 subagent 返回的分析结果直接输出给用户,不做摘要或缩写。

Files in this skill

  • SKILL.md1.6 KB
  • bug-analyzer.md5.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.