EX

exa-advanced-troubleshooting

Provides diagnostic patterns and diagnostic scripts to isolate and troubleshoot complex Exa API failures.

Install

mkdir -p .claude/skills/exa-advanced-troubleshooting && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8984" && unzip -o skill.zip -d .claude/skills/exa-advanced-troubleshooting && rm skill.zip

Installs to .claude/skills/exa-advanced-troubleshooting

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.

Apply advanced debugging techniques for hard-to-diagnose Exa issues.
68 charsno explicit “when” trigger
Advanced

Key capabilities

  • Perform layer-by-layer diagnostic checks
  • Measure latency across different search types
  • Debug content retrieval failures with multiple configurations
  • Generate support escalation evidence bundles
  • Validate API key and network connectivity

How it works

It executes a series of diagnostic tests across network, authentication, and search layers, outputting a report on latency and success status for each.

Inputs & outputs

You give it
Exa query or URL
You get back
Diagnostic report of performance and connectivity

When to use exa-advanced-troubleshooting

  • Diagnosing latency spikes
  • Isolating network errors
  • Troubleshooting intermittent failures
  • Escalating complex API issues

About this skill

Exa Advanced Troubleshooting

Overview

Deep debugging for complex Exa issues: latency spikes, intermittent failures, result quality degradation, and content retrieval failures. All Exa error responses include a requestId — always capture it.

Instructions

Step 1: Layer-by-Layer Diagnostics

import Exa from "exa-js";

interface DiagnosticResult {
  layer: string;
  success: boolean;
  latencyMs: number;
  details: string;
}

async function diagnoseExa(): Promise<DiagnosticResult[]> {
  const results: DiagnosticResult[] = [];
  const exa = new Exa(process.env.EXA_API_KEY);

  // Layer 1: DNS + Network
  let start = performance.now();
  try {
    const resp = await fetch("https://api.exa.ai", { method: "HEAD" });
    results.push({
      layer: "network",
      success: true,
      latencyMs: performance.now() - start,
      details: `HTTP ${resp.status}`,
    });
  } catch (err: any) {
    results.push({
      layer: "network",
      success: false,
      latencyMs: performance.now() - start,
      details: err.message,
    });
    return results; // No point continuing if network fails
  }

  // Layer 2: Authentication
  start = performance.now();
  try {
    await exa.search("auth test", { numResults: 1 });
    results.push({
      layer: "auth",
      success: true,
      latencyMs: performance.now() - start,
      details: "API key valid",
    });
  } catch (err: any) {
    results.push({
      layer: "auth",
      success: false,
      latencyMs: performance.now() - start,
      details: `${err.status}: ${err.message}`,
    });
    if (err.status === 401 || err.status === 402) return results;
  }

  // Layer 3: Neural search
  start = performance.now();
  try {
    const r = await exa.search("test neural search quality", {
      type: "neural",
      numResults: 3,
    });
    results.push({
      layer: "neural-search",
      success: true,
      latencyMs: performance.now() - start,
      details: `${r.results.length} results, top score: ${r.results[0]?.score.toFixed(3)}`,
    });
  } catch (err: any) {
    results.push({
      layer: "neural-search",
      success: false,
      latencyMs: performance.now() - start,
      details: `${err.status}: ${err.message}`,
    });
  }

  // Layer 4: Content retrieval
  start = performance.now();
  try {
    const r = await exa.searchAndContents("content retrieval test", {
      numResults: 1,
      text: { maxCharacters: 500 },
      highlights: { maxCharacters: 200 },
    });
    const hasText = !!r.results[0]?.text;
    const hasHighlights = !!r.results[0]?.highlights?.length;
    results.push({
      layer: "content-retrieval",
      success: hasText,
      latencyMs: performance.now() - start,
      details: `text: ${hasText}, highlights: ${hasHighlights}`,
    });
  } catch (err: any) {
    results.push({
      layer: "content-retrieval",
      success: false,
      latencyMs: performance.now() - start,
      details: `${err.status}: ${err.message}`,
    });
  }

  // Layer 5: findSimilar
  start = performance.now();
  try {
    const r = await exa.findSimilar("https://nodejs.org", { numResults: 2 });
    results.push({
      layer: "find-similar",
      success: r.results.length > 0,
      latencyMs: performance.now() - start,
      details: `${r.results.length} similar pages found`,
    });
  } catch (err: any) {
    results.push({
      layer: "find-similar",
      success: false,
      latencyMs: performance.now() - start,
      details: `${err.status}: ${err.message}`,
    });
  }

  return results;
}

// Print diagnostic report
const results = await diagnoseExa();
console.log("=== Exa Diagnostic Report ===");
for (const r of results) {
  const icon = r.success ? "PASS" : "FAIL";
  console.log(`[${icon}] ${r.layer}: ${r.latencyMs.toFixed(0)}ms — ${r.details}`);
}

Step 2: Latency Profiling

async function profileLatency(query: string, iterations = 5) {
  const exa = new Exa(process.env.EXA_API_KEY);
  const timings: { type: string; ms: number }[] = [];

  for (const type of ["instant", "fast", "auto", "neural"] as const) {
    for (let i = 0; i < iterations; i++) {
      const start = performance.now();
      try {
        await exa.search(query, { type, numResults: 3 });
        timings.push({ type, ms: performance.now() - start });
      } catch {
        timings.push({ type, ms: -1 }); // -1 indicates failure
      }
    }
  }

  // Summarize
  const grouped = new Map<string, number[]>();
  for (const t of timings) {
    if (!grouped.has(t.type)) grouped.set(t.type, []);
    if (t.ms > 0) grouped.get(t.type)!.push(t.ms);
  }

  console.log(`\nLatency profile for: "${query}"`);
  for (const [type, times] of grouped) {
    const sorted = times.sort((a, b) => a - b);
    const p50 = sorted[Math.floor(sorted.length * 0.5)];
    const p95 = sorted[Math.floor(sorted.length * 0.95)];
    console.log(`  ${type}: p50=${p50?.toFixed(0)}ms, p95=${p95?.toFixed(0)}ms`);
  }
}

Step 3: Content Retrieval Debugging

// When getContents or searchAndContents returns empty text
async function debugContentRetrieval(url: string) {
  const exa = new Exa(process.env.EXA_API_KEY);
  const configs = [
    { name: "default", opts: { text: true } },
    { name: "livecrawl-preferred", opts: { text: true, livecrawl: "preferred" as const, livecrawlTimeout: 15000 } },
    { name: "livecrawl-always", opts: { text: true, livecrawl: "always" as const, livecrawlTimeout: 15000 } },
    { name: "highlights-only", opts: { highlights: { maxCharacters: 500 } } },
    { name: "summary-only", opts: { summary: true } },
  ];

  console.log(`\nContent retrieval debug for: ${url}`);
  for (const { name, opts } of configs) {
    try {
      const result = await exa.getContents([url], opts as any);
      const r = result.results[0];
      console.log(`  ${name}: text=${r?.text?.length || 0} chars, highlights=${r?.highlights?.length || 0}`);
    } catch (err: any) {
      console.log(`  ${name}: ERROR ${err.status} — ${err.message}`);
    }
  }
}

Step 4: Support Escalation Template

## Exa Support Escalation

**Severity:** P[1-4]
**RequestId:** [from error response]
**Timestamp:** [ISO 8601 from error]
**SDK:** exa-js [version from npm list]

### Issue Summary
[One paragraph description]

### Steps to Reproduce
1. Initialize Exa client
2. Call [method] with [parameters]
3. Observe [error/unexpected behavior]

### Expected vs Actual
- Expected: [behavior]
- Actual: [behavior]

### Diagnostic Results
[Output from diagnoseExa() function]

### Evidence
- Latency profile attached
- Content retrieval debug output
- Error response with requestId

Error Handling

IssueCauseSolution
Intermittent 5xxExa transient failureRetry with backoff, capture requestId
Neural search slowComplex/long querySwitch to fast, shorten query
Empty text for valid URLSite blocks crawlingTry livecrawl: "always", use highlights
Score drops across queriesQuery driftCompare with baseline queries
findSimilar returns nothingSeed URL not indexedTry a more popular seed URL

Resources

Next Steps

For load testing, see exa-load-scale.

When not to use it

  • When standard error logs provide sufficient information
  • When the API key is invalid or unauthorized

Prerequisites

Exa API keyNode.js environment

Limitations

  • Requires a valid API key to perform diagnostic searches

How it compares

It provides a structured diagnostic report and latency profile, whereas standard debugging relies on inspecting individual error responses.

Compared to similar skills

exa-advanced-troubleshooting side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
exa-advanced-troubleshooting (this skill)027dCautionAdvanced
linear-debug-bundle127dCautionIntermediate
posthog-common-errors127dCautionIntermediate
mcp-builder1363moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

linear-debug-bundle

jeremylongshore

Comprehensive debugging toolkit for Linear integrations. Use when setting up logging, tracing API calls, or building debug utilities for Linear. Trigger with phrases like "debug linear integration", "linear logging", "trace linear API", "linear debugging tools", "linear troubleshooting".

12

posthog-common-errors

jeremylongshore

Diagnose and fix PostHog common errors and exceptions. Use when encountering PostHog errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "posthog error", "fix posthog", "posthog not working", "debug posthog".

10

mcp-builder

anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

136215

telegram-mini-app

davila7

Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.

62163

stripe-integration

wshobson

Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.

48165

chrome-devtools

mrgoonie

Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.

41157

Search skills

Search the agent skills registry