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.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
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
Bình luận
- …
Thêm skill từ kho mã này
afk
8.5kGiúp agent của bạn tiếp tục làm việc khi bạn vắng mặt, giữ các quyết định cho lúc bạn quay lại và gửi bạn một bản tóm tắt rõ ràng khi bạn về.
ahoy
8.5kGiúp agent của bạn tóm tắt ngắn những gì đã xảy ra trong phiên và hướng dẫn bạn qua các quyết định vẫn đang chờ bạn.
ask-user-authority
8.5kGiúp agent của bạn tự quyết các câu hỏi rà soát khi chúng khớp rõ với kế hoạch đã thống nhất, chỉ hỏi bạn khi câu hỏi mơ hồ hoặc có rủi ro.
away-quiet-supervision
8.5kĐặt các quy tắc an toàn khi giám sát công việc ở chế độ vắng mặt hoặc im lặng, để agent giữ tin nhắn rõ ràng và giữ các quyết định cần bạn.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.