Chuyển đến nội dung
Skillpedia
Lập trình chung8.5k · #12433

diagnostic-reasoning

Skill này làm gì

Skill này là phương pháp từng bước để hiểu một lỗi được báo cáo trước khi ai đó thử sửa. Skill dành cho người muốn sửa lỗi đáng tin cậy thay vì đoán mò.

Khi nào nên dùng

  • ✓Khi ai đó báo lỗi và không ai nói được chính xác điều gì kích hoạt nó.
  • ✓Khi một báo cáo chẩn đoán gợi ý một nguyên nhân mà bạn muốn kiểm tra trước khi hành động.
  • ✓Khi một lỗi chỉ xuất hiện đôi khi và bạn muốn biết vì sao.

Liên kết skill

https://github.com/kunchenguid/firstmate/blob/main/.agents/skills/diagnostic-reasoning/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/kunchenguid/firstmate/blob/main/.agents/skills/diagnostic-reasoning/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Người dùng nói trang thanh toán thỉnh thoảng bị lỗi. Giúp tôi tìm điều gì thật sự kích hoạt nó trước khi chúng ta thay đổi bất cứ thứ gì.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent trước tiên tái hiện vấn đề như một người dùng thật sẽ làm. Sau đó nó tách ba thứ: điều gì khởi phát vấn đề, điều gì che giấu hoặc làm lộ nó, và người dùng thật sự thấy gì.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

diagnostic-reasoning

Use this procedure before scoping a reported bug and before acting on a diagnostic report. This skill is the single owner of Firstmate's bug-diagnosis reasoning procedure. Firstmate applies it when briefing delegated investigation and evaluating the resulting evidence, without taking over project-specific investigation itself.

Establish the observed behavior

Start from the end user's experience rather than an internal error string or an implementation hypothesis. Require an end-to-end reproduction aligned with the real user path whenever it is feasible and safe. If a faithful reproduction is not feasible, record the exact limitation and use the closest representative path without presenting it as equivalent evidence. Capture the expected behavior, observed behavior, setup, inputs, and repeatability before assigning a cause.

Separate these three facts explicitly:

  • The initiating trigger is the event, input, or transition that starts the faulty behavior.
  • The masking condition is the independent state, environment, timing, cache, configuration, or path difference that hides or exposes the fault.
  • The visible symptom is what the end user or operator can actually observe.

Do not collapse those facts into one label. A masking condition may explain why a fault appears only sometimes without being the initiating cause, and the visible symptom may be several layers downstream from both.

Test the causal explanation

Inspect the failing path and a proven path where the intended behavior is known to work. Compare their inputs, state transitions, dependencies, timing, and control flow to find the earliest meaningful divergence. Inspect relevant history, including blame, commits, migrations, and prior implementations, when it can explain why the paths diverged or which invariant was intended. Do not treat the most recent nearby change as causal without evidence.

Identify the smallest counterfactual that should change the outcome if the leading explanation is true. Change one condition at a time where practical, and record whether the symptom appears, disappears, or remains unchanged. Seek disconfirming evidence deliberately: name what observation would falsify the leading explanation, run that check when feasible, and retain contradictory results instead of explaining them away. Compare the final explanation against the proven path and show why the proposed causal boundary accounts for both the failure and the success.

Scope and act on the result

A diagnosis brief should ask for the reproduction, trigger/mask/symptom separation, divergent and proven path comparison, relevant history, smallest counterfactual, and disconfirming evidence in the report. A diagnostic report should distinguish observed facts from hypotheses and state any unresolved uncertainty that could change the recommended scope. Before acting on the report, verify that its claimed cause explains the end-user reproduction and the proven path without relying on an untested masking condition. If a load-bearing element is missing, route a focused follow-up investigation instead of treating confidence or implementation detail as proof. A diagnosis or implementation-ready recommendation is evidence, not authorization to change code. Implementation still requires the captain's request or another existing lifecycle authority, and the reproduction should become the regression test when a fix is authorized.

Câu hỏi thường gặp

Vì sao không sửa thông báo lỗi đầu tiên?

Một thông báo lỗi có thể không phải nguyên nhân thật, nên skill bắt đầu từ những gì người dùng trải nghiệm.

Nếu tôi không tái hiện được lỗi thì sao?

Agent ghi lại giới hạn và dùng bài kiểm thử an toàn gần nhất, mà không khẳng định nó giống trường hợp thật.

Phương pháp này có dùng được cho mọi loại lỗi không?

Có. Nó được viết như một phương pháp tổng quát, nên có thể dùng cho nhiều loại vấn đề được báo cáo.

Chi tiết

Mô tả gốc của tác giả

Load before scoping a reported bug and before acting on a diagnostic report.

repo: kunchenguid/firstmate

Độ phổ biến

Sao GitHub
8.5k
Vị trí xếp hạng
#12433
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự