[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H6WRTJQXA0VTQ356PWDW08":3,"skill-same:01M6H6WRTJQXA0VTQ356PWDW08":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},"01M6H6WRTJQXA0VTQ356PWDW08","groq-performance-tuning",null,"Optimize Groq API performance with caching, batching, and connection pooling.\nUse when experiencing slow API responses, implementing caching strategies,\nor optimizing request throughput for Groq integrations.\nTrigger with phrases like \"groq performance\", \"optimize groq\",\n\"groq latency\", \"groq caching\", \"groq slow\", \"groq batch\".","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-performance-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 performance tuning","groq","performance tuning","performance","strategies","for","implementing","with","trigger","io","latency","caching strategies","caching","optimize","use","integrations","api","batch","code","2026-11-10 10:12:30",false,"---\nname: groq-performance-tuning\ndescription: |\n  Optimize Groq API performance with caching, batching, and connection pooling.\n  Use when experiencing slow API responses, implementing caching strategies,\n  or optimizing request throughput for Groq integrations.\n  Trigger with phrases like \"groq performance\", \"optimize groq\",\n  \"groq latency\", \"groq caching\", \"groq slow\", \"groq batch\".\nallowed-tools: Read, Write, Edit\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\n---\n# Groq Performance Tuning\n\n## Overview\nMaximize Groq's ultra-low-latency LPU inference. Groq delivers sub-100ms token generation; tuning focuses on streaming efficiency, prompt caching, model selection for speed vs quality, and parallel request orchestration.\n\n## Prerequisites\n- Groq API key with rate limit awareness\n- `groq-sdk` npm package installed\n- Understanding of LLM token economics\n- Monitoring for TTFT (time to first token)\n\n## Instructions\n\n### Step 1: Select Optimal Model for Speed\n```typescript\nimport Groq from 'groq-sdk';\n\nconst groq = new Groq({ apiKey: process.env.GROQ_API_KEY });\n\n\u002F\u002F Model speed tiers (approximate TTFT):\n\u002F\u002F llama-3.3-70b-versatile: ~200ms TTFT, best quality\n\u002F\u002F llama-3.1-8b-instant:    ~80ms TTFT, fastest\n\u002F\u002F mixtral-8x7b-32768:      ~150ms TTFT, long context  # 32768 = configured value\n\nasync function fastCompletion(prompt: string) {\n  return groq.chat.completions.create({\n    model: 'llama-3.1-8b-instant', \u002F\u002F Fastest model\n    messages: [{ role: 'user', content: prompt }],\n    temperature: 0,       \u002F\u002F Deterministic = cacheable\n    max_tokens: 256,      \u002F\u002F Limit output for speed  # 256 bytes\n  });\n}\n```\n\n### Step 2: Streaming for Perceived Performance\n```typescript\nasync function streamCompletion(\n  messages: any[],\n  onToken: (token: string) => void\n) {\n  const stream = await groq.chat.completions.create({\n    model: 'llama-3.3-70b-versatile',\n    messages,\n    stream: true,\n    max_tokens: 1024,  # 1024: 1 KB\n  });\n\n  let fullResponse = '';\n  for await (const chunk of stream) {\n    const token = chunk.choices[0]?.delta?.content || '';\n    fullResponse += token;\n    onToken(token);\n  }\n  return fullResponse;\n}\n```\n\n### Step 3: Semantic Prompt Cache\n```typescript\nimport { LRUCache } from 'lru-cache';\nimport { createHash } from 'crypto';\n\nconst promptCache = new LRUCache\u003Cstring, string>({\n  max: 500,  # HTTP 500 Internal Server Error\n  ttl: 1000 * 60 * 10, \u002F\u002F 10 min for deterministic prompts  # 1000: 1 second in ms\n});\n\nfunction hashPrompt(messages: any[], model: string): string {\n  return createHash('sha256')\n    .update(JSON.stringify({ messages, model }))\n    .digest('hex');\n}\n\nasync function cachedCompletion(messages: any[], model: string) {\n  const key = hashPrompt(messages, model);\n  const cached = promptCache.get(key);\n  if (cached) return cached;\n\n  const response = await groq.chat.completions.create({\n    model,\n    messages,\n    temperature: 0,\n  });\n\n  const result = response.choices[0].message.content!;\n  promptCache.set(key, result);\n  return result;\n}\n```\n\n### Step 4: Parallel Request Orchestration\n```typescript\nasync function parallelCompletions(\n  prompts: string[],\n  concurrency = 5\n) {\n  const results: string[] = [];\n\n  for (let i = 0; i \u003C prompts.length; i += concurrency) {\n    const batch = prompts.slice(i, i + concurrency);\n    const batchResults = await Promise.all(\n      batch.map(prompt =>\n        cachedCompletion(\n          [{ role: 'user', content: prompt }],\n          'llama-3.1-8b-instant'\n        )\n      )\n    );\n    results.push(...batchResults);\n  }\n  return results;\n}\n```\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Rate limit 429 | Over RPM\u002FTPM quota | Use exponential backoff, batch requests |\n| High TTFT | Using 70b model | Switch to 8b-instant for latency-sensitive tasks |\n| Stream disconnect | Network timeout | Implement reconnection with partial response recovery |\n| Token overflow | max_tokens too high | Set conservative limits, truncate prompts |\n\n## Examples\n\n### Latency Benchmark\n```typescript\nasync function benchmarkModels(prompt: string) {\n  const models = ['llama-3.1-8b-instant', 'llama-3.3-70b-versatile'];\n\n  for (const model of models) {\n    const start = performance.now();\n    await groq.chat.completions.create({\n      model,\n      messages: [{ role: 'user', content: prompt }],\n      max_tokens: 100,\n    });\n    console.log(`${model}: ${(performance.now() - start).toFixed(0)}ms`);\n  }\n}\n```\n\n## Resources\n- [Groq API Documentation](https:\u002F\u002Fconsole.groq.com\u002Fdocs)\n- [Groq Rate Limits](https:\u002F\u002Fconsole.groq.com\u002Fdocs\u002Frate-limits)\n- [Groq Model Cards](https:\u002F\u002Fconsole.groq.com\u002Fdocs\u002Fmodels)\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","# Groq Performance Tuning\n\n## Overview\nMaximize Groq's ultra-low-latency LPU inference. Groq delivers sub-100ms token generation; tuning focuses on streaming efficiency, prompt caching, model selection for speed vs quality, and parallel request orchestration.\n\n## Prerequisites\n- Groq API key with rate limit awareness\n- `groq-sdk` npm package installed\n- Understanding of LLM token economics\n- Monitoring for TTFT (time to first token)\n\n## Instructions\n\n### Step 1: Select Optimal Model for Speed\n```typescript\nimport Groq from 'groq-sdk';\n\nconst groq = new Groq({ apiKey: process.env.GROQ_API_KEY });\n\n\u002F\u002F Model speed tiers (approximate TTFT):\n\u002F\u002F llama-3.3-70b-versatile: ~200ms TTFT, best quality\n\u002F\u002F llama-3.1-8b-instant:    ~80ms TTFT, fastest\n\u002F\u002F mixtral-8x7b-32768:      ~150ms TTFT, long context  # 32768 = configured value\n\nasync function fastCompletion(prompt: string) {\n  return groq.chat.completions.create({\n    model: 'llama-3.1-8b-instant', \u002F\u002F Fastest model\n    messages: [{ role: 'user', content: prompt }],\n    temperature: 0,       \u002F\u002F Deterministic = cacheable\n    max_tokens: 256,      \u002F\u002F Limit output for speed  # 256 bytes\n  });\n}\n```\n\n### Step 2: Streaming for Perceived Performance\n```typescript\nasync function streamCompletion(\n  messages: any[],\n  onToken: (token: string) => void\n) {\n  const stream = await groq.chat.completions.create({\n    model: 'llama-3.3-70b-versatile',\n    messages,\n    stream: true,\n    max_tokens: 1024,  # 1024: 1 KB\n  });\n\n  let fullResponse = '';\n  for await (const chunk of stream) {\n    const token = chunk.choices[0]?.delta?.content || '';\n    fullResponse += token;\n    onToken(token);\n  }\n  return fullResponse;\n}\n```\n\n### Step 3: Semantic Prompt Cache\n```typescript\nimport { LRUCache } from 'lru-cache';\nimport { createHash } from 'crypto';\n\nconst promptCache = new LRUCache\u003Cstring, string>({\n  max: 500,  # HTTP 500 Internal Server Error\n  ttl: 1000 * 60 * 10, \u002F\u002F 10 min for deterministic prompts  # 1000: 1 second in ms\n});\n\nfunction hashPrompt(messages: any[], model: string): string {\n  return createHash('sha256')\n    .update(JSON.stringify({ messages, model }))\n    .digest('hex');\n}\n\nasync function cachedCompletion(messages: any[], model: string) {\n  const key = hashPrompt(messages, model);\n  const cached = promptCache.get(key);\n  if (cached) return cached;\n\n  const response = await groq.chat.completions.create({\n    model,\n    messages,\n    temperature: 0,\n  });\n\n  const result = response.choices[0].message.content!;\n  promptCache.set(key, result);\n  return result;\n}\n```\n\n### Step 4: Parallel Request Orchestration\n```typescript\nasync function parallelCompletions(\n  prompts: string[],\n  concurrency = 5\n) {\n  const results: string[] = [];\n\n  for (let i = 0; i \u003C prompts.length; i += concurrency) {\n    const batch = prompts.slice(i, i + concurrency);\n    const batchResults = await Promise.all(\n      batch.map(prompt =>\n        cachedCompletion(\n          [{ role: 'user', content: prompt }],\n          'llama-3.1-8b-instant'\n        )\n      )\n    );\n    results.push(...batchResults);\n  }\n  return results;\n}\n```\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Rate limit 429 | Over RPM\u002FTPM quota | Use exponential backoff, batch requests |\n| High TTFT | Using 70b model | Switch to 8b-instant for latency-sensitive tasks |\n| Stream disconnect | Network timeout | Implement reconnection with partial response recovery |\n| Token overflow | max_tokens too high | Set conservative limits, truncate prompts |\n\n## Examples\n\n### Latency Benchmark\n```typescript\nasync function benchmarkModels(prompt: string) {\n  const models = ['llama-3.1-8b-instant', 'llama-3.3-70b-versatile'];\n\n  for (const model of models) {\n    const start = performance.now();\n    await groq.chat.completions.create({\n      model,\n      messages: [{ role: 'user', content: prompt }],\n      max_tokens: 100,\n    });\n    console.log(`${model}: ${(performance.now() - start).toFixed(0)}ms`);\n  }\n}\n```\n\n## Resources\n- [Groq API Documentation](https:\u002F\u002Fconsole.groq.com\u002Fdocs)\n- [Groq Rate Limits](https:\u002F\u002Fconsole.groq.com\u002Fdocs\u002Frate-limits)\n- [Groq Model Cards](https:\u002F\u002Fconsole.groq.com\u002Fdocs\u002Fmodels)\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",{"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 API performance with caching, batching, and connection pooling.\nUse when experiencing slow API responses, implementing caching strategies,\nor optimizing request throughput for Groq integrations.\nTrigger with phrases like \"groq performance\", \"optimize groq\",\n\"groq latency\", \"groq caching\", \"groq slow\", \"groq batch\".\n","Read, Write, Edit","claude-code, codex, openclaw","master","3f5d983eb4ef375b749adcd6b07ec03bd82ae8a8","claude-code\u002Fplugins-plus-skills\u002Fplugins\u002Fsaas-packs\u002Fgroq-pack\u002Fskills\u002Fgroq-performance-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-performance-tuning",{"tool":61,"command":62},"bunx","bunx skills add micsapp\u002Fmicstec-skills --skill groq-performance-tuning",{"tool":64,"command":65},"pnpm","pnpm dlx skills add micsapp\u002Fmicstec-skills --skill groq-performance-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fclaude-code\u002Fplugins-plus-skills\u002Fplugins\u002Fsaas-packs\u002Fgroq-pack\u002Fskills\u002Fgroq-performance-tuning\u002FSKILL.md",true,[],[70,104,132,152,172,197],{"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,101,23,102,103,24],"architecture","azure","azure apim architecture","component","authentication","gateway","topology","Optimization","network","team","environment","multi-environment","workspaces","instances","selection","azure api management","mode",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":118,"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",[110,111,114,117],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},{"categoryNo":112,"categoryName":113,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":115,"categoryName":116,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},[119,120,121,122,88,123,37,124,125,126,127,128,35,96,23,129,130,102,131,25],"deployment","apiops deployment","workflows","azure devops","infrastructure","infrastructure as code","actions","ci","github actions","github-actions","as","guides","CI\u002FCD",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":139,"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",[138],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},[140,141,142,143,88,91,35,96,144,33,145,146,147,148,149,102,150,151,25,24],"policy","authoring","apim policy authoring","security","access","ready","api security","Access Control","error","processing","cors configuration","production-ready",{"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":160,"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",[158,159],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},[161,143,162,35,146,163,88,119,164,165,166,167,96,168,102,169,170,171,103,24],"review","security review","api security review","benchmark","verification","owasp","owasp-api","alignment","azure security","reviews","top",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"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",[],[179,180,181,121,182,183,184,185,35,186,187,188,189,190,191,192,193,194,195,196],"cli","jira","jira cli","init","tasks","create","issues","common","work","command","edit","list","view","project","project work","token","line","sprints",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":203,"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",[],[199,204,205,206,207,208,209,33,210,211],"npm","js","calculate","node","math","user","compute","errors"]