Token导航 LogoToken导航TokenDH.com
研究检索只读clawhub未标认证来源可访问clear审计通过

bug-pattern-diagnosis-enbug 模式诊断 zh

Agent Skill

bug-pattern-diagnosis-en 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,540

周安装

108

GitHub Stars

公开资料未说明

下载量

890
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bug-pattern-diagnosis-en(bug 模式诊断 zh)
来源仓库:https://github.com/hgvgfgvh/bug-pattern-diagnosis-en
安装命令:
openclaw skills install bug-pattern-diagnosis-en
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install bug-pattern-diagnosis-en

简介

基于历史案例库匹配症状的智能错误诊断引擎。

  • 利用过往错误记录作为参考进行模式识别。
  • 适用于常见技术问题的快速归类处理。bug-pattern-diagnosis-en 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 案例库覆盖范围有限,新型问题可能无法识别。
  • 诊断结果仅供参考,需人工确认最终方案。

SKILL.md

name
bug-pattern-diagnosis-en
description
Diagnoses bugs by matching user-reported symptoms against a curated library of past bug cases under experience/, using prior cases as memory references (never as copy-paste answers). Accumulates new cases after each successful investigation. Use when the user reports "weird error / intermittent failure / only reproduces in specific environments / strange logs".

Bug Pattern Diagnosis (Symptom-Based Triage & Experience Accumulation)

Skill Purpose

This skill works like a doctor diagnosing a patient:

  1. Collect symptoms — Ask the user to describe the bug (error messages, reproduction rate, environment, log patterns, etc.)
  2. Recall past cases — Look up similar bugs in the experience/ folder as reference memory
  3. Diagnose independently — Investigate using the current project's context. Past cases are only sources of inspiration and hypotheses, never reused as-is
  4. Accumulate new experience — After successfully identifying a new bug, save it as a new BUGxx.md for future reference

Core value: Let past troubleshooting experience inspire the direction of new investigations — but never replace independent thinking. Similar symptoms do not guarantee the same root cause. Logs that look identical may hide completely different failures.

Iron Rule: Experience Is Reference, Not the Answer

This is the single most important principle of this skill.

The BUGxx.md files under experience/ are an old doctor's case notebook, not a prescription template. When examining a new patient:

  • What you MAY do: Use the notebook to learn "what conditions are worth suspecting given these symptoms", "what methods have worked before", "what traps are easy to fall into"
  • What you MUST NOT do: Copy the root cause, copy the fix, or copy code changes just because the symptoms look similar

Why Direct Reuse Is Forbidden

  1. Symptoms can match, root causes may not: "NPE + intermittent + multi-replica" may be a missing header in one case, a Redis connection pool flake in another, or a GC stop-the-world race in yet another — or multiple overlapping problems.
  2. Projects differ wildly: The same code pattern behaves differently across versions, configs, and dependencies.
  3. AI misdiagnosis is expensive: Copy-pasting a case misleads the user into changing code based on a wrong premise, masking the real bug.
  4. **The value of experience is in *prompting thought*, not *giving answers***: Good doctors read case files to broaden their thinking, not to copy-paste treatment plans.

Correct Usage Posture

SituationWrong approachRight approach
Symptoms match closely"This is BUG01, modify invokeRemoteDeviceOpt and add x-token-payload""Your description reminds me of BUG01 — one of its signatures was asymmetric logs across replicas. Before proceeding, can you verify: do the failing requests actually produce 'stack trace on one replica, one-liner on another'?"
Partial feature match"Not exactly, but the BUG01 fix should still work""There's a diagnostic trick from BUG01 that might apply here — send 100 requests in a row and see if the success rate is ≈ 1/N. Let's validate that first."
Case contains specific codePaste BUG01's fix and ask user to apply"BUG01's fix idea was propagating headers, but for your project you need to first confirm: (1) What headers does your receiver actually depend on? (2) Is the serialization identical to the gateway's? We'll need these answers before writing any code."

Case Library Structure

bug-pattern-diagnosis-en/
├── SKILL.md                    ← This file (purpose, flow, matching rules)
└── experience/                 ← Case library
    ├── BUG01.md                ← One document per case
    ├── BUG02.md
    └── ...

Each BUGxx.md follows a fixed structure for fast lookup:

  1. Case summary (one paragraph)
  2. Symptom / signature checklist (like "positive findings" in a medical case — used for matching)
  3. Detailed explanation (pathology / root-cause chain)
  4. Diagnostic methodology (investigation flow / key techniques)
  5. Remediation plan (fix + safety net + hardening)
  6. Prevention checklist (to avoid recurrence)
  7. Playbook for similar intermittent bugs (step-by-step for analogous cases)

When to Activate This Skill

Prefer this skill when the user describes issues like:

  • "This endpoint sometimes errors and sometimes works"
  • "Reproduces in production but not locally/in testing"
  • "The error in the logs looks weird / doesn't match the code / the stack points nowhere useful"
  • "Multiple pods / instances / replicas / machines behave inconsistently"
  • "I clearly sent xxx, but the server says xxx is missing"
  • "Occasional timeouts / occasional 500s / occasional permission denied"
  • Anything framed as "intersection / intermittent / non-deterministic"

Core Flow

Step 1: Read the Case Library Index

Read the symptom / signature checklist section from all BUG*.md files under experience/ (the first 30-50 lines of each file typically suffice). Do not read full files upfront.

Step 2: Structure the Symptoms

Extract key features from the user's description, covering at least these dimensions:

DimensionExamples
Error signalNPE / 500 / 403 / timeout / data corruption / deadlock
Reproduction rate100% / 50% / sporadic / specific conditions
Environment deltaDoesn't repro locally? repros in test? in prod?
Multi-instance traitsSingle replica / multiple? how many?
Log distributionConcentrated on one instance / scattered / one has stack one doesn't
Triggering conditionsSpecific user / specific params / specific time window
Recent changesNew release? config change? scale up/down? dependency upgrade?

Step 3: Recall Cases (Not Match Conclusions)

Compare the structured features against each case library entry for similarity, but never treat the result as a conclusion. No matter how high the similarity, a case is only a "prior experience worth consulting", not a "confirmed answer".

Similarity handling:

  • High overlap (3+ key features match) → Treat the case as a "priority suspicion direction", but guide the user to independently verify whether those key features actually hold
  • Partial overlap (1-2 features match) → Treat the case as a "possible source of ideas"; mention that one or two of its diagnostic tricks may apply
  • No match (0 features) → Go to the general methodology and investigate from scratch

Step 4: Offer Investigation Suggestions (Not Diagnostic Conclusions)

Do not assert "this is BUGxx". Use the tone of "past cases had similar traits, here are possible directions and ways to verify".

Recommended response structure:

  • 🧭 Restate the structured symptoms (confirm you understood correctly)
  • 💭 Experience reference: Mention 1-2 relevant cases briefly ("this reminds me of BUGxx which had a similar trait X") — but do not paste root cause or fix code
  • 🔬 Independent verification steps: List 2-3 quick checks the user can run to validate hypotheses (success rate over 100 requests / cross-replica log comparison / header packet capture, etc.)
  • 🎯 Project-specific investigation path: Based on the user's project structure and code style, give customized next steps — not the generic steps from the case
  • ⚠️ State uncertainty clearly: Say plainly "this is just a hypothesis based on similar symptoms; the real root cause needs your verification"

Step 4 — Negative Example (DO NOT OUTPUT)

❌ "Based on your symptoms, this is BUG01 (multi-replica intermittent NPE).
    The root cause is that invokeRemoteDeviceOpt drops x-token-payload.
    Apply this fix: [pastes BUG01's code directly]"

Step 4 — Positive Example

✅ "A few things in your description stand out:
   1) Intermittent failure with success rate near 50%
   2) The error looks token-related, but the client clearly sent a token

   This reminds me of a past case (BUG01) where similar symptoms were
   caused by 'multi-replica internal calls dropping an identity header'.
   Your project isn't necessarily the same thing, so **let's validate
   a couple of hypotheses first**:

   Q1: How many replicas does your service have? Does the success rate
       approximate 1/N?
   Q2: Can you tail logs from all replicas simultaneously and see if
       the failing request leaves traces on multiple replicas with
       asymmetric detail levels?

   Run those two checks, share the results, and we'll pick a path."

Step 5: Accumulate a New Case (Optional)

Proactively ask the user whether to capture this investigation as a new case when:

  • No case in the library matched, but the bug was successfully identified
  • An existing case partially matched, but there's a significantly new variant
  • A new diagnostic technique emerged during investigation

With user consent, create BUGxx.md (numbering = current max + 1) following the case document template below.

General Methodology (When No Case Matches)

Investigate unknown bugs in this order:

1. Quantify the Symptom

  • Success rate? Fire 100 consecutive requests and tally
  • Reproduction conditions? Can a minimal case reproduce reliably?
  • Time-of-failure distribution? Specific time window / user / machine?

2. Inspect Deployment Topology

  • How many replicas? Does success rate ≈ 1/N or (N-1)/N?
  • Can a single replica reproduce? If not → strong signal of inter-replica inconsistency
  • Any canaries / gray releases? Is there a mix of old and new versions?

3. Cross-Instance Log Comparison

  • By traceId / time window, pull logs from all relevant instances and view side-by-side
  • Look for cases where "the same request leaves dislocated evidence across instances"
  • Watch for asymmetric verbosity (one instance has full stack, another has a one-liner)

4. Source vs Deployed Binary Parity

  • javap -c -p the deployed jar's key classes and diff against local source
  • Verify image tag, git commit hash match expectations
  • Check ConfigMaps / env vars are identical across all replicas

5. Protocol Boundary Audit

If you suspect context propagation issues:

  • Draw the full lifecycle of "identity / traceId / MDC / ThreadLocal"
  • Mark every "cross-thread / cross-process / cross-instance" boundary
  • For each boundary, does an explicit pack → unpack mechanism exist?
  • Use tcpdump / print getHeaderNames() at the receiver to verify what headers actually arrive

6. Compare Against Sibling Code

  • Does the project contain similar code that does not have this bug?
  • Diff the buggy code vs the healthy code — the delta is often the culprit

Case Document Template (for new BUG*.md files)

# BUGxx: <One-line title emphasizing the most distinctive symptom>

## Case Summary

<One paragraph, under 200 words: phenomenon, reproduction conditions, root-cause type, blast radius>

## Symptom / Signature Checklist (for matching)

> If N+ of these hold simultaneously, high probability of this case

- [ ] Feature 1 (concrete, verifiable)
- [ ] Feature 2
- [ ] Feature 3
- [ ] ...

### Key Log Fingerprints

<Paste typical error log snippets so future investigations can grep-match them>

### Exclusion Criteria (Negative Signals)

- If <xxx> appears, this is NOT this case

## Detailed Explanation / Root Cause Chain

<The pathology. Use diagrams / tables / code references to show data flow, control flow, state transitions>

## Diagnostic Methodology

### Techniques Used

- <Technique 1, e.g. "cross-replica log comparison">
- <Technique 2, e.g. "javap bytecode diff">
- ...

### Diagnostic Steps (in order)

1. ...
2. ...
3. ...

## Remediation Plan

### Root-Cause Fix

<The core fix, with code reference, impact assessment>

### Safety Net / Defense in Depth

<Secondary defenses so a missed fix still doesn't crash>

### Hardening / Cleanup

<Long-term improvements, coding standards, sibling-code sweeps>

## Prevention Checklist

During development:
- [ ] ...

During deployment:
- [ ] ...

During review:
- [ ] ...

## Playbook for Similar Intermittent Bugs

When symptoms look similar, walk through:

1. Quantify reproduction (10 min)
2. Check topology (5 min)
3. Cross-replica log diff (30 min)
4. ...

## References

- Relevant file paths
- Relevant PRs / commits
- Relevant wiki

Output Style Constraints

  • Lead with direction, not with the conclusion: Tell the user what's worth suspecting and why, instead of asserting "this is bug X"
  • Never speak in 100% certain terms: Similar symptoms ≠ same root cause. Use phrases like "looks like / worth suspecting / could be / past cases suggest"
  • Recommendations must be executable: Provide concrete commands or quick checks, not abstract theory
  • Make the user verify before coding: Better to ask 2 "please confirm..." questions than to let them edit code based on a guess

Hard Rules (Forbidden Actions)

  • Never paste the fix code from a case directly: The code in BUGxx.md is "how that project fixed it", not necessarily right for the current project
  • Never assert "this is BUGxx": At most say "this reminds me of BUGxx" / "has similar traits to BUGxx"
  • Never skip independent verification: Even if 5 of 5 features match, run at least 1-2 quick checks before discussing fixes
  • Never copy-paste the case's prevention checklist or playbook wholesale: These are thinking material; tailor and rewrite each time based on the current context

Case Accumulation Rules

  • Don't create a case just to create one — only capture truly novel value (new symptom combinations, new diagnostic techniques)
  • Don't use generic bug taxonomy terms (OOM, deadlock) — use symptom descriptions to organize cases ("same request leaves dislocated evidence across replicas" matches better than "state consistency bug")
  • Index the library by phenomenon, not by "tech stack" or "vulnerability class"
  • End every case with applicability boundaries and counter-examples (what situations are NOT this case), to sharpen future identification

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

95.18%
按下载量换算847

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills