Add llm-cost-optimization skill#287
Open
vikast908 wants to merge 1 commit into
Open
Conversation
Covers reducing runtime LLM token and dollar cost without lowering quality: measuring cost per request, caching the static prefix, windowing/summarizing history, narrow retrieval, capped/structured output, and model routing, with a Verification checklist. Distinct from context-engineering (agent session) and performance-optimization (web/latency), and references both rather than duplicating them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new
llm-cost-optimizationskill on cutting runtime LLM token and dollar cost without lowering output quality.Why
The repo has
context-engineering(the coding agent's own session) andperformance-optimization(web vitals and latency), but nothing on the API cost of the model calls a product makes at runtime. That cost is usually dominated by avoidable waste: a static system prompt resent uncached on every call, full history replayed each turn, whole documents stuffed into context, unbounded output, and a frontier model doing cheap work.What's in it
Conventions followed
name+descriptiononly; description leads with what it does, thenUse whentriggers.SKILL.md, no supporting files.context-engineeringandperformance-optimizationrather than duplicating them.Related: this pairs with my other PRs adding
reliable-agent-loops(#285) andevaluating-llm-output(#286). Happy to adjust naming, scope, or split anything.🤖 Generated with Claude Code