bug-analysis

bug-analysis is a skill for Claude Code, Codex from fishzjp/qa-skills. It costs 111 tokens per session (2,302 once invoked), scanned A, original, MIT.

A method for investigating confirmed software bugs by tracing their cause in code and assessing their effects. It also records repair and regression-testing recommendations in a test report.

In plain words
What is it for?
Use it to find a confirmed bug's root cause, assess affected paths and users, justify its severity, suggest a repair, and recommend tests to run after the change.
Why use it?
It separates confirmed defects from suspicions and makes the impact of a bug easier to assess. This helps teams understand what else may be affected and what should be checked after a fix.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fishzjp/qa-skills/bug-analysis
Any agent
npx skills add fishzjp/qa-skills --skill bug-analysis
Clone the repo
git clone --depth 1 https://github.com/fishzjp/qa-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bug-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/fishzjp/qa-skills/bug-analysis.svg)](https://agentmods.dev/skills/fishzjp/qa-skills/bug-analysis)
Your own site
<a href="https://agentmods.dev/skills/fishzjp/qa-skills/bug-analysis"><img src="https://agentmods.dev/badge/skills/fishzjp/qa-skills/bug-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,302 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00111 $0.02302
Opus 5 $0.00056 $0.01151
Sonnet 5 $0.00022 $0.00460
Haiku 4.5 $0.00011 $0.00230

Measured yesterday against content hash 55c11da12dcf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bug-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bug-analysis/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bug 分析(bug-analysis)

已确认的 Bug 做根因定位、影响分析、回归建议。

  • 输入:Bug 报告(现象 + 复现步骤 + 证据)、代码仓库、(可选)需求模型 / 测试用例;批量执行场景下 A 类条目可来自失败分流表(../core/triage.md 产出,条目附带的 G/S 信号摘要与 evidence 字段即复现起点)
  • 输出(落盘):Bug 条目(结构见下),追加进测试报告../core/report-template.md §3 的根因分析 / 影响范围 / Severity 依据 / 修复建议 / 回归建议五个扩展字段即本 skill 的填写范围)
  • 边界:输入是已确认的 Bug(用户或执行结果已定性"这是缺陷");审查发现的疑似缺陷(待验证)归 test-case-writing 的 Cx 记录;回归范围选择regression-testing

When to Use

  • Bug 已经定性确认,需要定位根因(读到 文件:行 的分叉点)
  • 需要评估 Bug 的影响面(同根因其他路径 / 脏数据 / 受影响用户)
  • 修复后需要回归用例建议(修复验证 + 关联回归)

When NOT to Use

  • 还没定性("这是 Bug 还是特性?")→ 先经用户裁决(Bug 定性检查点,见 qa);证据收集阶段 → automated-e2e-testing 工作流二 / api-testing
  • 代码审查发现的疑似缺陷(未复现、未定性)→ test-case-writing 的 Cx 缺陷记录(待实测确认)
  • 需要回归清单(哪些用例要跑)→ regression-testing(本 skill 产出回归用例建议
  • 端到端流水线 → qa 编排(本 skill 是其阶段 6)

Bug 条目结构(追加进测试报告)

条目字段与填写模板../core/report-template.md §3 为唯一来源(此时加载),本 skill 只补充填写语义:

  • 本 skill 的填写范围:根因分析 / 影响范围 / Severity 依据 / 修复建议 / 回归建议五个扩展字段(报告 §3 中除「复验轮次」外的 8 个基础字段——严重程度 / 状态(初始"新建",后续随回归结果更新,见 ../core/report-template.md 使用约定 6) / 发现方式 / 复现步骤 / 预期行为 / 实际行为 / 证据 / 环境——由发现方已填,不重写)
  • 根因分析必须标注 status:Inference(读代码推断,未运行验证)或 Verified(已通过复现/最小实验验证,E3)——不伪装推断为事实(状态语义见 ../core/evidence.md 第 3 节)
  • 影响范围 / Severity 依据逐条给来源;证据链标注 evidence 等级(E0–E4 + 文件:行

工作流

1. 复现(先拿到稳定证据)

  • 按 Bug 报告步骤复现;复现不了 → 不硬分析,区分"环境差异 / 数据依赖 / 概率性",向用户要环境与数据线索
  • 复现过程采集证据:请求/响应原文、日志、截图(E3 运行证据)
  • 概率性 Bug 战术:低频复现不硬等——① 基线量化:先跑足样本量建复现频率基线(N≥10 次记录触发次数,如"N≥10 触发 2 次"),修复后同条件复验对比,避免单次通过误判已修复;② 定向提频三类:并发类加大并发度 / 缩短操作间隔复跑,时间类取时区 / 跨日 / 跨秒边界时刻集中触发,环境类换设备 / 数据 / 网络条件对比隔离触发因素

2. 读代码定位根因

  • 从现象入口(页面/接口)向下追:入口 → 调用链 → 数据读写,定位到具体行为与预期的分叉点文件:行
  • 检查常见根因类别:边界未防护 / null 未兜底 / 状态竞态 / 事务不完整 / 缓存不一致 / 权限漏判 / 并发覆盖 / 配置漂移
  • 根因结论标注 status:Inference(代码推断,未运行验证)或 Verified(已通过复现/最小实验验证,E3)——不伪装推断为事实

3. 影响分析(五面)

  • 功能面:同一根因会波及哪些入口/路径(grep 相同模式的其他调用点)
  • 数据面:是否已产生脏数据、影响存量数据的范围
  • 用户面:受影响角色与操作路径
  • 安全面:该缺陷是否构成可被利用的窗口(越权可达 / 敏感数据暴露 / 注入面)——命中即 Severity 上浮一级(S2→S1、S1→S0,S0 封顶)。注意与第 4 步定级规则的分工:安全面用于潜在窗口的上浮;已构成实际安全后果(数据丢失 / 资损 / 实际越权达成)的直接 S0,不适用上浮口径
  • 修复波及面:预期修复方式会改动哪些代码 / 配置 / 数据——修复本身改变的行为就是回归建议的直接输入(衔接第 5 步)

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +11 tokens per session 55c11da12dcf
  2. 5d ago First seen · 87 lines · 100 tokens per session scan A 7e9c22b53ea2

Subscribe to this mod's changes

bug-analysis is a skill published in the GitHub repository fishzjp/qa-skills (23 stars, last pushed 2d ago), licensed MIT. It adds 111 tokens to every session and 2,302 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

qa-expert

Expert-level quality assurance, testing strategies, automation, and QA processes. Use when the user mentions testing, test automation, quality assurance, or Selenium, or when the task involves Testing Types, QA Processes, Test Strategy, or Defect Management.

personamanagmentlayer/pcl · 53 tokens

defect-analyzer

Use when someone asks to analyze a defect report, analyze bug data, perform defect metrics analysis, review a defect log, or upload a defect file for quality insights.

ukkuru/testmetry-skills · 38 tokens

test-case-writer

Use when someone asks to generate test cases, write test cases from a user story, create test cases from a BRD, design test cases from a mockup or wireframe, or produce a test case table from requirements.

ukkuru/testmetry-skills · 50 tokens

test-review

Ревью только что написанных или изменённых автотестов на соответствие best practices TypeScript + Playwright (по официальной документации) и конвенциям вашего проекта. Используй по /test-review либо после написания/правки любого теста (UI E2E, API, UI+API, моки, visual, mobile) или Page Object/фикстуры/констант — до…

akovalion/paranoid-qa · 119 tokens

playwright-expert

Expert in Playwright E2E testing framework, auto-waiting mechanisms, test generation, trace viewer, and CI/CD integration. Use when the user mentions testing, end-to-end tests, QA, automation, end-to-end testing, or test automation, or when the task involves Playwright Framework, Test Organization, Advanced Features…

personamanagmentlayer/pcl · 77 tokens

selenium-expert

Expert in Selenium WebDriver, Selenium Grid, page object model, waits, cross-browser testing, and test automation frameworks. Use when the user mentions testing, end-to-end tests, QA, automation, WebDriver, or Selenium grid, or when the task involves Selenium Components, Browser Support, Advanced Features, or Basic…

personamanagmentlayer/pcl · 72 tokens