MITupdated 1mo ago
"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
What can you do with Gitnexus Debugging?
name: gitnexus-debugging description: "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""
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
Workflow
1. gitnexus_query({query: "<error or symptom>"}) ā Find related execution flows
2. gitnexus_context({name: "<suspect>"}) ā See callers/callees/processes
3. READ gitnexus://repo/{name}/process/{name} ā Trace execution flow
4. gitnexus_cypher({query: "MATCH path..."}) ā Custom traces if needed
If "Index is stale" ā run
npx gitnexus analyzein terminal.
Checklist
- [ ] Understand the symptom (error message, unexpected behavior)
- [ ] gitnexus_query for error text or related code
- [ ] Identify the suspect function from returned processes
- [ ] gitnexus_context to see callers and callees
- [ ] Trace execution flow via process resource if applicable
- [ ] gitnexus_cypher for custom call chain traces if needed
- [ ] Read source files to confirm root cause
Debugging Patterns
| Symptom | GitNexus Approach |
|---|---|
| Error message | gitnexus_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 |
Tools
gitnexus_query ā find code related to error:
gitnexus_query({query: "payment validation error"})
ā Processes: CheckoutFlow, ErrorHandling
ā Symbols: validatePayment, handlePaymentError, PaymentException
gitnexus_context ā full context for a suspect:
gitnexus_context({name: "validatePayment"})
ā Incoming calls: processCheckout, webhookHandler
ā Outgoing calls: verifyCard, fetchRates (external API!)
ā Processes: CheckoutFlow (step 3/7)
gitnexus_cypher ā custom call chain traces:
MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
RETURN [n IN nodes(path) | n.name] AS chain
Example: "Payment endpoint returns 500 intermittently"
1. gitnexus_query({query: "payment error handling"})
ā Processes: CheckoutFlow, ErrorHandling
ā Symbols: validatePayment, handlePaymentError
2. gitnexus_context({name: "validatePayment"})
ā Outgoing calls: verifyCard, fetchRates (external API!)
3. READ gitnexus://repo/my-app/process/CheckoutFlow
ā Step 3: validatePayment ā calls fetchRates (external)
4. Root cause: fetchRates calls external API without proper timeout
Install
Add Gitnexus Debugging to your client. Pick the one you use.
npx skills add 2233admin/obsidian-vault-bridgeInstalls every skill in the repository, then prompts for which to keep.
/plugin marketplace add 2233admin/obsidian-vault-bridgeAdds the repository as a plugin marketplace; install individual plugins with `/plugin install`.
git clone https://github.com/2233admin/obsidian-vault-bridge
cp -r .claude/skills/gitnexus/gitnexus-debugging ~/.claude/skills/A skill is a plain directory. Copy it into `.claude/skills/` in a project or in your home directory.
Score
60 / 100
Good