agentskills.codes
GI

gitnexus-debugging

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

Install

mkdir -p .claude/skills/gitnexus-debugging && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14675" && unzip -o skill.zip -d .claude/skills/gitnexus-debugging && rm skill.zip

Installs to .claude/skills/gitnexus-debugging

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

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\"
176 chars✓ has a “when” trigger

About this skill

Debugging with GitNexus — ChronosFlow

ChronosFlow Debugging Cheat Sheet

MCP server note: gitnexus_query / gitnexus_context require a Claude Code restart after npx gitnexus analyze. Use CLI fallbacks shown below.

Where bugs live in ChronosFlow

Symptom areaSuspect firstHow to trace
Block edit slow / not showingDayDialBlockDelegate, PlannerService, SwipeToDismissBoxWAL mode? optimistic dragPreview hiding? stale dismiss state?
Focus timer brokenFocusService.startNewSession / handleStartCommandPhase split wiring? DayDialFocusNotificationBridge bridge?
Notification wrong / multipleFocusNotificationManager, live notification (id 4201)Focus↔block handoff; chronos_now_live channel
Schedule conflict repair brokenPlannerService.resolveConflicts, ResolveConflictsCommandimmovable filter (locked
Wear "Not synced yet"OnDataChanged Wear listener, WearDataPublisherON_START publish? pull-on-open TYPE_SYNC msg?
Nav sheet not openingsectionTargetGeneration counter, isOneShotSheetRoutegeneration counter re-fires needed for repeats
Medication inaccessibleSensitiveRouteGatecanAuthenticate==false → should fail OPEN
AI not respondingGenAiGateway, ProactiveAssistCache, GenerationProfiledownload failure cooldown? single-flight coalescing?
Calendar sync not importingCalendarSyncWorker.doWork, Sha256Hex deduphash collision? provenance guard?
DataStore value staleChronosPreferencesDataSource.getString/putString150+ flows end here — read the right key
Widget tap deadAgendaGlanceWidget, openSectionActionfilterEquals collision? per-section data URI?

Key delegate architecture (DayDial)

DayDialViewModel splits work across delegates injected at construction:

  • DayDialBlockDelegate — block CRUD, drag, conflict repair
  • DayDialFocusDelegate — focus session lifecycle, phase splits
  • DayDialReviewDelegate — insights, missed-block tracking
  • All delegates call PlannerService for scheduling decisions

When to Use

  • "Why is this function failing?"
  • "Trace where this error comes from"
  • "Who calls this method?"
  • Investigating bugs, errors, or unexpected behavior

Workflow

1. gitnexus_query({query: "<error or symptom>", repo: "ChronosFlow"})
   CLI fallback: npx gitnexus query --repo ChronosFlow "<symptom>"

2. gitnexus_context({name: "<suspect>", repo: "ChronosFlow"})
   CLI fallback: npx gitnexus context --repo ChronosFlow <suspect>

3. npx gitnexus cypher --repo ChronosFlow \
     "MATCH path=(a)-[:CodeRelation {type:'CALLS'}*1..3]->(b {name:'<suspect>'}) \
      RETURN [n IN nodes(path) | n.name] AS chain LIMIT 20"

4. Read source files to confirm root cause

If index is stale → npx gitnexus analyze, restart Claude Code for MCP tools.

Checklist

- [ ] Match symptom to ChronosFlow cheat sheet above
- [ ] gitnexus_context / CLI context on the primary suspect
- [ ] Check incoming calls at d=1 (direct callers are the blast zone)
- [ ] Verify architecture pattern (delegate? use case? worker?)
- [ ] Read source file for the suspect method
- [ ] Check relevant test file for expected behavior

Debugging Patterns in ChronosFlow

PatternWhat to check
Delegate not wiredCheck DayDialViewModel constructor — delegate might not have onInjectBreak or similar called at the right site
DataStore key mismatchChronosPreferencesDataSource — confirm key string matches between read and write sites
Room WAL not enabledSQLCipher requires explicit setJournalMode(WAL) — without it, writes block reads
Nav sheet repeats silently dropsectionTargetGeneration must increment each time to re-fire a one-shot sheet route
Wear tile stalerequestUpdate() in ChronosHabitsTileProvider only fires on data change; check OnDataChanged bridge
Optimistic drag hiding editsdragPreview in DayDialBlockDelegate — move/resize operations hide blocks visually until committed

Tools + CLI Fallbacks

gitnexus_context — see all callers and callees:

MCP:  gitnexus_context({name: "resolveConflicts", repo: "ChronosFlow"})
CLI:  npx gitnexus context --repo ChronosFlow resolveConflicts

gitnexus_cypher — custom call chain trace:

CLI:  npx gitnexus cypher --repo ChronosFlow \
        "MATCH (a)-[:CodeRelation {type:'CALLS'}]->(b {name:'startNewSession'}) \
         RETURN a.name, a.filePath"

ChronosFlow Example: "Focus session completes but notification doesn't clear"

1. Suspect: FocusService.completeAndLogCurrentSession
   npx gitnexus context --repo ChronosFlow FocusService
   → outgoing methods: completeAndLogCurrentSession, updateForegroundNotification, stopTicker

2. Check the notification flow:
   FocusService → updateForegroundNotification → FocusNotificationManager
   → Live notification id 4201; completion should fold into same id (not post new one)
   → Check: is stopForeground() called? Does chronos_now_live channel cancel?

3. Check if focus↔block handoff is broken:
   proc_29: OnDataChanged → FocusState (Wear sync)
   DayDialFocusNotificationBridge bridges service → ViewModel
   → If bridge isn't called, ViewModel state stays "active" and notification persists

4. Read feature/focus/.../FocusService.kt:completeAndLogCurrentSession
   + core/notifications/.../FocusNotificationManager for id management

Search skills

Search the agent skills registry