Skip to content

feat: add /ai-cost skill — AI spend optimizer#174

Open
HMAKT99 wants to merge 1 commit intogarrytan:mainfrom
HMAKT99:arun/ai-cost-skill
Open

feat: add /ai-cost skill — AI spend optimizer#174
HMAKT99 wants to merge 1 commit intogarrytan:mainfrom
HMAKT99:arun/ai-cost-skill

Conversation

@HMAKT99
Copy link

@HMAKT99 HMAKT99 commented Mar 18, 2026

You're spending $3K/month on AI APIs. You could spend $800.

Most teams use Opus for everything when Haiku handles 80% of tasks. Identical prompts hit the API 100 times a day with no caching. System prompts carry 1,500 tokens that could be 400. Nobody tracks cost-per-feature.

What /ai-cost does

You:   /ai-cost

Claude: MODEL SELECTION AUDIT
        ═══════════════════════
        Location         Current Model     Task             Recommended    Savings
        chat.rb:45      claude-opus-4-6    Simple Q&A       haiku-4-5      ~90% ←
        summarize.ts    claude-opus-4-6    Summarization    sonnet-4-6     ~60%
        classify.py     claude-sonnet-4-6  Classification   haiku-4-5      ~80% ←

        Current: ~$3,200/month → After: ~$800/month (75% savings)

        CACHING OPPORTUNITIES:
        Classification   60% cache hit rate   → save $150/month (Redis, 1hr TTL)
        FAQ responses    80% cache hit rate   → save $200/month (Redis, 1hr TTL)

        COST PER FEATURE:
        AI Chat         $1,350/month   $0.135/user
        Auto-classify   $360/month     $0.036/user
        Summarization   $810/month     $0.081/user

Why this matters for gstack teams

Teams shipping 10K LOC/day are also shipping AI features. The AI API bill is the fastest-growing line item — and nobody has visibility into what's driving it. /ai-cost gives you the same structured analysis that /retro gives your engineering velocity.

Only .tmpl committed — bun run gen:skill-docs generates the rest.

Test plan

  • .tmpl follows template pipeline — uses {{PREAMBLE}}
  • Registered in gen-skill-docs.ts, skill-check.ts, both test files
  • bun run gen:skill-docs generates valid SKILL.md
  • All existing tests pass with skill added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant