[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FAAXHDXK4NBKGTT577B10M":3,"skill-same:01M6FAAXHDXK4NBKGTT577B10M":75},{"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":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":57,"ownerHtmlUrl":58,"ownerBlogUrl":6,"ownerDescription":59,"updatedAt":60,"install":61,"resources":74},"01M6FAAXHDXK4NBKGTT577B10M","exa-cost-tuning",null,"Optimize Exa costs through search type selection, caching, and usage monitoring.\nUse when analyzing Exa billing, reducing API costs,\nor implementing budget controls and usage alerts.\nTrigger with phrases like \"exa cost\", \"exa billing\",\n\"reduce exa costs\", \"exa pricing\", \"exa expensive\", \"exa budget\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fexa-cost-tuning\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"exa cost tuning","tuning","exa","cost","read","billing","io","alerts","caching","optimize","selection","openclaw","node","Bash","api","Budget","analyzing","monitoring","search","code","2026-11-10 10:12:30",false,"---\nname: exa-cost-tuning\ndescription: |\n  Optimize Exa costs through search type selection, caching, and usage monitoring.\n  Use when analyzing Exa billing, reducing API costs,\n  or implementing budget controls and usage alerts.\n  Trigger with phrases like \"exa cost\", \"exa billing\",\n  \"reduce exa costs\", \"exa pricing\", \"exa expensive\", \"exa budget\".\nallowed-tools: Read, Grep, Bash(curl:*), Bash(node:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\ntags: [saas, exa, api, cost-optimization]\n\n---\n# Exa Cost Tuning\n\n## Overview\nReduce Exa API costs through strategic search type selection, result caching, query deduplication, and usage monitoring. Exa charges per search request with costs varying by search type and content retrieval options.\n\n## Cost Drivers\n\n| Factor | Higher Cost | Lower Cost |\n|--------|-------------|------------|\n| Search type | `deep-reasoning` > `deep` > `neural` | `keyword` \u003C `fast` \u003C `instant` |\n| numResults | 10-100 results | 3-5 results |\n| Content retrieval | Full text + highlights + summary | Metadata only (no content) |\n| Content length | `maxCharacters: 5000` | `maxCharacters: 500` |\n| Live crawling | `livecrawl: \"always\"` | Cached content (default) |\n\n## Instructions\n\n### Step 1: Match Search Config to Use Case\n```typescript\nimport Exa from \"exa-js\";\n\nconst exa = new Exa(process.env.EXA_API_KEY);\n\n\u002F\u002F Define cost tiers per use case\nconst SEARCH_PROFILES = {\n  \u002F\u002F Cheapest: metadata-only keyword search\n  \"autocomplete\": { type: \"instant\" as const, numResults: 3 },\n\n  \u002F\u002F Low cost: fast search with minimal content\n  \"quick-lookup\": { type: \"fast\" as const, numResults: 3 },\n\n  \u002F\u002F Medium: balanced search for RAG\n  \"rag-context\": {\n    type: \"auto\" as const,\n    numResults: 5,\n    text: { maxCharacters: 1000 },\n  },\n\n  \u002F\u002F Higher cost: deep research\n  \"deep-research\": {\n    type: \"neural\" as const,\n    numResults: 10,\n    text: { maxCharacters: 3000 },\n    highlights: { maxCharacters: 500 },\n  },\n};\n\nasync function costAwareSearch(\n  query: string,\n  profile: keyof typeof SEARCH_PROFILES\n) {\n  const config = SEARCH_PROFILES[profile];\n  if (\"text\" in config || \"highlights\" in config) {\n    return exa.searchAndContents(query, config);\n  }\n  return exa.search(query, config);\n}\n```\n\n### Step 2: Query-Level Caching (40-60% Cost Reduction)\n```typescript\nimport { LRUCache } from \"lru-cache\";\n\nconst searchCache = new LRUCache\u003Cstring, any>({\n  max: 5000,\n  ttl: 3600 * 1000, \u002F\u002F 1-hour TTL\n});\n\nasync function cachedSearch(query: string, opts: any) {\n  const key = `${query.toLowerCase().trim()}:${opts.type}:${opts.numResults}`;\n  const cached = searchCache.get(key);\n  if (cached) return cached;\n\n  const results = await exa.searchAndContents(query, opts);\n  searchCache.set(key, results);\n  return results;\n}\n\u002F\u002F Typical RAG cache hit rate: 40-60%, directly cutting costs in half\n```\n\n### Step 3: Query Deduplication for Batch Jobs\n```typescript\nfunction deduplicateQueries(queries: string[]): string[] {\n  const seen = new Set\u003Cstring>();\n  return queries.filter(q => {\n    const normalized = q.toLowerCase().trim().replace(\u002F\\s+\u002Fg, \" \");\n    if (seen.has(normalized)) return false;\n    seen.add(normalized);\n    return true;\n  });\n}\n\n\u002F\u002F Before batch processing, deduplicate\nconst uniqueQueries = deduplicateQueries(allQueries);\nconsole.log(`Deduped: ${allQueries.length} → ${uniqueQueries.length} queries`);\n\u002F\u002F Typical dedup rate: 20-40% for batch processing\n```\n\n### Step 4: Use Keyword Search When Appropriate\n```typescript\n\u002F\u002F Neural search: best for semantic\u002Fconceptual queries (more expensive)\n\u002F\u002F Keyword search: best for specific terms\u002Fnames (cheaper, faster)\n\nfunction selectCostEffectiveType(query: string): \"neural\" | \"keyword\" | \"auto\" {\n  \u002F\u002F Use keyword for exact lookups\n  if (query.match(\u002F^https?:\\\u002F\\\u002F\u002F)) return \"keyword\";     \u002F\u002F URL lookup\n  if (query.match(\u002F^[A-Z][a-z]+ [A-Z]\u002F)) return \"keyword\"; \u002F\u002F Proper nouns\n  if (query.includes('\"')) return \"keyword\";               \u002F\u002F Quoted terms\n\n  \u002F\u002F Use neural for conceptual queries\n  if (query.split(\" \").length > 5) return \"neural\";\n  return \"auto\"; \u002F\u002F Let Exa decide for ambiguous queries\n}\n```\n\n### Step 5: Monitor Usage and Set Budget Alerts\n```bash\nset -euo pipefail\n# Check API key usage\ncurl -s https:\u002F\u002Fapi.exa.ai\u002Fv1\u002Fusage \\\n  -H \"x-api-key: $EXA_API_KEY\" | \\\n  python3 -c \"\nimport json, sys\nd = json.load(sys.stdin)\nprint(f'Searches today: {d.get(\\\"searches_today\\\", \\\"N\u002FA\\\")}')\nprint(f'Monthly total: {d.get(\\\"searches_this_month\\\", \\\"N\u002FA\\\")}')\nprint(f'Monthly limit: {d.get(\\\"monthly_limit\\\", \\\"N\u002FA\\\")}')\n\" 2>\u002Fdev\u002Fnull || echo \"Usage endpoint not available\"\n```\n\n```typescript\n\u002F\u002F Application-level budget tracking\nclass ExaBudgetTracker {\n  private searchCount = 0;\n  private dailyLimit: number;\n\n  constructor(dailyLimit = 1000) {\n    this.dailyLimit = dailyLimit;\n  }\n\n  async search(exa: Exa, query: string, opts: any) {\n    if (this.searchCount >= this.dailyLimit) {\n      throw new Error(`Daily Exa budget exceeded (${this.dailyLimit} searches)`);\n    }\n    this.searchCount++;\n    return exa.search(query, opts);\n  }\n\n  getUsage() {\n    return {\n      used: this.searchCount,\n      remaining: this.dailyLimit - this.searchCount,\n      utilization: `${((this.searchCount \u002F this.dailyLimit) * 100).toFixed(1)}%`,\n    };\n  }\n}\n```\n\n## Cost Optimization Checklist\n- [ ] Use `keyword` or `fast` for exact lookups instead of `neural`\n- [ ] Reduce `numResults` to 3-5 for most use cases (default is 10)\n- [ ] Use `highlights` instead of full `text` when snippets suffice\n- [ ] Implement query-level caching (LRU or Redis)\n- [ ] Deduplicate queries in batch pipelines\n- [ ] Set application-level budget limits\n- [ ] Monitor daily\u002Fmonthly usage against budget\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Monthly limit hit early | Uncached batch queries | Add caching (40%+ savings) |\n| High cost per result | `numResults` too high | Reduce to 3-5 for most use cases |\n| Budget spike from batch | No deduplication | Deduplicate before batch execution |\n| `402 NO_MORE_CREDITS` | Account balance exhausted | Top up at dashboard.exa.ai |\n\n## Resources\n- [Exa Pricing](https:\u002F\u002Fexa.ai\u002Fpricing)\n- [Exa API Usage](https:\u002F\u002Fdashboard.exa.ai)\n- [Exa Search Types](https:\u002F\u002Fdocs.exa.ai\u002Freference\u002Fsearch)\n\n## Next Steps\nFor performance optimization, see `exa-performance-tuning`. For reliability, see `exa-reliability-patterns`.\n\n","# Exa Cost Tuning\n\n## Overview\nReduce Exa API costs through strategic search type selection, result caching, query deduplication, and usage monitoring. Exa charges per search request with costs varying by search type and content retrieval options.\n\n## Cost Drivers\n\n| Factor | Higher Cost | Lower Cost |\n|--------|-------------|------------|\n| Search type | `deep-reasoning` > `deep` > `neural` | `keyword` \u003C `fast` \u003C `instant` |\n| numResults | 10-100 results | 3-5 results |\n| Content retrieval | Full text + highlights + summary | Metadata only (no content) |\n| Content length | `maxCharacters: 5000` | `maxCharacters: 500` |\n| Live crawling | `livecrawl: \"always\"` | Cached content (default) |\n\n## Instructions\n\n### Step 1: Match Search Config to Use Case\n```typescript\nimport Exa from \"exa-js\";\n\nconst exa = new Exa(process.env.EXA_API_KEY);\n\n\u002F\u002F Define cost tiers per use case\nconst SEARCH_PROFILES = {\n  \u002F\u002F Cheapest: metadata-only keyword search\n  \"autocomplete\": { type: \"instant\" as const, numResults: 3 },\n\n  \u002F\u002F Low cost: fast search with minimal content\n  \"quick-lookup\": { type: \"fast\" as const, numResults: 3 },\n\n  \u002F\u002F Medium: balanced search for RAG\n  \"rag-context\": {\n    type: \"auto\" as const,\n    numResults: 5,\n    text: { maxCharacters: 1000 },\n  },\n\n  \u002F\u002F Higher cost: deep research\n  \"deep-research\": {\n    type: \"neural\" as const,\n    numResults: 10,\n    text: { maxCharacters: 3000 },\n    highlights: { maxCharacters: 500 },\n  },\n};\n\nasync function costAwareSearch(\n  query: string,\n  profile: keyof typeof SEARCH_PROFILES\n) {\n  const config = SEARCH_PROFILES[profile];\n  if (\"text\" in config || \"highlights\" in config) {\n    return exa.searchAndContents(query, config);\n  }\n  return exa.search(query, config);\n}\n```\n\n### Step 2: Query-Level Caching (40-60% Cost Reduction)\n```typescript\nimport { LRUCache } from \"lru-cache\";\n\nconst searchCache = new LRUCache\u003Cstring, any>({\n  max: 5000,\n  ttl: 3600 * 1000, \u002F\u002F 1-hour TTL\n});\n\nasync function cachedSearch(query: string, opts: any) {\n  const key = `${query.toLowerCase().trim()}:${opts.type}:${opts.numResults}`;\n  const cached = searchCache.get(key);\n  if (cached) return cached;\n\n  const results = await exa.searchAndContents(query, opts);\n  searchCache.set(key, results);\n  return results;\n}\n\u002F\u002F Typical RAG cache hit rate: 40-60%, directly cutting costs in half\n```\n\n### Step 3: Query Deduplication for Batch Jobs\n```typescript\nfunction deduplicateQueries(queries: string[]): string[] {\n  const seen = new Set\u003Cstring>();\n  return queries.filter(q => {\n    const normalized = q.toLowerCase().trim().replace(\u002F\\s+\u002Fg, \" \");\n    if (seen.has(normalized)) return false;\n    seen.add(normalized);\n    return true;\n  });\n}\n\n\u002F\u002F Before batch processing, deduplicate\nconst uniqueQueries = deduplicateQueries(allQueries);\nconsole.log(`Deduped: ${allQueries.length} → ${uniqueQueries.length} queries`);\n\u002F\u002F Typical dedup rate: 20-40% for batch processing\n```\n\n### Step 4: Use Keyword Search When Appropriate\n```typescript\n\u002F\u002F Neural search: best for semantic\u002Fconceptual queries (more expensive)\n\u002F\u002F Keyword search: best for specific terms\u002Fnames (cheaper, faster)\n\nfunction selectCostEffectiveType(query: string): \"neural\" | \"keyword\" | \"auto\" {\n  \u002F\u002F Use keyword for exact lookups\n  if (query.match(\u002F^https?:\\\u002F\\\u002F\u002F)) return \"keyword\";     \u002F\u002F URL lookup\n  if (query.match(\u002F^[A-Z][a-z]+ [A-Z]\u002F)) return \"keyword\"; \u002F\u002F Proper nouns\n  if (query.includes('\"')) return \"keyword\";               \u002F\u002F Quoted terms\n\n  \u002F\u002F Use neural for conceptual queries\n  if (query.split(\" \").length > 5) return \"neural\";\n  return \"auto\"; \u002F\u002F Let Exa decide for ambiguous queries\n}\n```\n\n### Step 5: Monitor Usage and Set Budget Alerts\n```bash\nset -euo pipefail\n# Check API key usage\ncurl -s https:\u002F\u002Fapi.exa.ai\u002Fv1\u002Fusage \\\n  -H \"x-api-key: $EXA_API_KEY\" | \\\n  python3 -c \"\nimport json, sys\nd = json.load(sys.stdin)\nprint(f'Searches today: {d.get(\\\"searches_today\\\", \\\"N\u002FA\\\")}')\nprint(f'Monthly total: {d.get(\\\"searches_this_month\\\", \\\"N\u002FA\\\")}')\nprint(f'Monthly limit: {d.get(\\\"monthly_limit\\\", \\\"N\u002FA\\\")}')\n\" 2>\u002Fdev\u002Fnull || echo \"Usage endpoint not available\"\n```\n\n```typescript\n\u002F\u002F Application-level budget tracking\nclass ExaBudgetTracker {\n  private searchCount = 0;\n  private dailyLimit: number;\n\n  constructor(dailyLimit = 1000) {\n    this.dailyLimit = dailyLimit;\n  }\n\n  async search(exa: Exa, query: string, opts: any) {\n    if (this.searchCount >= this.dailyLimit) {\n      throw new Error(`Daily Exa budget exceeded (${this.dailyLimit} searches)`);\n    }\n    this.searchCount++;\n    return exa.search(query, opts);\n  }\n\n  getUsage() {\n    return {\n      used: this.searchCount,\n      remaining: this.dailyLimit - this.searchCount,\n      utilization: `${((this.searchCount \u002F this.dailyLimit) * 100).toFixed(1)}%`,\n    };\n  }\n}\n```\n\n## Cost Optimization Checklist\n- [ ] Use `keyword` or `fast` for exact lookups instead of `neural`\n- [ ] Reduce `numResults` to 3-5 for most use cases (default is 10)\n- [ ] Use `highlights` instead of full `text` when snippets suffice\n- [ ] Implement query-level caching (LRU or Redis)\n- [ ] Deduplicate queries in batch pipelines\n- [ ] Set application-level budget limits\n- [ ] Monitor daily\u002Fmonthly usage against budget\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Monthly limit hit early | Uncached batch queries | Add caching (40%+ savings) |\n| High cost per result | `numResults` too high | Reduce to 3-5 for most use cases |\n| Budget spike from batch | No deduplication | Deduplicate before batch execution |\n| `402 NO_MORE_CREDITS` | Account balance exhausted | Top up at dashboard.exa.ai |\n\n## Resources\n- [Exa Pricing](https:\u002F\u002Fexa.ai\u002Fpricing)\n- [Exa API Usage](https:\u002F\u002Fdashboard.exa.ai)\n- [Exa Search Types](https:\u002F\u002Fdocs.exa.ai\u002Freference\u002Fsearch)\n\n## Next Steps\nFor performance optimization, see `exa-performance-tuning`. For reliability, see `exa-reliability-patterns`.\n\n",{"name":5,"tags":44,"author":47,"license":15,"version":48,"description":49,"allowed-tools":50,"compatible-with":51},[45,21,33,46],"saas","cost-optimization","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Optimize Exa costs through search type selection, caching, and usage monitoring.\nUse when analyzing Exa billing, reducing API costs,\nor implementing budget controls and usage alerts.\nTrigger with phrases like \"exa cost\", \"exa billing\",\n\"reduce exa costs\", \"exa pricing\", \"exa expensive\", \"exa budget\".\n","Read, Grep, Bash(curl:*), Bash(node:*)","claude-code, codex, openclaw","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fexa-cost-tuning",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill exa-cost-tuning",{"tool":67,"command":68},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill exa-cost-tuning",{"tool":70,"command":71},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill exa-cost-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fexa-cost-tuning\u002FSKILL.md",true,[],[76,85,94,103,109,115],{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[82,83,84],"model","model hierarchy","model hierarchy skill",{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[91,92,93],"MCP","zoom","zoom mcp",{"skillNo":95,"name":96,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[100,101,102,92],"sdk","zoom apps sdk","apps",{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[105],{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[111],{"skillNo":116,"name":117,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[117]]