logic-explain
Skill này làm gì
Công cụ này giải thích từng bước code hoạt động như thế nào, cho thấy điều gì xảy ra với thông tin khi code được chạy với một đầu vào cụ thể.
Khi nào nên dùng
- ✓Khi bạn không hiểu vì sao code cho ra kết quả bất ngờ.
- ✓Khi bạn muốn xem thông tin thay đổi thế nào bên trong code.
- ✓Khi bạn cần hướng dẫn chi tiết về cách code thực thi.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/logic-explain/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
“Giải thích đoạn code sau với đầu vào này: [code] và đầu vào: [input]”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ phân tích code và đầu vào được cung cấp. Sau đó, nó mô tả chi tiết từng bước thực thi, giải thích sự thay đổi của biến và cách code chuyển giữa các phần khác nhau.
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 — Execution Explain
When to Use
Use this skill when you need explain what a specific piece of code actually does for a given input by producing a step-by-step execution trace (interprocedural, with name resolution and type transitions). Trigger when the user is confused about behavior or asks why code produces X instead of Y — "walk me through...
Setup
Use lazy loading per ../_shared/common.md §13:
- Read
../_shared/common.mdonly for language, report header variants, scope routing, and loading budget. - Read only the relevant step in
logic-explain-guide.mdas you reach it. - Load
../_shared/semiformal-guide.md,../_shared/semiformal-checklist.md, and../_shared/report-template.mdon demand when the current step needs them.
Note: logic-risks.md is intentionally skipped — logic-explain does not produce L-code findings, and Remedy is intentionally out of scope for this mode. If the trace reveals a bug, stop and recommend logic-review or logic-locate. When handing off, do not discard work already done — present the premises established and trace steps completed under a "Partial trace context (carry into next skill):" heading so the user can pass them directly to the follow-on skill.
Process
Step 0. Language + scope routing. Detect language per common.md §1. Confirm a single function + a single input scenario. If the user wants bug-finding without a scenario, hand off to logic-review.
Step 1. Entry point and scenario (guide Step 1) — name the function, the input scenario, and what the user is trying to understand.
Step 2. Build premises (guide Step 2) — resolve every non-obvious name, state the types of key variables at entry, note global/module state accessed.
Step 3. Produce step-by-step trace (guide Step 3) — numbered, interprocedural, active voice; cross function boundaries whenever relevant to the user's scenario. Keep the trace scenario-bound; do not branch into alternative paths unless they explain the user's confusion.
Step 4. Highlight non-obvious behavior (guide Step 4) — name resolutions, implicit coercions, hidden side effects; the "gotchas" the casual reader would miss.
Step 5. Summarize actual vs. assumed (guide Step 5) — one sentence each; this is the core value for the user.
Mode line in report: Execution Explain (Chinese: 执行解释).
Note: Execution Explain is descriptive, not evaluative. Omit the Logic Score / Fault Confidence / Verdict line from the report header.
Example
User request:
Explain what a specific piece of code actually does for a given input by producing a step-by-step execution trace (interprocedural, with name resolution and type transitions).
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
'Execution trace' là gì?
Đó là như một nhật ký ghi lại mọi hành động của code, cho thấy trạng thái thông tin ở từng thời điểm.
'Name resolution and type transitions' nghĩa là gì?
Nghĩa là công cụ giải thích mỗi tên (biến, hàm) đang tham chiếu đến cái gì và kiểu dữ liệu (số, văn bản) thay đổi thế nào trong quá trình thực thi.
Công cụ này có sửa lỗi code không?
Không, nó chỉ giải thích code hoạt động thế nào. Nếu phát hiện lỗi, nó có thể gợi ý các công cụ khác để sửa.
Chi tiết
Mô tả gốc của tác giả
Explain what a specific piece of code actually does for a given input by producing a step-by-step execution trace (interprocedural, with name resolution and type transitions).
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5097
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự á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á.