Chuyển đến nội dung
Skillpedia
Kiểm thử48k · #5100

logic-locate

Skill này làm gì

Công cụ này giúp tìm nguyên nhân chính xác của một lỗi chương trình. Nó điều tra vấn đề từng bước, theo cả hai chiều ngược và xuôi, để xác định lỗi bắt nguồn từ đâu.

Khi nào nên dùng

  • ✓Khi chương trình bị crash và bạn có nhật ký lỗi (stack trace).
  • ✓Khi một bài kiểm thử cụ thể thất bại và bạn không biết vì sao.
  • ✓Khi bạn thấy kết quả sai và muốn truy nguồn gốc của nó.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/logic-locate/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/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/logic-locate/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

“Tìm nguyên nhân của lỗi này: [dán stack trace vào đây]”

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

Cách hoạt động

AI phân tích lỗi, lần theo dữ liệu và hành động dẫn đến lỗi, rồi xác nhận xem đường đi đó có thực sự gây ra vấn đề quan sát được hay không. Mục tiêu là tìm đúng điểm mà mọi thứ bắt đầu sai.

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.

Logic-Lens — Fault Locate

When to Use

Use this skill when you need locate the root cause of a CONFIRMED failure via backward-then-forward semi-formal tracing. Trigger when the user provides a stack trace, failing assertion, error message, or specific wrong-value observation — "find the bug", "this test is failing", "track down this crash", "why is...

Setup

Use lazy loading per ../_shared/common.md §13:

  1. Read ../_shared/common.md only for language, Iron Law, Fault Confidence, scope routing, Remedy discipline, config fields, and loading budget.
  2. Read only the relevant step in logic-locate-guide.md as you reach it.
  3. Load ../_shared/logic-risks.md, ../_shared/semiformal-guide.md, ../_shared/semiformal-checklist.md, and ../_shared/report-template.md on demand when the current step needs them.

Process

Step 0. Language + scope routing. Detect language per common.md §1. Confirm a concrete failure exists (stack trace, failing assertion, specific wrong value). If only a suspicion, switch to logic-review.

Step 1. Understand the failure (guide Step 1) — observed behavior, expected behavior, reproduction path.

Step 2. Identify the entry point (guide Step 2) — failing test, outermost application frame, or request handler — whichever is closest to the failure. Stay inside the failure cone first: stack frames, failing test fixture, directly called local functions, and config/env values read on that path. Do not scan unrelated modules unless the trace crosses into them.

Step 3. Trace backward from the failure point (guide Step 3) — walk each value and state back to its origin, building premises at every hop.

Step 4. Trace forward to confirm (guide Step 4) — from the suspected root, verify the trace reaches the observed symptom.

Step 5. Interprocedural tracing if a callee is implicated (guide Step 5) — trace into the callee; check return values under observed conditions, unhandled exceptions, shared-state mutation. Apply the depth limit and Call-Chain Context Label format defined in semiformal-guide.md §Call-Chain Context Labels; at the limit, state the remaining callee path as a premise assumption and downgrade to Medium confidence (per common.md §7).

Step 6. Identify the root divergence and classify (guide Step 6) — state the exact line/expression, the violated premise, the actual behavior, the propagation chain to the symptom; pick the L-code.

Step 7. Output the focused report (guide Step 7) — Fault Confidence (High/Medium/Low, per common.md §7); Primary Fault (single five-field finding); optionally Contributing Factors; a minimal Remedy per common.md §10. Format is mandatory even for simple one-function bugs: always emit the labeled Premises / Trace / Divergence / Trigger / Remedy fields and the Fault Confidence line. Never answer with a plain fix suggestion.

Mode line in report: Fault Locate (Chinese: 故障定位).

Output format: the Findings section has ONE Primary Fault, not a full Critical/Warning/Suggestion split. The Logic Score line is replaced by Fault Confidence: High / Medium / Low.

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Câu hỏi thường gặp

'Stack trace' là gì?

Đó là nhật ký chi tiết các lệnh gọi hàm đang diễn ra khi lỗi xảy ra, cho thấy trình tự các sự kiện.

'Root cause' nghĩa là gì?

Đó là lý do gốc, nguyên nhân ban đầu của vấn đề, nguồn gốc của mọi triệu chứng.

AI có sửa lỗi không?

Không trực tiếp. Công cụ tập trung vào tìm và giải thích nguyên nhân của lỗi, cung cấp một báo cáo chi tiết để người khác sửa.

Chi tiết

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

Locate the root cause of a CONFIRMED failure via backward-then-forward semi-formal tracing.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5100
Giấy phép
MIT
Cập nhật
15/10/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ự