gitnexus-debugging
Skill này làm gì
Nó hướng dẫn agent của bạn tìm nguyên nhân của một lỗi bằng cách theo dõi cách mã gọi và sử dụng từng phần. Nó dành cho lập trình viên muốn tìm nhanh nguyên nhân gốc của một sự cố.
Khi nào nên dùng
- ✓Khi một hàm bị lỗi và bạn muốn biết tại sao.
- ✓Khi xuất hiện một lỗi và bạn cần tìm nơi nó phát sinh.
- ✓Khi một endpoint trả về lỗi và bạn muốn lần theo đoạn mã phía sau nó.
Liên kết skill
https://github.com/abhigyanpatwari/GitNexus/blob/main/.claude/skills/gitnexus-debugging/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
“Bạn có thể tìm xem vì sao hàm thanh toán trả về lỗi khi giỏ hàng trống không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent xác nhận kho mã, làm mới chỉ mục mã và lần theo các lệnh gọi từ đoạn mã bị lỗi. Sau đó nó báo cáo nguyên nhân gốc có khả năng nhất, cùng kho mã và độ mới của chỉ mục.
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.
Debugging with GitNexus
When to Use
- "Why is this function failing?"
- "Trace where this error comes from"
- "Who calls this method?"
- "This endpoint returns 500"
- Investigating bugs, errors, or unexpected behavior
Bind the repository first
A root cause traced in the wrong repository is a wrong root cause.
Bind once using a confirmed registry name/path or configured MCP default. Call
list_repos {} if the target is not yet known; reuse that binding across calls. With one indexed repository,
use the examples below as written. With more than one, pass repo on every
call: an omitted repo normally errors, but under an MCP policy with a
configured default it resolves to that default silently. If you cannot tell
which repository is meant, stop and ask. This matters most for cypher, whose
statement carries no in-band hint of which database it ran against.
list_repos is paginated, so page with offset: pagination.nextOffset until
hasMore is false before concluding a repository is absent.
A stale index describes the code from before your bug, so refresh before trusting a trace, and state the repository and index freshness with the diagnosis.
Workflow
0. Bind the repo once (list_repos only if not already known)
1. If the suspect is unknown, query for the error/symptom with small result limits
2. context({name: "<suspect>"}) → See callers/callees/processes
3. Read a process resource only if its trace resolves an open question
4. cypher({statement: "MATCH path..."}) → Custom traces if needed
If "Index is stale" → run
node .gitnexus/run.cjs analyzein terminal. Hot-toolstalenessnames which index answered (branch/lastCommit) and how fresh it is (status). Re-analyze only forbehindordiverged—currentis identity,unknownis unmeasurable.
Checklist
- [ ] Once per session: bind repo; explicit repo when >1 indexed, ask if ambiguous
- [ ] Understand the symptom (error message, unexpected behavior)
- [ ] query for error text or related code
- [ ] Identify the suspect function from returned processes
- [ ] context to see callers and callees
- [ ] Trace execution flow via process resource if applicable
- [ ] cypher for custom call chain traces if needed
- [ ] Read source files to confirm root cause
- [ ] State the repository and index freshness with the diagnosis
Keep investigations focused
Start with a known symbol's context, or a small query (limit: 3,
max_symbols: 3, include_content: false, chain_depth: 0) to discover one.
When the server advertises these single-repository filters, request only the
needed evidence:
context({uid: "<suspect id>", repo: "my-app", include_content: true,
response_sections: ["outgoing"], relationTypes: ["CALLS"]})
trace({from_uid: "<suspect id>", to_uid: "<failure id>", repo: "my-app"})
symbol and completeness/staleness diagnostics remain in a filtered context.
relationTypes filters the returned incoming/outgoing categories only; it does
not expand their existing bounded window or filter an explicitly requested chain.
For callback registration, include USES; for imports or inheritance, request
those relation types or omit the filter. Omitted references are not absent
references. Broaden when the hypothesis needs it, and preserve UNKNOWN/partial
warnings. Confirm source and tests before claiming a root cause. A useful 2–3
call investigation is a goal, not a reason to skip verification or pre-edit impact.
Debugging Patterns
| Symptom | GitNexus Approach |
|---|---|
| Error message | query for error text → context on throw sites |
| Wrong return value | context on the function → trace callees for data flow |
| Intermittent failure | context → look for external calls, async deps |
| Performance issue | context → find symbols with many callers (hot paths) |
| Recent regression | detect_changes to see what your changes affect — pass worktree for a linked worktree |
| "How does A reach B?" | trace between the two symbols — shortest call chain in one call |
Tools
query — find code related to error:
query({search_query: "payment validation error", repo: "my-app"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError, PaymentEx
Câu hỏi thường gặp
Vì sao phải xác nhận kho mã trước?
Skill nói nguyên nhân gốc được lần theo sai kho mã sẽ sai, nên nó hỏi khi mục tiêu chưa rõ.
Nó có làm mới chỉ mục không?
Có. Skill nói chỉ mục cũ mô tả mã cũ, nên nó làm mới trước khi tin vào kết quả lần theo.
Nó có tìm được ai gọi một phương thức không?
Có. Tìm người gọi là một trong các ví dụ câu hỏi mà skill xử lý.
Chi tiết
Mô tả gốc của tác giả
Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\", \"Trace this bug\"
repo: abhigyanpatwari/GitNexus
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #3606
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
gitnexus-cli
48kGiúp agent của bạn chạy các lệnh GitNexus để lập chỉ mục một dự án mã nguồn, kiểm tra trạng thái, xóa chỉ mục hoặc tạo wiki.
gitnexus-exploring
48kGiúp agent của bạn khám phá một codebase lạ, giải thích các phần kết nối với nhau thế nào và một tính năng như đăng nhập hoạt động ra sao.
gitnexus-guide
48kCung cấp cho agent của bạn bảng tra cứu nhanh các công cụ, tài nguyên và đồ thị tri thức của GitNexus, rồi chỉ đến hướng dẫn phù hợp.
gitnexus-impact-analysis
48kGiúp agent của bạn kiểm tra những gì sẽ bị hỏng trước khi bạn sửa một hàm, để biết mã nào phụ thuộc vào 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á.