[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H6VBST8M52K3SSH94DFWWW":3,"skill-same:01M6H6VBST8M52K3SSH94DFWWW":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},"01M6H6VBST8M52K3SSH94DFWWW","groq-cost-tuning",null,"Optimize Groq costs through tier selection, sampling, and usage monitoring.\nUse when analyzing Groq billing, reducing API costs,\nor implementing usage monitoring and budget alerts.\nTrigger with phrases like \"groq cost\", \"groq billing\",\n\"reduce groq costs\", \"groq pricing\", \"groq expensive\", \"groq 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\u002Fgroq-pack\u002Fskills\u002Fgroq-cost-tuning\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"tuning","groq","groq 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: groq-cost-tuning\ndescription: |\n  Optimize Groq costs through tier selection, sampling, and usage monitoring.\n  Use when analyzing Groq billing, reducing API costs,\n  or implementing usage monitoring and budget alerts.\n  Trigger with phrases like \"groq cost\", \"groq billing\",\n  \"reduce groq costs\", \"groq pricing\", \"groq expensive\", \"groq 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# Groq Cost Tuning\n\n## Overview\nOptimize Groq inference costs by selecting the right model for each use case and managing token volume. Groq's pricing is extremely competitive (Llama 3.1 8B at ~$0.05\u002FM tokens, Llama 3.3 70B at ~$0.59\u002FM tokens, Mixtral at ~$0.24\u002FM tokens), but high throughput (500+ tokens\u002Fsec) makes it easy to burn through large volumes quickly.\n\n## Prerequisites\n- Groq Cloud account with billing dashboard access\n- Understanding of which use cases need which model quality\n- Application-level request routing capability\n\n## Instructions\n\n### Step 1: Implement Smart Model Routing\n```typescript\n\u002F\u002F Route requests to cheapest model that meets quality requirements\nconst MODEL_ROUTING: Record\u003Cstring, { model: string; costPer1MTokens: number }> = {\n  'classification':  { model: 'llama-3.1-8b-instant',    costPer1MTokens: 0.05 },\n  'summarization':   { model: 'llama-3.1-8b-instant',    costPer1MTokens: 0.05 },\n  'code-review':     { model: 'llama-3.3-70b-versatile',  costPer1MTokens: 0.59 },\n  'creative-writing':{ model: 'llama-3.3-70b-versatile',  costPer1MTokens: 0.59 },\n  'extraction':      { model: 'llama-3.1-8b-instant',    costPer1MTokens: 0.05 },\n  'chat':            { model: 'llama-3.3-70b-versatile',  costPer1MTokens: 0.59 },\n};\n\nfunction selectModel(useCase: string): string {\n  return MODEL_ROUTING[useCase]?.model || 'llama-3.1-8b-instant'; \u002F\u002F Default cheap\n}\n\u002F\u002F Classification on 8B: $0.05\u002FM tokens vs 70B: $0.59\u002FM = 12x savings\n```\n\n### Step 2: Minimize Token Usage per Request\n```typescript\n\u002F\u002F Reduce prompt tokens -- Groq charges for both input and output\nconst OPTIMIZATION_TIPS = {\n  systemPrompt: 'Keep system prompts under 200 tokens. Be concise.',  # HTTP 200 OK\n  maxTokens: 'Set max_tokens to expected output size, not maximum.',\n  context: 'Only include relevant context, not entire documents.',\n  fewShot: 'Use 1-2 examples instead of 5-6 for few-shot learning.',\n};\n\n\u002F\u002F Example: reduce a 2000-token prompt to 500 tokens  # 500: 2000: 2 seconds in ms\nconst optimizedRequest = {\n  model: 'llama-3.1-8b-instant',\n  messages: [\n    { role: 'system', content: 'Classify: positive\u002Fnegative\u002Fneutral' }, \u002F\u002F 6 tokens vs 200  # HTTP 200 OK\n    { role: 'user', content: text }, \u002F\u002F Only the text, no verbose instructions\n  ],\n  max_tokens: 5, \u002F\u002F Only need one word\n};\n```\n\n### Step 3: Cache Identical Requests\n```typescript\nimport { createHash } from 'crypto';\n\nconst responseCache = new Map\u003Cstring, { result: any; ts: number }>();\n\nasync function cachedCompletion(messages: any[], model: string) {\n  const key = createHash('md5').update(JSON.stringify({ messages, model })).digest('hex');\n  const cached = responseCache.get(key);\n  if (cached && Date.now() - cached.ts \u003C 3600_000) return cached.result;\n\n  const result = await groq.chat.completions.create({ model, messages });\n  responseCache.set(key, { result, ts: Date.now() });\n  return result;\n}\n```\n\n### Step 4: Use Batching for Bulk Processing\n```typescript\n\u002F\u002F Process items in batches with the fast 8B model\n\u002F\u002F Groq's speed makes batch processing very efficient\nasync function batchClassify(items: string[]): Promise\u003Cstring[]> {\n  \u002F\u002F Batch 10 items per request instead of 1 per request\n  const batchPrompt = items.map((item, i) => `${i}: ${item}`).join('\\n');\n  const result = await groq.chat.completions.create({\n    model: 'llama-3.1-8b-instant',\n    messages: [{ role: 'user', content: `Classify each as pos\u002Fneg\u002Fneutral:\\n${batchPrompt}` }],\n    max_tokens: items.length * 10,\n  });\n  \u002F\u002F 1 API call instead of 10 = ~90% reduction in overhead\n  return parseClassifications(result.choices[0].message.content);\n}\n```\n\n### Step 5: Set Spending Limits\nIn Groq Console > Organization > Billing:\n- Set monthly spending cap\n- Enable alerts at 50% and 80% of budget\n- Configure auto-pause when limit is reached\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Costs higher than expected | Using 70B for simple tasks | Route classification\u002Fextraction to 8B model |\n| Rate limit causing retries | RPM cap hit | Spread requests across multiple keys |\n| Spending cap paused API | Budget exhausted | Increase cap or reduce request volume |\n| Cache hit rate low | Unique prompts every time | Normalize prompts before caching |\n\n## Examples\n\n**Basic usage**: Apply groq cost tuning to a standard project setup with default configuration options.\n\n**Advanced scenario**: Customize groq 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","# Groq Cost Tuning\n\n## Overview\nOptimize Groq inference costs by selecting the right model for each use case and managing token volume. Groq's pricing is extremely competitive (Llama 3.1 8B at ~$0.05\u002FM tokens, Llama 3.3 70B at ~$0.59\u002FM tokens, Mixtral at ~$0.24\u002FM tokens), but high throughput (500+ tokens\u002Fsec) makes it easy to burn through large volumes quickly.\n\n## Prerequisites\n- Groq Cloud account with billing dashboard access\n- Understanding of which use cases need which model quality\n- Application-level request routing capability\n\n## Instructions\n\n### Step 1: Implement Smart Model Routing\n```typescript\n\u002F\u002F Route requests to cheapest model that meets quality requirements\nconst MODEL_ROUTING: Record\u003Cstring, { model: string; costPer1MTokens: number }> = {\n  'classification':  { model: 'llama-3.1-8b-instant',    costPer1MTokens: 0.05 },\n  'summarization':   { model: 'llama-3.1-8b-instant',    costPer1MTokens: 0.05 },\n  'code-review':     { model: 'llama-3.3-70b-versatile',  costPer1MTokens: 0.59 },\n  'creative-writing':{ model: 'llama-3.3-70b-versatile',  costPer1MTokens: 0.59 },\n  'extraction':      { model: 'llama-3.1-8b-instant',    costPer1MTokens: 0.05 },\n  'chat':            { model: 'llama-3.3-70b-versatile',  costPer1MTokens: 0.59 },\n};\n\nfunction selectModel(useCase: string): string {\n  return MODEL_ROUTING[useCase]?.model || 'llama-3.1-8b-instant'; \u002F\u002F Default cheap\n}\n\u002F\u002F Classification on 8B: $0.05\u002FM tokens vs 70B: $0.59\u002FM = 12x savings\n```\n\n### Step 2: Minimize Token Usage per Request\n```typescript\n\u002F\u002F Reduce prompt tokens -- Groq charges for both input and output\nconst OPTIMIZATION_TIPS = {\n  systemPrompt: 'Keep system prompts under 200 tokens. Be concise.',  # HTTP 200 OK\n  maxTokens: 'Set max_tokens to expected output size, not maximum.',\n  context: 'Only include relevant context, not entire documents.',\n  fewShot: 'Use 1-2 examples instead of 5-6 for few-shot learning.',\n};\n\n\u002F\u002F Example: reduce a 2000-token prompt to 500 tokens  # 500: 2000: 2 seconds in ms\nconst optimizedRequest = {\n  model: 'llama-3.1-8b-instant',\n  messages: [\n    { role: 'system', content: 'Classify: positive\u002Fnegative\u002Fneutral' }, \u002F\u002F 6 tokens vs 200  # HTTP 200 OK\n    { role: 'user', content: text }, \u002F\u002F Only the text, no verbose instructions\n  ],\n  max_tokens: 5, \u002F\u002F Only need one word\n};\n```\n\n### Step 3: Cache Identical Requests\n```typescript\nimport { createHash } from 'crypto';\n\nconst responseCache = new Map\u003Cstring, { result: any; ts: number }>();\n\nasync function cachedCompletion(messages: any[], model: string) {\n  const key = createHash('md5').update(JSON.stringify({ messages, model })).digest('hex');\n  const cached = responseCache.get(key);\n  if (cached && Date.now() - cached.ts \u003C 3600_000) return cached.result;\n\n  const result = await groq.chat.completions.create({ model, messages });\n  responseCache.set(key, { result, ts: Date.now() });\n  return result;\n}\n```\n\n### Step 4: Use Batching for Bulk Processing\n```typescript\n\u002F\u002F Process items in batches with the fast 8B model\n\u002F\u002F Groq's speed makes batch processing very efficient\nasync function batchClassify(items: string[]): Promise\u003Cstring[]> {\n  \u002F\u002F Batch 10 items per request instead of 1 per request\n  const batchPrompt = items.map((item, i) => `${i}: ${item}`).join('\\n');\n  const result = await groq.chat.completions.create({\n    model: 'llama-3.1-8b-instant',\n    messages: [{ role: 'user', content: `Classify each as pos\u002Fneg\u002Fneutral:\\n${batchPrompt}` }],\n    max_tokens: items.length * 10,\n  });\n  \u002F\u002F 1 API call instead of 10 = ~90% reduction in overhead\n  return parseClassifications(result.choices[0].message.content);\n}\n```\n\n### Step 5: Set Spending Limits\nIn Groq Console > Organization > Billing:\n- Set monthly spending cap\n- Enable alerts at 50% and 80% of budget\n- Configure auto-pause when limit is reached\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Costs higher than expected | Using 70B for simple tasks | Route classification\u002Fextraction to 8B model |\n| Rate limit causing retries | RPM cap hit | Spread requests across multiple keys |\n| Spending cap paused API | Budget exhausted | Increase cap or reduce request volume |\n| Cache hit rate low | Unique prompts every time | Normalize prompts before caching |\n\n## Examples\n\n**Basic usage**: Apply groq cost tuning to a standard project setup with default configuration options.\n\n**Advanced scenario**: Customize groq 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 Groq costs through tier selection, sampling, and usage monitoring.\nUse when analyzing Groq billing, reducing API costs,\nor implementing usage monitoring and budget alerts.\nTrigger with phrases like \"groq cost\", \"groq billing\",\n\"reduce groq costs\", \"groq pricing\", \"groq expensive\", \"groq budget\".\n","Read, Grep","claude-code, codex, openclaw","master","3f5d983eb4ef375b749adcd6b07ec03bd82ae8a8","claude-code\u002Fplugins-plus-skills\u002Fplugins\u002Fsaas-packs\u002Fgroq-pack\u002Fskills\u002Fgroq-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 groq-cost-tuning",{"tool":61,"command":62},"bunx","bunx skills add micsapp\u002Fmicstec-skills --skill groq-cost-tuning",{"tool":64,"command":65},"pnpm","pnpm dlx skills add micsapp\u002Fmicstec-skills --skill groq-cost-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fclaude-code\u002Fplugins-plus-skills\u002Fplugins\u002Fsaas-packs\u002Fgroq-pack\u002Fskills\u002Fgroq-cost-tuning\u002FSKILL.md",true,[],[70,105,133,153,173,198],{"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":86,"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",[76,81],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[87,88,89,90,91,92,93,94,95,35,96,97,98,99,100,32,101,102,103,104],"architecture","azure","azure apim architecture","component","authentication","gateway","topology","Optimization","network","team","environment","multi-environment","workspaces","instances","strategies","azure api management","mode","for",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":119,"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",[111,112,115,118],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},{"categoryNo":113,"categoryName":114,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":116,"categoryName":117,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},[120,121,122,123,88,124,37,125,126,127,128,129,35,96,101,130,131,102,132,24],"deployment","apiops deployment","workflows","azure devops","infrastructure","infrastructure as code","actions","ci","github actions","github-actions","as","guides","CI\u002FCD",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":140,"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",[139],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},[141,142,143,144,88,91,35,96,145,34,146,147,148,149,150,102,151,152,24,104],"policy","authoring","apim policy authoring","security","access","ready","api security","Access Control","error","processing","cors configuration","production-ready",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":161,"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",[159,160],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},[162,144,163,35,147,164,88,120,165,166,167,168,96,169,102,170,171,172,103,104],"review","security review","api security review","benchmark","verification","owasp","owasp-api","alignment","azure security","reviews","top",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"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",[],[180,181,182,122,183,184,185,186,35,187,188,189,190,191,192,193,194,195,196,197],"cli","jira","jira cli","init","tasks","create","issues","common","work","command","edit","list","view","project","project work","token","line","sprints",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":204,"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",[],[200,205,206,207,208,209,210,34,211,212],"npm","js","calculate","node","math","user","compute","errors"]