[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78Y3YDSJGF1VJQD01BNDPMC":3,"skill-same:01M78Y3YDSJGF1VJQD01BNDPMC":58},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M78Y3YDSJGF1VJQD01BNDPMC","clade-cost-tuning",null,"Optimize Anthropic API costs — model selection, prompt caching, batches,\nUse when working with cost-tuning patterns.\ntoken reduction, and usage monitoring.\nTrigger with \"anthropic pricing\", \"claude cost\", \"reduce anthropic spend\",\n\"anthropic billing\", \"claude cheaper\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--claude-pack--clade-cost-tuning\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: clade-cost-tuning\ndescription: |\n  Optimize Anthropic API costs — model selection, prompt caching, batches,\n  Use when working with cost-tuning patterns.\n  token reduction, and usage monitoring.\n  Trigger with \"anthropic pricing\", \"claude cost\", \"reduce anthropic spend\",\n  \"anthropic billing\", \"claude cheaper\".\nallowed-tools: Read, Write, Edit\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code\ntags: [saas, anthropic, claude, cost, pricing]\n---\n\n# Anthropic Cost Tuning\n\n## Overview\nAnthropic charges per token. Input tokens, output tokens, and cached tokens each have different prices. Here's how to minimize cost without losing quality.\n\n## Pricing (per million tokens)\n\n| Model | Input | Output | Cached Input | Batch Input | Batch Output |\n|-------|-------|--------|-------------|-------------|--------------|\n| Claude Opus 4 | $15.00 | $75.00 | $1.50 | $7.50 | $37.50 |\n| Claude Sonnet 4 | $3.00 | $15.00 | $0.30 | $1.50 | $7.50 |\n| Claude Haiku 4.5 | $0.80 | $4.00 | $0.08 | $0.40 | $2.00 |\n\n## Cost Reduction Strategies\n\n## Instructions\n\n### Step 1: Right-Size Your Model\n```typescript\n\u002F\u002F DON'T use Opus for everything\n\u002F\u002F DO match model to task complexity:\n\n\u002F\u002F Simple classification\u002Fextraction → Haiku (cheapest)\nconst category = await classify(text, 'claude-haiku-4-5-20251001');\n\n\u002F\u002F General coding\u002Fwriting → Sonnet (balanced)\nconst code = await generate(spec, 'claude-sonnet-4-20250514');\n\n\u002F\u002F Complex multi-step reasoning → Opus (best quality)\nconst analysis = await analyze(data, 'claude-opus-4-20250514');\n```\n\n### Step 2: Prompt Caching (90% off input tokens)\n```typescript\n\u002F\u002F Cache your system prompt — pays for itself after 2 calls\nconst message = await client.messages.create({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 1024,\n  system: [{\n    type: 'text',\n    text: longSystemPrompt, \u002F\u002F Must be 1024+ tokens\n    cache_control: { type: 'ephemeral' }, \u002F\u002F Cache for 5 minutes\n  }],\n  messages,\n}, {\n  headers: { 'claude-beta': 'prompt-caching-2024-07-31' },\n});\n\n\u002F\u002F First call: cache_creation_input_tokens charged at 1.25x\n\u002F\u002F Subsequent calls: cache_read_input_tokens charged at 0.1x (90% savings!)\n```\n\n### Step 3: Message Batches (50% off everything)\n```typescript\n\u002F\u002F For non-urgent work — 50% cheaper, 24h processing SLA\nconst batch = await client.messages.batches.create({\n  requests: prompts.map((p, i) => ({\n    custom_id: `job-${i}`,\n    params: {\n      model: 'claude-sonnet-4-20250514',\n      max_tokens: 1024,\n      messages: [{ role: 'user', content: p }],\n    },\n  })),\n});\n\u002F\u002F Sonnet: $1.50\u002F$7.50 per MTok instead of $3\u002F$15\n```\n\n### Step 4: Reduce Token Count\n```typescript\n\u002F\u002F Trim conversation history — keep system + last N turns\nfunction trimMessages(messages: MessageParam[], maxTurns = 10) {\n  if (messages.length \u003C= maxTurns * 2) return messages;\n  return messages.slice(-(maxTurns * 2));\n}\n\n\u002F\u002F Set tight max_tokens — don't pay for output you won't use\nconst message = await client.messages.create({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 256, \u002F\u002F Not 4096 if you only need a short answer\n  messages,\n});\n\n\u002F\u002F Use concise system prompts\nsystem: 'Reply in 1-2 sentences.' \u002F\u002F Not a 500-word personality description\n```\n\n### Step 5: Monitor Usage\n```typescript\n\u002F\u002F Log every call's cost\nfunction logUsage(message: Anthropic.Message) {\n  const { input_tokens, output_tokens } = message.usage;\n  const cost = (input_tokens * 3 + output_tokens * 15) \u002F 1_000_000; \u002F\u002F Sonnet pricing\n  console.log(`Tokens: ${input_tokens}in\u002F${output_tokens}out | Cost: $${cost.toFixed(4)}`);\n}\n```\n\n## Cost Comparison Example\nProcessing 10,000 documents (avg 500 tokens each, 200 token response):\n\n| Strategy | Input Cost | Output Cost | Total |\n|----------|-----------|-------------|-------|\n| Opus, no optimization | $75.00 | $150.00 | $225.00 |\n| Sonnet, no optimization | $15.00 | $30.00 | $45.00 |\n| Sonnet + Batches | $7.50 | $15.00 | $22.50 |\n| Haiku + Batches | $2.00 | $4.00 | $6.00 |\n| Haiku + Batches + Caching | ~$1.00 | $4.00 | ~$5.00 |\n\n## Output\n- Model selection optimized per task complexity (Haiku for simple, Sonnet for balanced, Opus for complex)\n- Prompt caching enabled for repeated system prompts\n- Batch processing configured for non-urgent workloads\n- Token usage logged with cost estimates per request\n- Spending alerts configured in Anthropic console\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| API Error | Check error type and status code | See `clade-common-errors` |\n\n## Examples\nSee Pricing table, five numbered strategy sections with code, and the Cost Comparison Example table showing savings from $225 to $5 for 10K documents.\n\n## Resources\n- [Pricing](https:\u002F\u002Fwww.anthropic.com\u002Fpricing)\n- [Prompt Caching](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fbuild-with-claude\u002Fprompt-caching)\n- [Message Batches](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fcreating-message-batches)\n- [Token Counting](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fcounting-tokens)\n\n## Next Steps\nSee `clade-performance-tuning` for latency optimization.\n\n## Prerequisites\n- Completed `clade-install-auth`\n- Active API usage to optimize\n- Access to Anthropic console for usage monitoring\n","# Anthropic Cost Tuning\n\n## Overview\nAnthropic charges per token. Input tokens, output tokens, and cached tokens each have different prices. Here's how to minimize cost without losing quality.\n\n## Pricing (per million tokens)\n\n| Model | Input | Output | Cached Input | Batch Input | Batch Output |\n|-------|-------|--------|-------------|-------------|--------------|\n| Claude Opus 4 | $15.00 | $75.00 | $1.50 | $7.50 | $37.50 |\n| Claude Sonnet 4 | $3.00 | $15.00 | $0.30 | $1.50 | $7.50 |\n| Claude Haiku 4.5 | $0.80 | $4.00 | $0.08 | $0.40 | $2.00 |\n\n## Cost Reduction Strategies\n\n## Instructions\n\n### Step 1: Right-Size Your Model\n```typescript\n\u002F\u002F DON'T use Opus for everything\n\u002F\u002F DO match model to task complexity:\n\n\u002F\u002F Simple classification\u002Fextraction → Haiku (cheapest)\nconst category = await classify(text, 'claude-haiku-4-5-20251001');\n\n\u002F\u002F General coding\u002Fwriting → Sonnet (balanced)\nconst code = await generate(spec, 'claude-sonnet-4-20250514');\n\n\u002F\u002F Complex multi-step reasoning → Opus (best quality)\nconst analysis = await analyze(data, 'claude-opus-4-20250514');\n```\n\n### Step 2: Prompt Caching (90% off input tokens)\n```typescript\n\u002F\u002F Cache your system prompt — pays for itself after 2 calls\nconst message = await client.messages.create({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 1024,\n  system: [{\n    type: 'text',\n    text: longSystemPrompt, \u002F\u002F Must be 1024+ tokens\n    cache_control: { type: 'ephemeral' }, \u002F\u002F Cache for 5 minutes\n  }],\n  messages,\n}, {\n  headers: { 'claude-beta': 'prompt-caching-2024-07-31' },\n});\n\n\u002F\u002F First call: cache_creation_input_tokens charged at 1.25x\n\u002F\u002F Subsequent calls: cache_read_input_tokens charged at 0.1x (90% savings!)\n```\n\n### Step 3: Message Batches (50% off everything)\n```typescript\n\u002F\u002F For non-urgent work — 50% cheaper, 24h processing SLA\nconst batch = await client.messages.batches.create({\n  requests: prompts.map((p, i) => ({\n    custom_id: `job-${i}`,\n    params: {\n      model: 'claude-sonnet-4-20250514',\n      max_tokens: 1024,\n      messages: [{ role: 'user', content: p }],\n    },\n  })),\n});\n\u002F\u002F Sonnet: $1.50\u002F$7.50 per MTok instead of $3\u002F$15\n```\n\n### Step 4: Reduce Token Count\n```typescript\n\u002F\u002F Trim conversation history — keep system + last N turns\nfunction trimMessages(messages: MessageParam[], maxTurns = 10) {\n  if (messages.length \u003C= maxTurns * 2) return messages;\n  return messages.slice(-(maxTurns * 2));\n}\n\n\u002F\u002F Set tight max_tokens — don't pay for output you won't use\nconst message = await client.messages.create({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 256, \u002F\u002F Not 4096 if you only need a short answer\n  messages,\n});\n\n\u002F\u002F Use concise system prompts\nsystem: 'Reply in 1-2 sentences.' \u002F\u002F Not a 500-word personality description\n```\n\n### Step 5: Monitor Usage\n```typescript\n\u002F\u002F Log every call's cost\nfunction logUsage(message: Anthropic.Message) {\n  const { input_tokens, output_tokens } = message.usage;\n  const cost = (input_tokens * 3 + output_tokens * 15) \u002F 1_000_000; \u002F\u002F Sonnet pricing\n  console.log(`Tokens: ${input_tokens}in\u002F${output_tokens}out | Cost: $${cost.toFixed(4)}`);\n}\n```\n\n## Cost Comparison Example\nProcessing 10,000 documents (avg 500 tokens each, 200 token response):\n\n| Strategy | Input Cost | Output Cost | Total |\n|----------|-----------|-------------|-------|\n| Opus, no optimization | $75.00 | $150.00 | $225.00 |\n| Sonnet, no optimization | $15.00 | $30.00 | $45.00 |\n| Sonnet + Batches | $7.50 | $15.00 | $22.50 |\n| Haiku + Batches | $2.00 | $4.00 | $6.00 |\n| Haiku + Batches + Caching | ~$1.00 | $4.00 | ~$5.00 |\n\n## Output\n- Model selection optimized per task complexity (Haiku for simple, Sonnet for balanced, Opus for complex)\n- Prompt caching enabled for repeated system prompts\n- Batch processing configured for non-urgent workloads\n- Token usage logged with cost estimates per request\n- Spending alerts configured in Anthropic console\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| API Error | Check error type and status code | See `clade-common-errors` |\n\n## Examples\nSee Pricing table, five numbered strategy sections with code, and the Cost Comparison Example table showing savings from $225 to $5 for 10K documents.\n\n## Resources\n- [Pricing](https:\u002F\u002Fwww.anthropic.com\u002Fpricing)\n- [Prompt Caching](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fbuild-with-claude\u002Fprompt-caching)\n- [Message Batches](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fcreating-message-batches)\n- [Token Counting](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fcounting-tokens)\n\n## Next Steps\nSee `clade-performance-tuning` for latency optimization.\n\n## Prerequisites\n- Completed `clade-install-auth`\n- Active API usage to optimize\n- Access to Anthropic console for usage monitoring\n",{"name":5,"tags":24,"author":30,"license":15,"version":31,"description":32,"allowed-tools":33,"compatible-with":34},[25,26,27,28,29],"saas","anthropic","claude","cost","pricing","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Optimize Anthropic API costs — model selection, prompt caching, batches,\nUse when working with cost-tuning patterns.\ntoken reduction, and usage monitoring.\nTrigger with \"anthropic pricing\", \"claude cost\", \"reduce anthropic spend\",\n\"anthropic billing\", \"claude cheaper\".\n","Read, Write, Edit","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--claude-pack--clade-cost-tuning",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill clade-cost-tuning",{"tool":50,"command":51},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill clade-cost-tuning",{"tool":53,"command":54},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill clade-cost-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--claude-pack--clade-cost-tuning\u002FSKILL.md",true,[],[59,66,73,80,87,95],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]