api-cost-review
/api-cost-review
Przegląda kod wywołujący API Claude pod kątem oszczędności tokenów i kosztów: cache'owania, wsadów, wyboru modelu i limitów wyjścia.
- Autor
- niiashikwei ↗
- Repozytorium
- wit ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 13.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Przegląda kod wywołujący API Claude pod kątem oszczędności tokenów i kosztów: cache'owania, wsadów, wyboru modelu i limitów wyjścia.
Oryginalny opis (EN)
Review application code that calls the Claude API / Anthropic SDK for token and cost optimizations (prompt caching, batching, model routing, output limits). Use when the user asks to cut API cost or review LLM call sites.
Jak działa
SKILL.md bez nagłówków drugiego poziomu · 12 linii, 178 słów
Podgląd SKILL.md
--- name: api-cost-review description: Review application code that calls the Claude API / Anthropic SDK for token and cost optimizations (prompt caching, batching, model routing, output limits). Use when the user asks to cut API cost or review LLM call sites. --- # Claude API cost review 1. Find call sites: `rg -n "messages\.create|messages\.stream|batches\.create|cache_control|max_tokens|model=" --glob '!**/node_modules/**'`. 2. For each call site, check (cite `path:line`): - **Caching**: is a stable prefix (tools → system → reference docs → few-shot) marked with `cache_control`? Are volatile values (timestamps, IDs, user names) placed *after* it? Any per-request change in the system prompt breaks the cache. - **Batch**: is this offline/non-interactive work (evals, backfills, classification, nightly jobs)? Then the Message Batches API is ~50% cheaper. - **Model routing**: is a large model doing classification/extraction/routing that a smaller one could do? Suggest a cheap-first, escalate-on-low-confidence pattern. - **Output**: is `max_tokens` sized to need? Is structured output / a JSON schema used instead of prose? Is extended thinking budget tuned per task? - **Context**: are whole documents or full histories resent where retrieval, summaries, or context editing would do? Are tool results trimmed? - **Measurement**: is `response.usage` (incl. `cache_read_input_tokens`) logged? 3. Report a table: location, issue, fix, rough saving. Check current pricing/caching rules with the `claude-api` skill if it is available rather than quoting numbers from memory.
Wersje
W bazie nie ma innych skilli o nazwie api-cost-review.
Migawka bazy z 13.11.2026 · wersja paczki bf50e08fe7f0 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 2 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100anth-cost-tuning
Optymalizuje koszty Claude API przez routing modeli, prompt caching, batching, monitoring wydatków i alerty budżetowe. - 100llm-cost-optimization
Obniża koszt funkcji opartej na LLM: cache promptów, redukcja kontekstu, routing modeli, batching, limity wyjścia i znajdowanie, gdzie naprawdę idą tokeny. - 100claude-api-ops
Obsługuje budowę aplikacji na Claude: API Anthropic i Claude Agent SDK, w tym tool use, prompt caching, structured output, Batches API, extended thinking, streaming i liczenie tokenów. - 100claude-api
Buduje, debuguje i optymalizuje aplikacje z Claude API i Anthropic SDK, z prompt caching, oraz migruje kod między wersjami modeli Claude, np. z 4.5 na 4.6 i 4.6 na 4.7. - 82claude-api
Opisuje API Claude i SDK Anthropic: identyfikatory modeli, ceny, parametry, strumieniowanie, narzędzia, MCP, cache, liczenie tokenów i migrację modeli. - 100llm-cost-latency
Obniża koszt i opóźnienia LLM przez cache, dobór poziomu modelu, skracanie promptów, batching i strumieniowanie w interfejsie.