[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F8C2HN053NHR62AD1Z5PP9":3,"skill-same:01M6F8C2HN053NHR62AD1Z5PP9":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":6,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6F8C2HN053NHR62AD1Z5PP9","openevidence-debug-bundle",null,"Generate comprehensive debug information for OpenEvidence integration issues.\nUse when troubleshooting complex problems, preparing support tickets,\nor conducting post-incident analysis.\nTrigger with phrases like \"openevidence debug\", \"openevidence troubleshoot\",\n\"openevidence support bundle\", \"diagnose openevidence\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fopenevidence-pack\u002Fskills\u002Fopenevidence-debug-bundle\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"debug","openevidence debug bundle","bundle","use","when","for","with","information","post","trigger","io","incident","support","read","curl","node","Bash","analysis","issues","generate","diagnose","troubleshoot","2026-11-10 10:12:30",false,"---\nname: openevidence-debug-bundle\ndescription: |\n  Generate comprehensive debug information for OpenEvidence integration issues.\n  Use when troubleshooting complex problems, preparing support tickets,\n  or conducting post-incident analysis.\n  Trigger with phrases like \"openevidence debug\", \"openevidence troubleshoot\",\n  \"openevidence support bundle\", \"diagnose openevidence\".\nallowed-tools: Read, Grep, Bash(curl:*), Bash(npm:*), Bash(node:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# OpenEvidence Debug Bundle\n\n## Overview\nGenerate comprehensive diagnostic information for troubleshooting OpenEvidence integration issues without exposing PHI.\n\n## Prerequisites\n- OpenEvidence SDK installed\n- Access to application logs\n- Command-line access\n- curl installed\n\n## Instructions\n\n### Step 1: Environment Check Script\n```bash\n#!\u002Fbin\u002Fbash\n# scripts\u002Fopenevidence-debug.sh\n\necho \"=== OpenEvidence Debug Bundle ===\"\necho \"Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\necho \"\"\n\n# 1. Environment Variables (masked)\necho \"=== Environment Configuration ===\"\necho \"OPENEVIDENCE_API_KEY: ${OPENEVIDENCE_API_KEY:+[SET - ${#OPENEVIDENCE_API_KEY} chars]}\"\necho \"OPENEVIDENCE_ORG_ID: ${OPENEVIDENCE_ORG_ID:+[SET - ${#OPENEVIDENCE_ORG_ID} chars]}\"\necho \"OPENEVIDENCE_BASE_URL: ${OPENEVIDENCE_BASE_URL:-https:\u002F\u002Fapi.openevidence.com}\"\necho \"OPENEVIDENCE_TIMEOUT: ${OPENEVIDENCE_TIMEOUT:-30000}ms\"\necho \"NODE_ENV: ${NODE_ENV:-not set}\"\necho \"\"\n\n# 2. SDK Version\necho \"=== SDK Version ===\"\nnpm list @openevidence\u002Fsdk 2>\u002Fdev\u002Fnull || pip show openevidence 2>\u002Fdev\u002Fnull || echo \"SDK not found\"\necho \"\"\n\n# 3. Node\u002FPython Version\necho \"=== Runtime Version ===\"\nnode --version 2>\u002Fdev\u002Fnull || echo \"Node.js not found\"\npython3 --version 2>\u002Fdev\u002Fnull || echo \"Python not found\"\necho \"\"\n\n# 4. Connectivity Test\necho \"=== Connectivity Test ===\"\nHEALTH_STATUS=$(curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  -H \"Authorization: Bearer ${OPENEVIDENCE_API_KEY}\" \\\n  \"${OPENEVIDENCE_BASE_URL:-https:\u002F\u002Fapi.openevidence.com}\u002Fhealth\" 2>\u002Fdev\u002Fnull)\necho \"Health endpoint: HTTP ${HEALTH_STATUS}\"\n\nDNS_CHECK=$(dig +short api.openevidence.com 2>\u002Fdev\u002Fnull || echo \"DNS lookup failed\")\necho \"DNS resolution: ${DNS_CHECK}\"\necho \"\"\n\n# 5. TLS Check\necho \"=== TLS Configuration ===\"\nopenssl s_client -connect api.openevidence.com:443 -brief 2>\u002Fdev\u002Fnull | head -5 || echo \"TLS check failed\"\necho \"\"\n\n# 6. Rate Limit Status\necho \"=== Rate Limit Status ===\"\ncurl -s -D - \\\n  -H \"Authorization: Bearer ${OPENEVIDENCE_API_KEY}\" \\\n  \"${OPENEVIDENCE_BASE_URL:-https:\u002F\u002Fapi.openevidence.com}\u002Fv1\u002Frate-limit\" 2>\u002Fdev\u002Fnull \\\n  | grep -i \"x-ratelimit\" || echo \"Could not retrieve rate limit headers\"\necho \"\"\n\necho \"=== Debug Bundle Complete ===\"\n```\n\n### Step 2: Programmatic Debug Collection\n```typescript\n\u002F\u002F src\u002Fdebug\u002Fdebug-bundle.ts\nimport { OpenEvidenceClient } from '@openevidence\u002Fsdk';\nimport { execSync } from 'child_process';\n\ninterface DebugBundle {\n  timestamp: string;\n  environment: EnvironmentInfo;\n  connectivity: ConnectivityInfo;\n  sdkInfo: SDKInfo;\n  recentErrors: ErrorSummary[];\n  metrics: MetricsSummary;\n}\n\ninterface EnvironmentInfo {\n  nodeVersion: string;\n  sdkVersion: string;\n  apiKeySet: boolean;\n  apiKeyLength: number;\n  orgIdSet: boolean;\n  baseUrl: string;\n  timeout: number;\n}\n\ninterface ConnectivityInfo {\n  healthStatus: number | null;\n  latencyMs: number | null;\n  dnsResolution: boolean;\n  tlsVersion: string | null;\n}\n\ninterface SDKInfo {\n  version: string;\n  features: string[];\n}\n\ninterface ErrorSummary {\n  code: string;\n  count: number;\n  lastOccurred: string;\n}\n\ninterface MetricsSummary {\n  totalRequests: number;\n  successRate: number;\n  avgLatencyMs: number;\n  p99LatencyMs: number;\n}\n\nexport async function generateDebugBundle(): Promise\u003CDebugBundle> {\n  const timestamp = new Date().toISOString();\n\n  \u002F\u002F Gather environment info\n  const environment = gatherEnvironmentInfo();\n\n  \u002F\u002F Test connectivity\n  const connectivity = await testConnectivity();\n\n  \u002F\u002F Get SDK info\n  const sdkInfo = getSDKInfo();\n\n  \u002F\u002F Summarize recent errors (from in-memory store or logs)\n  const recentErrors = await summarizeRecentErrors();\n\n  \u002F\u002F Gather metrics\n  const metrics = await gatherMetrics();\n\n  return {\n    timestamp,\n    environment,\n    connectivity,\n    sdkInfo,\n    recentErrors,\n    metrics,\n  };\n}\n\nfunction gatherEnvironmentInfo(): EnvironmentInfo {\n  return {\n    nodeVersion: process.version,\n    sdkVersion: getPackageVersion('@openevidence\u002Fsdk'),\n    apiKeySet: !!process.env.OPENEVIDENCE_API_KEY,\n    apiKeyLength: process.env.OPENEVIDENCE_API_KEY?.length || 0,\n    orgIdSet: !!process.env.OPENEVIDENCE_ORG_ID,\n    baseUrl: process.env.OPENEVIDENCE_BASE_URL || 'https:\u002F\u002Fapi.openevidence.com',\n    timeout: parseInt(process.env.OPENEVIDENCE_TIMEOUT || '30000'),\n  };\n}\n\nasync function testConnectivity(): Promise\u003CConnectivityInfo> {\n  const baseUrl = process.env.OPENEVIDENCE_BASE_URL || 'https:\u002F\u002Fapi.openevidence.com';\n  const startTime = Date.now();\n\n  try {\n    const response = await fetch(`${baseUrl}\u002Fhealth`, {\n      headers: { Authorization: `Bearer ${process.env.OPENEVIDENCE_API_KEY}` },\n    });\n\n    return {\n      healthStatus: response.status,\n      latencyMs: Date.now() - startTime,\n      dnsResolution: true,\n      tlsVersion: 'TLS 1.2+', \u002F\u002F Inferred from successful HTTPS\n    };\n  } catch (error: any) {\n    return {\n      healthStatus: null,\n      latencyMs: null,\n      dnsResolution: error.code !== 'ENOTFOUND',\n      tlsVersion: null,\n    };\n  }\n}\n\nfunction getSDKInfo(): SDKInfo {\n  return {\n    version: getPackageVersion('@openevidence\u002Fsdk'),\n    features: ['clinical-query', 'deep-consult', 'webhooks'],\n  };\n}\n\nfunction getPackageVersion(pkg: string): string {\n  try {\n    const result = execSync(`npm list ${pkg} --json 2>\u002Fdev\u002Fnull`, { encoding: 'utf8' });\n    const json = JSON.parse(result);\n    return json.dependencies?.[pkg]?.version || 'unknown';\n  } catch {\n    return 'unknown';\n  }\n}\n\nasync function summarizeRecentErrors(): Promise\u003CErrorSummary[]> {\n  \u002F\u002F This would typically pull from your error tracking system\n  \u002F\u002F Placeholder implementation\n  return [];\n}\n\nasync function gatherMetrics(): Promise\u003CMetricsSummary> {\n  \u002F\u002F This would typically pull from your metrics system\n  \u002F\u002F Placeholder implementation\n  return {\n    totalRequests: 0,\n    successRate: 0,\n    avgLatencyMs: 0,\n    p99LatencyMs: 0,\n  };\n}\n```\n\n### Step 3: Sanitized Log Extraction\n```typescript\n\u002F\u002F src\u002Fdebug\u002Flog-sanitizer.ts\n\u002F\u002F IMPORTANT: Removes PHI before including in debug bundle\n\nconst PHI_PATTERNS = [\n  \u002F\\b\\d{3}-\\d{2}-\\d{4}\\b\u002Fg,           \u002F\u002F SSN\n  \u002F\\b[A-Z]\\d{8}\\b\u002Fgi,                  \u002F\u002F MRN patterns\n  \u002F\\b\\d{10,}\\b\u002Fg,                      \u002F\u002F Long numbers (potential IDs)\n  \u002Fpatient[_\\s]*(name|id|dob)\u002Fgi,      \u002F\u002F Patient fields\n  \u002F\\b(male|female),?\\s*\\d{1,3}\u002Fgi,    \u002F\u002F Demographics\n  \u002F\"name\"\\s*:\\s*\"[^\"]+\"\u002Fgi,           \u002F\u002F Name fields in JSON\n  \u002F\"dob\"\\s*:\\s*\"[^\"]+\"\u002Fgi,            \u002F\u002F DOB fields\n  \u002F\"mrn\"\\s*:\\s*\"[^\"]+\"\u002Fgi,            \u002F\u002F MRN fields\n];\n\nexport function sanitizeLogs(logs: string): string {\n  let sanitized = logs;\n\n  for (const pattern of PHI_PATTERNS) {\n    sanitized = sanitized.replace(pattern, '[REDACTED]');\n  }\n\n  return sanitized;\n}\n\nexport function extractSanitizedLogs(\n  logSource: string,\n  timeRange: { start: Date; end: Date },\n  maxLines: number = 1000\n): string[] {\n  \u002F\u002F Implementation depends on your logging infrastructure\n  \u002F\u002F Example with file-based logs:\n\n  const logs: string[] = [];\n  \u002F\u002F Read logs, filter by time range, sanitize each line\n  \u002F\u002F ...\n\n  return logs.map(sanitizeLogs).slice(0, maxLines);\n}\n```\n\n### Step 4: Support Ticket Generator\n```typescript\n\u002F\u002F src\u002Fdebug\u002Fsupport-ticket.ts\nimport { generateDebugBundle, DebugBundle } from '.\u002Fdebug-bundle';\nimport { sanitizeLogs, extractSanitizedLogs } from '.\u002Flog-sanitizer';\n\ninterface SupportTicket {\n  subject: string;\n  description: string;\n  debugBundle: DebugBundle;\n  sanitizedLogs: string[];\n  stepsToReproduce: string[];\n  expectedBehavior: string;\n  actualBehavior: string;\n}\n\nexport async function generateSupportTicket(\n  issue: {\n    summary: string;\n    stepsToReproduce: string[];\n    expectedBehavior: string;\n    actualBehavior: string;\n  }\n): Promise\u003CSupportTicket> {\n  const bundle = await generateDebugBundle();\n\n  const logs = extractSanitizedLogs(\n    '\u002Fvar\u002Flog\u002Fapp\u002Fopenevidence.log',\n    { start: new Date(Date.now() - 3600000), end: new Date() },\n    500\n  );\n\n  return {\n    subject: `[OpenEvidence Integration] ${issue.summary}`,\n    description: `\n## Issue Summary\n${issue.summary}\n\n## Environment\n- Node Version: ${bundle.environment.nodeVersion}\n- SDK Version: ${bundle.environment.sdkVersion}\n- Base URL: ${bundle.environment.baseUrl}\n- Timeout: ${bundle.environment.timeout}ms\n\n## Connectivity\n- Health Status: ${bundle.connectivity.healthStatus || 'Failed'}\n- Latency: ${bundle.connectivity.latencyMs || 'N\u002FA'}ms\n- DNS Resolution: ${bundle.connectivity.dnsResolution ? 'OK' : 'Failed'}\n\n## Recent Errors\n${bundle.recentErrors.map(e => `- ${e.code}: ${e.count} occurrences (last: ${e.lastOccurred})`).join('\\n') || 'None recorded'}\n`,\n    debugBundle: bundle,\n    sanitizedLogs: logs,\n    stepsToReproduce: issue.stepsToReproduce,\n    expectedBehavior: issue.expectedBehavior,\n    actualBehavior: issue.actualBehavior,\n  };\n}\n```\n\n## Output\n- Environment configuration status\n- Connectivity test results\n- SDK version information\n- Sanitized logs (no PHI)\n- Formatted support ticket\n\n## Diagnostic Checklist\n- [ ] API key is set and correct length\n- [ ] Organization ID is configured\n- [ ] Health endpoint returns 200\n- [ ] DNS resolves api.openevidence.com\n- [ ] TLS handshake succeeds\n- [ ] Rate limits have headroom\n- [ ] No recent 5xx errors\n\n## Error Handling\n| Issue | Check | Resolution |\n|-------|-------|------------|\n| No connectivity | DNS, firewall | Check network config |\n| Auth failures | API key format | Regenerate key in dashboard |\n| Timeouts | Latency test | Increase timeout, check network |\n| PHI in logs | Log sanitizer | Audit logging configuration |\n\n## Examples\n\n### Quick Debug Command\n```bash\n# Run bash debug script\nchmod +x scripts\u002Fopenevidence-debug.sh\n.\u002Fscripts\u002Fopenevidence-debug.sh > debug-bundle.txt\n```\n\n### Generate Support Ticket\n```typescript\nconst ticket = await generateSupportTicket({\n  summary: 'Clinical queries timing out after SDK upgrade',\n  stepsToReproduce: [\n    '1. Upgrade @openevidence\u002Fsdk to v2.0.0',\n    '2. Make clinical query request',\n    '3. Request times out after 30s',\n  ],\n  expectedBehavior: 'Response within 10s',\n  actualBehavior: 'Timeout after configured limit',\n});\n\nconsole.log(JSON.stringify(ticket, null, 2));\n```\n\n## Resources\n- [OpenEvidence Support](mailto:support@openevidence.com)\n- [OpenEvidence Status](https:\u002F\u002Fstatus.openevidence.com\u002F)\n\n## Next Steps\nFor rate limit management, see `openevidence-rate-limits`.\n","# OpenEvidence Debug Bundle\n\n## Overview\nGenerate comprehensive diagnostic information for troubleshooting OpenEvidence integration issues without exposing PHI.\n\n## Prerequisites\n- OpenEvidence SDK installed\n- Access to application logs\n- Command-line access\n- curl installed\n\n## Instructions\n\n### Step 1: Environment Check Script\n```bash\n#!\u002Fbin\u002Fbash\n# scripts\u002Fopenevidence-debug.sh\n\necho \"=== OpenEvidence Debug Bundle ===\"\necho \"Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\necho \"\"\n\n# 1. Environment Variables (masked)\necho \"=== Environment Configuration ===\"\necho \"OPENEVIDENCE_API_KEY: ${OPENEVIDENCE_API_KEY:+[SET - ${#OPENEVIDENCE_API_KEY} chars]}\"\necho \"OPENEVIDENCE_ORG_ID: ${OPENEVIDENCE_ORG_ID:+[SET - ${#OPENEVIDENCE_ORG_ID} chars]}\"\necho \"OPENEVIDENCE_BASE_URL: ${OPENEVIDENCE_BASE_URL:-https:\u002F\u002Fapi.openevidence.com}\"\necho \"OPENEVIDENCE_TIMEOUT: ${OPENEVIDENCE_TIMEOUT:-30000}ms\"\necho \"NODE_ENV: ${NODE_ENV:-not set}\"\necho \"\"\n\n# 2. SDK Version\necho \"=== SDK Version ===\"\nnpm list @openevidence\u002Fsdk 2>\u002Fdev\u002Fnull || pip show openevidence 2>\u002Fdev\u002Fnull || echo \"SDK not found\"\necho \"\"\n\n# 3. Node\u002FPython Version\necho \"=== Runtime Version ===\"\nnode --version 2>\u002Fdev\u002Fnull || echo \"Node.js not found\"\npython3 --version 2>\u002Fdev\u002Fnull || echo \"Python not found\"\necho \"\"\n\n# 4. Connectivity Test\necho \"=== Connectivity Test ===\"\nHEALTH_STATUS=$(curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n  -H \"Authorization: Bearer ${OPENEVIDENCE_API_KEY}\" \\\n  \"${OPENEVIDENCE_BASE_URL:-https:\u002F\u002Fapi.openevidence.com}\u002Fhealth\" 2>\u002Fdev\u002Fnull)\necho \"Health endpoint: HTTP ${HEALTH_STATUS}\"\n\nDNS_CHECK=$(dig +short api.openevidence.com 2>\u002Fdev\u002Fnull || echo \"DNS lookup failed\")\necho \"DNS resolution: ${DNS_CHECK}\"\necho \"\"\n\n# 5. TLS Check\necho \"=== TLS Configuration ===\"\nopenssl s_client -connect api.openevidence.com:443 -brief 2>\u002Fdev\u002Fnull | head -5 || echo \"TLS check failed\"\necho \"\"\n\n# 6. Rate Limit Status\necho \"=== Rate Limit Status ===\"\ncurl -s -D - \\\n  -H \"Authorization: Bearer ${OPENEVIDENCE_API_KEY}\" \\\n  \"${OPENEVIDENCE_BASE_URL:-https:\u002F\u002Fapi.openevidence.com}\u002Fv1\u002Frate-limit\" 2>\u002Fdev\u002Fnull \\\n  | grep -i \"x-ratelimit\" || echo \"Could not retrieve rate limit headers\"\necho \"\"\n\necho \"=== Debug Bundle Complete ===\"\n```\n\n### Step 2: Programmatic Debug Collection\n```typescript\n\u002F\u002F src\u002Fdebug\u002Fdebug-bundle.ts\nimport { OpenEvidenceClient } from '@openevidence\u002Fsdk';\nimport { execSync } from 'child_process';\n\ninterface DebugBundle {\n  timestamp: string;\n  environment: EnvironmentInfo;\n  connectivity: ConnectivityInfo;\n  sdkInfo: SDKInfo;\n  recentErrors: ErrorSummary[];\n  metrics: MetricsSummary;\n}\n\ninterface EnvironmentInfo {\n  nodeVersion: string;\n  sdkVersion: string;\n  apiKeySet: boolean;\n  apiKeyLength: number;\n  orgIdSet: boolean;\n  baseUrl: string;\n  timeout: number;\n}\n\ninterface ConnectivityInfo {\n  healthStatus: number | null;\n  latencyMs: number | null;\n  dnsResolution: boolean;\n  tlsVersion: string | null;\n}\n\ninterface SDKInfo {\n  version: string;\n  features: string[];\n}\n\ninterface ErrorSummary {\n  code: string;\n  count: number;\n  lastOccurred: string;\n}\n\ninterface MetricsSummary {\n  totalRequests: number;\n  successRate: number;\n  avgLatencyMs: number;\n  p99LatencyMs: number;\n}\n\nexport async function generateDebugBundle(): Promise\u003CDebugBundle> {\n  const timestamp = new Date().toISOString();\n\n  \u002F\u002F Gather environment info\n  const environment = gatherEnvironmentInfo();\n\n  \u002F\u002F Test connectivity\n  const connectivity = await testConnectivity();\n\n  \u002F\u002F Get SDK info\n  const sdkInfo = getSDKInfo();\n\n  \u002F\u002F Summarize recent errors (from in-memory store or logs)\n  const recentErrors = await summarizeRecentErrors();\n\n  \u002F\u002F Gather metrics\n  const metrics = await gatherMetrics();\n\n  return {\n    timestamp,\n    environment,\n    connectivity,\n    sdkInfo,\n    recentErrors,\n    metrics,\n  };\n}\n\nfunction gatherEnvironmentInfo(): EnvironmentInfo {\n  return {\n    nodeVersion: process.version,\n    sdkVersion: getPackageVersion('@openevidence\u002Fsdk'),\n    apiKeySet: !!process.env.OPENEVIDENCE_API_KEY,\n    apiKeyLength: process.env.OPENEVIDENCE_API_KEY?.length || 0,\n    orgIdSet: !!process.env.OPENEVIDENCE_ORG_ID,\n    baseUrl: process.env.OPENEVIDENCE_BASE_URL || 'https:\u002F\u002Fapi.openevidence.com',\n    timeout: parseInt(process.env.OPENEVIDENCE_TIMEOUT || '30000'),\n  };\n}\n\nasync function testConnectivity(): Promise\u003CConnectivityInfo> {\n  const baseUrl = process.env.OPENEVIDENCE_BASE_URL || 'https:\u002F\u002Fapi.openevidence.com';\n  const startTime = Date.now();\n\n  try {\n    const response = await fetch(`${baseUrl}\u002Fhealth`, {\n      headers: { Authorization: `Bearer ${process.env.OPENEVIDENCE_API_KEY}` },\n    });\n\n    return {\n      healthStatus: response.status,\n      latencyMs: Date.now() - startTime,\n      dnsResolution: true,\n      tlsVersion: 'TLS 1.2+', \u002F\u002F Inferred from successful HTTPS\n    };\n  } catch (error: any) {\n    return {\n      healthStatus: null,\n      latencyMs: null,\n      dnsResolution: error.code !== 'ENOTFOUND',\n      tlsVersion: null,\n    };\n  }\n}\n\nfunction getSDKInfo(): SDKInfo {\n  return {\n    version: getPackageVersion('@openevidence\u002Fsdk'),\n    features: ['clinical-query', 'deep-consult', 'webhooks'],\n  };\n}\n\nfunction getPackageVersion(pkg: string): string {\n  try {\n    const result = execSync(`npm list ${pkg} --json 2>\u002Fdev\u002Fnull`, { encoding: 'utf8' });\n    const json = JSON.parse(result);\n    return json.dependencies?.[pkg]?.version || 'unknown';\n  } catch {\n    return 'unknown';\n  }\n}\n\nasync function summarizeRecentErrors(): Promise\u003CErrorSummary[]> {\n  \u002F\u002F This would typically pull from your error tracking system\n  \u002F\u002F Placeholder implementation\n  return [];\n}\n\nasync function gatherMetrics(): Promise\u003CMetricsSummary> {\n  \u002F\u002F This would typically pull from your metrics system\n  \u002F\u002F Placeholder implementation\n  return {\n    totalRequests: 0,\n    successRate: 0,\n    avgLatencyMs: 0,\n    p99LatencyMs: 0,\n  };\n}\n```\n\n### Step 3: Sanitized Log Extraction\n```typescript\n\u002F\u002F src\u002Fdebug\u002Flog-sanitizer.ts\n\u002F\u002F IMPORTANT: Removes PHI before including in debug bundle\n\nconst PHI_PATTERNS = [\n  \u002F\\b\\d{3}-\\d{2}-\\d{4}\\b\u002Fg,           \u002F\u002F SSN\n  \u002F\\b[A-Z]\\d{8}\\b\u002Fgi,                  \u002F\u002F MRN patterns\n  \u002F\\b\\d{10,}\\b\u002Fg,                      \u002F\u002F Long numbers (potential IDs)\n  \u002Fpatient[_\\s]*(name|id|dob)\u002Fgi,      \u002F\u002F Patient fields\n  \u002F\\b(male|female),?\\s*\\d{1,3}\u002Fgi,    \u002F\u002F Demographics\n  \u002F\"name\"\\s*:\\s*\"[^\"]+\"\u002Fgi,           \u002F\u002F Name fields in JSON\n  \u002F\"dob\"\\s*:\\s*\"[^\"]+\"\u002Fgi,            \u002F\u002F DOB fields\n  \u002F\"mrn\"\\s*:\\s*\"[^\"]+\"\u002Fgi,            \u002F\u002F MRN fields\n];\n\nexport function sanitizeLogs(logs: string): string {\n  let sanitized = logs;\n\n  for (const pattern of PHI_PATTERNS) {\n    sanitized = sanitized.replace(pattern, '[REDACTED]');\n  }\n\n  return sanitized;\n}\n\nexport function extractSanitizedLogs(\n  logSource: string,\n  timeRange: { start: Date; end: Date },\n  maxLines: number = 1000\n): string[] {\n  \u002F\u002F Implementation depends on your logging infrastructure\n  \u002F\u002F Example with file-based logs:\n\n  const logs: string[] = [];\n  \u002F\u002F Read logs, filter by time range, sanitize each line\n  \u002F\u002F ...\n\n  return logs.map(sanitizeLogs).slice(0, maxLines);\n}\n```\n\n### Step 4: Support Ticket Generator\n```typescript\n\u002F\u002F src\u002Fdebug\u002Fsupport-ticket.ts\nimport { generateDebugBundle, DebugBundle } from '.\u002Fdebug-bundle';\nimport { sanitizeLogs, extractSanitizedLogs } from '.\u002Flog-sanitizer';\n\ninterface SupportTicket {\n  subject: string;\n  description: string;\n  debugBundle: DebugBundle;\n  sanitizedLogs: string[];\n  stepsToReproduce: string[];\n  expectedBehavior: string;\n  actualBehavior: string;\n}\n\nexport async function generateSupportTicket(\n  issue: {\n    summary: string;\n    stepsToReproduce: string[];\n    expectedBehavior: string;\n    actualBehavior: string;\n  }\n): Promise\u003CSupportTicket> {\n  const bundle = await generateDebugBundle();\n\n  const logs = extractSanitizedLogs(\n    '\u002Fvar\u002Flog\u002Fapp\u002Fopenevidence.log',\n    { start: new Date(Date.now() - 3600000), end: new Date() },\n    500\n  );\n\n  return {\n    subject: `[OpenEvidence Integration] ${issue.summary}`,\n    description: `\n## Issue Summary\n${issue.summary}\n\n## Environment\n- Node Version: ${bundle.environment.nodeVersion}\n- SDK Version: ${bundle.environment.sdkVersion}\n- Base URL: ${bundle.environment.baseUrl}\n- Timeout: ${bundle.environment.timeout}ms\n\n## Connectivity\n- Health Status: ${bundle.connectivity.healthStatus || 'Failed'}\n- Latency: ${bundle.connectivity.latencyMs || 'N\u002FA'}ms\n- DNS Resolution: ${bundle.connectivity.dnsResolution ? 'OK' : 'Failed'}\n\n## Recent Errors\n${bundle.recentErrors.map(e => `- ${e.code}: ${e.count} occurrences (last: ${e.lastOccurred})`).join('\\n') || 'None recorded'}\n`,\n    debugBundle: bundle,\n    sanitizedLogs: logs,\n    stepsToReproduce: issue.stepsToReproduce,\n    expectedBehavior: issue.expectedBehavior,\n    actualBehavior: issue.actualBehavior,\n  };\n}\n```\n\n## Output\n- Environment configuration status\n- Connectivity test results\n- SDK version information\n- Sanitized logs (no PHI)\n- Formatted support ticket\n\n## Diagnostic Checklist\n- [ ] API key is set and correct length\n- [ ] Organization ID is configured\n- [ ] Health endpoint returns 200\n- [ ] DNS resolves api.openevidence.com\n- [ ] TLS handshake succeeds\n- [ ] Rate limits have headroom\n- [ ] No recent 5xx errors\n\n## Error Handling\n| Issue | Check | Resolution |\n|-------|-------|------------|\n| No connectivity | DNS, firewall | Check network config |\n| Auth failures | API key format | Regenerate key in dashboard |\n| Timeouts | Latency test | Increase timeout, check network |\n| PHI in logs | Log sanitizer | Audit logging configuration |\n\n## Examples\n\n### Quick Debug Command\n```bash\n# Run bash debug script\nchmod +x scripts\u002Fopenevidence-debug.sh\n.\u002Fscripts\u002Fopenevidence-debug.sh > debug-bundle.txt\n```\n\n### Generate Support Ticket\n```typescript\nconst ticket = await generateSupportTicket({\n  summary: 'Clinical queries timing out after SDK upgrade',\n  stepsToReproduce: [\n    '1. Upgrade @openevidence\u002Fsdk to v2.0.0',\n    '2. Make clinical query request',\n    '3. Request times out after 30s',\n  ],\n  expectedBehavior: 'Response within 10s',\n  actualBehavior: 'Timeout after configured limit',\n});\n\nconsole.log(JSON.stringify(ticket, null, 2));\n```\n\n## Resources\n- [OpenEvidence Support](mailto:support@openevidence.com)\n- [OpenEvidence Status](https:\u002F\u002Fstatus.openevidence.com\u002F)\n\n## Next Steps\nFor rate limit management, see `openevidence-rate-limits`.\n",{"name":5,"author":51,"license":15,"version":52,"description":53,"allowed-tools":54},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Generate comprehensive debug information for OpenEvidence integration issues.\nUse when troubleshooting complex problems, preparing support tickets,\nor conducting post-incident analysis.\nTrigger with phrases like \"openevidence debug\", \"openevidence troubleshoot\",\n\"openevidence support bundle\", \"diagnose openevidence\".\n","Read, Grep, Bash(curl:*), Bash(npm:*), Bash(node:*)","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fopenevidence-pack\u002Fskills\u002Fopenevidence-debug-bundle",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill openevidence-debug-bundle",{"tool":70,"command":71},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill openevidence-debug-bundle",{"tool":73,"command":74},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill openevidence-debug-bundle","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fopenevidence-pack\u002Fskills\u002Fopenevidence-debug-bundle\u002FSKILL.md",true,[],[79,111,145,168,193,220],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":84,"sourceHtmlUrl":85,"categories":86,"keywords":92,"publishedAt":110},"01M6FCR7G5A005P364Z6ZWCJDP","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FSKILL.md",[87],{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",[93,94,95,96,97,43,98,99,100,101,102,103,104,105,106,107,30,108,109],"theme factory","factory","theme","docs","toolkit","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","you","fonts","2026-11-11 15:11:14",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":121,"publishedAt":46},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000009","前端开发",[122,123,98,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,27,103,139,140,141,142,29,143,144],"web artifacts builder","web","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tools","Tailwind","single-file","simple","ui components","multi","jsx","suite",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":149,"sourceHtmlUrl":150,"categories":151,"keywords":156,"publishedAt":46},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[152,155],{"categoryNo":153,"categoryName":154,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":119,"categoryName":120,"taxonomyType":90,"taxonomyTypeDesc":91},[157,158,159,126,160,161,123,162,97,163,136,164,165,166,167,30,29],"testing","webapp testing","webapp","screenshots","playwright","debugging","browser","logs","applications","behavior","local",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":172,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":46},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[41,176,177,178,179,180,181,182,27,183,184,185,186,187,188,189,30,190,191,192,29,28],"neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":194,"name":195,"nameZh":6,"description":196,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":197,"sourceHtmlUrl":198,"categories":199,"keywords":203,"publishedAt":46},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[200],{"categoryNo":201,"categoryName":202,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000023","Skill与智能体开发",[204,205,206,207,208,209,210,211,212,213,214,215,216,217,30,29,218,28,219],"skill creator","creator","workflows","create","update","capabilities","knowledge","tool","integrations","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":221,"name":222,"nameZh":6,"description":223,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":224,"sourceHtmlUrl":225,"categories":226,"keywords":228,"publishedAt":46},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[227],{"categoryNo":201,"categoryName":202,"taxonomyType":90,"taxonomyTypeDesc":91},[222,229,230,231,232,233,234,163,235,236,27,237,238,239,240,29,241],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source"]