agentsclimarketplace

Debug

Skill JunjaK/ai-harness/skills/debug

LSP-driven debugging patterns for TypeScript codebases. Complements the general debugging methodology in the `superpowers:systematic-debugging` skill. Use in Phase 3-4 escalation scenarios or when investigating unexpected behavior.From its SKILL.md

Install
npx -y skills add JunjaK/ai-harness --skill debug

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.5 KB, as published. Nobody here has run it

Debug (LSP Patterns)

This skill covers LSP-accelerated debugging patterns specific to this harness. For the full systematic debugging methodology (reproduce → narrow → hypothesize → test), use the superpowers:systematic-debugging skill.

When to Use This Skill

  • Investigating TypeScript-specific errors (type mismatches, undefined access, stale refactor artifacts)
  • Tracing call paths in unfamiliar code before proposing fixes
  • Verifying refactors did not leave orphaned callers

Workflow (MUST execute in order)

  1. Reproduce — Use the superpowers:systematic-debugging skill for the reproduction step
  2. Locate — Use LSP to find the failing symbol's definition and callers
  3. Inspect types — Use hover to check inferred types against assumptions
  4. Trace call paths — Use incomingCalls / outgoingCalls to map the flow
  5. Propose fix — Minimal, targeted, with file:line reference
  6. Verify — Run the authoritative type-check (project-profile stack.md → "Build & Verify") + project test command; confirm no regression

LSP Investigation Patterns

SymptomFirst LSP operationSecond (if needed)
X is not a functiongoToDefinition on X — is it exported?findReferences — is everyone importing the same symbol?
Cannot read property Y of undefinedhover on the object — what's the inferred type?goToDefinition on the type — does it declare Y?
Type mismatch after refactorfindReferences on the changed typegoToImplementation on interfaces — any implementer missed?
Downstream code broken unexpectedlyincomingCalls on the changed functionCheck each caller manually
Stale cache / wrong datafindReferences on store/query keyConfirm every call site uses the same key
Unfamiliar function signaturehover for signaturedocumentSymbol for neighboring helpers

Structural Traps (load on demand)

When a bug looks like a type-system or dependency-injection failure rather than ordinary logic — a cascading "property does not exist" flood, an intermittent context/i18n/inject crash, or an opaque deserialization error on a bulk request — read resources/ts-structural-traps.md BEFORE rewriting logic. These have non-obvious structural causes (inference cycles, context-scoped singleton init order, deserialization caps) with near-zero-runtime-change fixes; diagnosing them as logic bugs wastes hours.

Root Cause Rules

  • Fix the root cause, not the symptom (duplicate from the superpowers:systematic-debugging skill)
  • After any type-related fix, MUST run the authoritative type-check (project-profile stack.md → "Build & Verify") before declaring the fix complete
  • After any refactor, MUST use findReferences to confirm no orphaned callers

Escalation (when to stop debugging)

  • Cannot reproduce after 3 attempts → request reproduction steps
  • Root cause spans 3+ modules → request architectural review (Phase 1)
  • Fix requires API/backend changes not in plan → escalate to Team Leader
  • Bug is timing-dependent → add logging, do not guess

For non-TypeScript investigation patterns, fall back to the superpowers:systematic-debugging skill.

Keep looking

Skills are one crate of 609,689. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.