Skip to content
Back to skills

Bearing Debugging

ASecurity

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\"

  • 6 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 3, 2026
ai-agentsgoexpressdebugginggitapi

Works with

  • api

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add ReidenXerx/bearing --skill bearing-debugging --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bearing Debugging?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bearing Debugging
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/reidenxerx-bearing-debugging/badge)](https://www.skillsdirectory.com/skills/reidenxerx-bearing-debugging)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bearing-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

<!-- BEGIN GENERATED: graph-uncertainty — bearing regenerates this block; edits here are replaced on update -->
## The graph can be wrong

A zero is not absence; a near-0.5 `r.confidence` edge is a lead, not proof (~92% of `USES`); a count
can be a floor — `impact` says which in `epistemic`. Before a conclusion that matters, confirm with a
scoped `Grep` (allowed here, not a gate violation) and say which check you ran.
<!-- END GENERATED: graph-uncertainty -->

Debugging is the case where this bites hardest: "nothing else calls this" is the premise a wrong root
cause is built on.

## Workflow

```
1. query({search_query: "<error or symptom>"})     → related execution flows
2. context({name: "<suspect>"})                    → callers / callees / processes
3. READ gitnexus://repo/{repo}/process/{name}       → the flow, in step order
4. trace({from, to})                               → shortest A→B path, in one call
5. pdg_query({mode: "controls"|"flows"})           → guards / data flow (needs PDG)
```

> Stale index → `npm run bearing:agent-refresh` (always includes `--embeddings`; an index
> without them counts as stale).

## Symptom → approach

| Symptom | Approach |
| --- | --- |
| Error message | `query` the error text → `context` on throw sites |
| Wrong return value | `context` on the function → `pdg_query flows` for the data |
| Intermittent failure | `context` → look for external calls and async deps |
| Recent regression | `detect_changes` — what your own edits affect |

## Worked example — "payment endpoint returns 500 intermittently"

```
1. query({search_query: "payment error handling"})
   → Processes: CheckoutFlow, ErrorHandling
   → Symbols:   validatePayment, handlePaymentError

2. context({name: "validatePayment"})
   → Incoming: processCheckout, webhookHandler
   → Outgoing: verifyCard, fetchRates   ← external API

3. READ gitnexus://repo/my-app/process/CheckoutFlow
   → step 3/7: validatePayment → fetchRates (external)

4. Root cause: fetchRates calls an external API with no timeout.
```

Two things that response tells you and a grep never would: `validatePayment` sits at step 3 of a
named flow, and one of its callees leaves the indexed program. `causes.externalBoundary` counts those
— a non-zero value means calls left the program and this view does not list them, which is the
difference between "nothing else happens here" and "we stopped looking here".

## Custom traces

When the canned tools do not express the question:

```cypher
MATCH (a)-[:CodeRelation {type:'CALLS'}]->(m)-[:CodeRelation {type:'CALLS'}]->(b:Function {name:"validatePayment"})
RETURN a.name AS caller, m.name AS via, b.name AS target
```

A property map does NOT combine with a variable-length hop here — `-[:CodeRelation {type:'CALLS'}*1..2]->`
is a parser error, not a slow query. Spell the hops out, or drop the map and filter in `WHERE`.

`pdg_query` is intra-function and needs the PDG layer; without it you get zero rows, which is not an
answer.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.