[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H8CBVFVWD2NM5F21H8G94A":3,"skill-same:01M6H8CBVFVWD2NM5F21H8G94A":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M6H8CBVFVWD2NM5F21H8G94A","perplexity-cost-tuning",null,"Optimize Perplexity costs through tier selection, sampling, and usage monitoring.\nUse when analyzing Perplexity billing, reducing API costs,\nor implementing usage monitoring and budget alerts.\nTrigger with phrases like \"perplexity cost\", \"perplexity billing\",\n\"reduce perplexity costs\", \"perplexity pricing\", \"perplexity expensive\", \"perplexity budget\".","micsapp\u002Fmicstec-skills","micsapp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F82411001?v=4","01M6GWCFQ6D3PV8EHNY62NN5VW","01M6GWCFVE1PA5HG0DKC7AMFJ3",4,"MIT","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fclaude-code\u002Fplugins-plus-skills\u002Fplugins\u002Fsaas-packs\u002Fperplexity-pack\u002Fskills\u002Fperplexity-cost-tuning\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"perplexity","tuning","perplexity cost tuning","cost","optimize","reduce","implementing","usage","with","billing","trigger","io","alerts","pricing","selection","sampling","use","api","monitoring","code","2026-11-10 10:12:30",false,"---\nname: perplexity-cost-tuning\ndescription: |\n  Optimize Perplexity costs through tier selection, sampling, and usage monitoring.\n  Use when analyzing Perplexity billing, reducing API costs,\n  or implementing usage monitoring and budget alerts.\n  Trigger with phrases like \"perplexity cost\", \"perplexity billing\",\n  \"reduce perplexity costs\", \"perplexity pricing\", \"perplexity expensive\", \"perplexity budget\".\nallowed-tools: Read, Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\n---\n# Perplexity Cost Tuning\n\n## Overview\nReduce Perplexity AI search API costs by choosing the right model per query, caching search results, and limiting token output. Perplexity charges per query with significant cost differences between models: `sonar` (lightweight, cheaper) vs `sonar-pro` (deeper research, 3-5x more expensive).\n\n## Prerequisites\n- Perplexity API account with usage dashboard\n- Understanding of query patterns in your application\n- Cache infrastructure for search results\n\n## Instructions\n\n### Step 1: Route Queries to the Right Model\n```typescript\n\u002F\u002F Smart model selection based on query complexity\nfunction selectModel(query: string, context: string): 'sonar' | 'sonar-pro' {\n  \u002F\u002F Simple factual queries -> sonar (cheap)\n  const simplePatterns = [\u002F^what is\u002Fi, \u002F^define\u002Fi, \u002F^who is\u002Fi, \u002F^when did\u002Fi, \u002Fcurrent price of\u002Fi];\n  if (simplePatterns.some(p => p.test(query))) return 'sonar';\n\n  \u002F\u002F Complex research queries -> sonar-pro (expensive but worth it)\n  const complexPatterns = [\u002Fcompare.*vs\u002Fi, \u002Fanalysis of\u002Fi, \u002Fcomprehensive.*overview\u002Fi, \u002Fpros and cons\u002Fi];\n  if (complexPatterns.some(p => p.test(query))) return 'sonar-pro';\n\n  return 'sonar'; \u002F\u002F Default to cheaper model\n}\n\u002F\u002F Impact: 60-70% of queries can use sonar, saving 3-5x per query\n```\n\n### Step 2: Cache Search Results\n```typescript\nimport { LRUCache } from 'lru-cache';\n\nconst searchCache = new LRUCache\u003Cstring, any>({\n  max: 10000,  # 10000: 10 seconds in ms\n  ttl: 4 * 3600_000, \u002F\u002F 4-hour TTL (search results go stale)\n});\n\nasync function cachedQuery(query: string, model: string) {\n  const key = `${model}:${query.toLowerCase().trim()}`;\n  const cached = searchCache.get(key);\n  if (cached) return cached;\n\n  const result = await perplexity.chat.completions.create({\n    model, messages: [{ role: 'user', content: query }],\n  });\n  searchCache.set(key, result);\n  return result;\n}\n```\n\n### Step 3: Limit Token Output\n```bash\nset -euo pipefail\n# Set max_tokens to reduce output (and cost) for simple queries\n# Factual queries need ~100 tokens, not 4096\ncurl -X POST https:\u002F\u002Fapi.perplexity.ai\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $PPLX_API_KEY\" \\\n  -d '{\n    \"model\": \"sonar\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"What is the current population of Tokyo?\"}],\n    \"max_tokens\": 100\n  }'\n# Saves tokens on output; Perplexity charges for both input and output tokens\n```\n\n### Step 4: Use Domain Filters to Reduce Processing\n```bash\nset -euo pipefail\n# Restricting search domains means less content to process = faster + cheaper\ncurl -X POST https:\u002F\u002Fapi.perplexity.ai\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $PPLX_API_KEY\" \\\n  -d '{\n    \"model\": \"sonar\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"latest Python 3.13 release notes\"}],\n    \"search_domain_filter\": [\"python.org\", \"docs.python.org\"],\n    \"max_tokens\": 500  # HTTP 500 Internal Server Error\n  }'\n```\n\n### Step 5: Monitor and Budget\n```bash\nset -euo pipefail\n# Track daily spend and project monthly cost\ncurl -s https:\u002F\u002Fapi.perplexity.ai\u002Fv1\u002Fusage \\\n  -H \"Authorization: Bearer $PPLX_API_KEY\" | \\\n  jq '{\n    queries_today: .queries_today,\n    cost_today: .cost_today_usd,\n    monthly_projection: (.cost_today_usd * 30),\n    budget_remaining: .budget_remaining_usd,\n    avg_cost_per_query: (.cost_today_usd \u002F (.queries_today + 0.01))\n  }'\n```\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| High cost per query | Using sonar-pro for everything | Route simple queries to sonar |\n| Cache hit rate low | Queries too unique | Normalize queries before caching |\n| Budget exhausted early | No per-key spending limits | Set monthly budget caps per API key |\n| Stale cached results | TTL too long | Reduce cache TTL for time-sensitive queries |\n\n## Examples\n\n**Basic usage**: Apply perplexity cost tuning to a standard project setup with default configuration options.\n\n**Advanced scenario**: Customize perplexity cost tuning for production environments with multiple constraints and team-specific requirements.\n\n## Output\n\n- Configuration files or code changes applied to the project\n- Validation report confirming correct implementation\n- Summary of changes made and their rationale\n\n## Resources\n\n- Official monitoring documentation\n- Community best practices and patterns\n- Related skills in this plugin pack","# Perplexity Cost Tuning\n\n## Overview\nReduce Perplexity AI search API costs by choosing the right model per query, caching search results, and limiting token output. Perplexity charges per query with significant cost differences between models: `sonar` (lightweight, cheaper) vs `sonar-pro` (deeper research, 3-5x more expensive).\n\n## Prerequisites\n- Perplexity API account with usage dashboard\n- Understanding of query patterns in your application\n- Cache infrastructure for search results\n\n## Instructions\n\n### Step 1: Route Queries to the Right Model\n```typescript\n\u002F\u002F Smart model selection based on query complexity\nfunction selectModel(query: string, context: string): 'sonar' | 'sonar-pro' {\n  \u002F\u002F Simple factual queries -> sonar (cheap)\n  const simplePatterns = [\u002F^what is\u002Fi, \u002F^define\u002Fi, \u002F^who is\u002Fi, \u002F^when did\u002Fi, \u002Fcurrent price of\u002Fi];\n  if (simplePatterns.some(p => p.test(query))) return 'sonar';\n\n  \u002F\u002F Complex research queries -> sonar-pro (expensive but worth it)\n  const complexPatterns = [\u002Fcompare.*vs\u002Fi, \u002Fanalysis of\u002Fi, \u002Fcomprehensive.*overview\u002Fi, \u002Fpros and cons\u002Fi];\n  if (complexPatterns.some(p => p.test(query))) return 'sonar-pro';\n\n  return 'sonar'; \u002F\u002F Default to cheaper model\n}\n\u002F\u002F Impact: 60-70% of queries can use sonar, saving 3-5x per query\n```\n\n### Step 2: Cache Search Results\n```typescript\nimport { LRUCache } from 'lru-cache';\n\nconst searchCache = new LRUCache\u003Cstring, any>({\n  max: 10000,  # 10000: 10 seconds in ms\n  ttl: 4 * 3600_000, \u002F\u002F 4-hour TTL (search results go stale)\n});\n\nasync function cachedQuery(query: string, model: string) {\n  const key = `${model}:${query.toLowerCase().trim()}`;\n  const cached = searchCache.get(key);\n  if (cached) return cached;\n\n  const result = await perplexity.chat.completions.create({\n    model, messages: [{ role: 'user', content: query }],\n  });\n  searchCache.set(key, result);\n  return result;\n}\n```\n\n### Step 3: Limit Token Output\n```bash\nset -euo pipefail\n# Set max_tokens to reduce output (and cost) for simple queries\n# Factual queries need ~100 tokens, not 4096\ncurl -X POST https:\u002F\u002Fapi.perplexity.ai\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $PPLX_API_KEY\" \\\n  -d '{\n    \"model\": \"sonar\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"What is the current population of Tokyo?\"}],\n    \"max_tokens\": 100\n  }'\n# Saves tokens on output; Perplexity charges for both input and output tokens\n```\n\n### Step 4: Use Domain Filters to Reduce Processing\n```bash\nset -euo pipefail\n# Restricting search domains means less content to process = faster + cheaper\ncurl -X POST https:\u002F\u002Fapi.perplexity.ai\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $PPLX_API_KEY\" \\\n  -d '{\n    \"model\": \"sonar\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"latest Python 3.13 release notes\"}],\n    \"search_domain_filter\": [\"python.org\", \"docs.python.org\"],\n    \"max_tokens\": 500  # HTTP 500 Internal Server Error\n  }'\n```\n\n### Step 5: Monitor and Budget\n```bash\nset -euo pipefail\n# Track daily spend and project monthly cost\ncurl -s https:\u002F\u002Fapi.perplexity.ai\u002Fv1\u002Fusage \\\n  -H \"Authorization: Bearer $PPLX_API_KEY\" | \\\n  jq '{\n    queries_today: .queries_today,\n    cost_today: .cost_today_usd,\n    monthly_projection: (.cost_today_usd * 30),\n    budget_remaining: .budget_remaining_usd,\n    avg_cost_per_query: (.cost_today_usd \u002F (.queries_today + 0.01))\n  }'\n```\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| High cost per query | Using sonar-pro for everything | Route simple queries to sonar |\n| Cache hit rate low | Queries too unique | Normalize queries before caching |\n| Budget exhausted early | No per-key spending limits | Set monthly budget caps per API key |\n| Stale cached results | TTL too long | Reduce cache TTL for time-sensitive queries |\n\n## Examples\n\n**Basic usage**: Apply perplexity cost tuning to a standard project setup with default configuration options.\n\n**Advanced scenario**: Customize perplexity cost tuning for production environments with multiple constraints and team-specific requirements.\n\n## Output\n\n- Configuration files or code changes applied to the project\n- Validation report confirming correct implementation\n- Summary of changes made and their rationale\n\n## Resources\n\n- Official monitoring documentation\n- Community best practices and patterns\n- Related skills in this plugin pack",{"name":5,"author":43,"license":14,"version":44,"description":45,"allowed-tools":46,"compatible-with":47},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Optimize Perplexity costs through tier selection, sampling, and usage monitoring.\nUse when analyzing Perplexity billing, reducing API costs,\nor implementing usage monitoring and budget alerts.\nTrigger with phrases like \"perplexity cost\", \"perplexity billing\",\n\"reduce perplexity costs\", \"perplexity pricing\", \"perplexity expensive\", \"perplexity budget\".\n","Read, Grep","claude-code, codex, openclaw","master","3f5d983eb4ef375b749adcd6b07ec03bd82ae8a8","claude-code\u002Fplugins-plus-skills\u002Fplugins\u002Fsaas-packs\u002Fperplexity-pack\u002Fskills\u002Fperplexity-cost-tuning",0,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills","https:\u002F\u002Fgithub.com\u002Fmicsapp","2026-03-20 11:24:18",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add micsapp\u002Fmicstec-skills --skill perplexity-cost-tuning",{"tool":61,"command":62},"bunx","bunx skills add micsapp\u002Fmicstec-skills --skill perplexity-cost-tuning",{"tool":64,"command":65},"pnpm","pnpm dlx skills add micsapp\u002Fmicstec-skills --skill perplexity-cost-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fclaude-code\u002Fplugins-plus-skills\u002Fplugins\u002Fsaas-packs\u002Fperplexity-pack\u002Fskills\u002Fperplexity-cost-tuning\u002FSKILL.md",true,[],[70,95,115,134,152,177],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":38},"01M6HBTJ02FXBFG9NYEHHYAP52","azure-apim-architecture","Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fazure-apim-architecture\u002FSKILL.md",[],[77,78,79,80,81,82,83,84,85,35,86,87,88,89,90,32,91,92,93,94],"architecture","azure","azure apim architecture","component","authentication","gateway","topology","Optimization","network","team","environment","multi-environment","workspaces","instances","strategies","azure api management","mode","for",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":38},"01M6HBT7J4H082JEEA670B3EQ9","apiops-deployment","Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep\u002FTerraform), CI\u002FCD pipelines (GitHub Actions\u002FAzure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapiops-deployment\u002FSKILL.md",[],[102,103,104,105,78,106,37,107,108,109,110,111,35,86,91,112,113,92,114,24],"deployment","apiops deployment","workflows","azure devops","infrastructure","infrastructure as code","actions","ci","github actions","github-actions","as","guides","CI\u002FCD",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":38},"01M6HBT2HEA23THNE9E00GYQBE","apim-policy-authoring","Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request\u002Fresponse processing logic.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapim-policy-authoring\u002FSKILL.md",[],[122,123,124,125,78,81,35,86,126,34,127,128,129,130,131,92,132,133,24,94],"policy","authoring","apim policy authoring","security","access","ready","api security","Access Control","error","processing","cors configuration","production-ready",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":38},"01M6HBSY65SB29J9WE9KYD0K6T","api-security-review","Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapi-security-review\u002FSKILL.md",[],[141,125,142,35,128,143,78,102,144,145,146,147,86,148,92,149,150,151,93,94],"review","security review","api security review","benchmark","verification","owasp","owasp-api","alignment","azure security","reviews","top",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":38},"01M6HBSRW4PDFE6K4F8JYPZQ05","jira-cli","Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fjira-cli\u002FSKILL.md",[],[159,160,161,104,162,163,164,165,35,166,167,168,169,170,171,172,173,174,175,176],"cli","jira","jira cli","init","tasks","create","issues","common","work","command","edit","list","view","project","project work","token","line","sprints",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":38},"01M6HBSNS3JHMW603G47TWE31H","calculator","Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fcalculator\u002FSKILL.md",[],[179,184,185,186,187,188,189,34,190,191],"npm","js","calculate","node","math","user","compute","errors"]