zero-yx/static_flow / skills/kiro-kmodel-calibrator
kiro-kmodel-calibrator
VerifiedUse when recalibrating conservative Kiro cache-estimation coefficients from recent successful usage samples before updating admin Kmodel settings.
Kiro Kmodel Calibrator
Overview
This skill defines the reproducible offline process for recomputing per-model
Kmodel coefficients used by StaticFlow's conservative Kiro cache estimate.
The output is a recommendation, not a production write. Update the live values
manually in /admin/kiro-gateway after reviewing the sample quality.
When to Use
- Kiro model pricing or multiplier guidance changed
- Recent Kiro credit usage trends drifted away from current estimates
- A new Kiro model needs a default
Kmodel
Do not use this skill to mutate production config automatically.
Data Scope
Query the content DB table llm_gateway_usage_events under the canonical root:
/mnt/wsl/data4tb/static-flow-data/lancedb
Use only rows matching all of these conditions:
provider_type = "kiro"status_code = 200credit_usage_missing = falsecredit_usageis finite and>= 0created_atis within the last 30 days
Historical note:
- For Kiro calibration, existing
input_uncached_tokensshould be treated as the historical total input token estimate for that request.
Model Normalization
Normalize aliases before bucketing:
claude-opus-4.6 -> claude-opus-4-6
Keep all other model names unchanged.
Formula
For each sample, define:
Tin = input_uncached_tokensTout = output_tokensCobs = credit_usage
Drop samples where:
Tin <= 0Tout < 0Tin > 200_000Tin + 5 * Tout <= 0
Then compute:
ratio = Cobs / (Tin + 5 * Tout)
Group by normalized model name and compute:
- sample count
p50p80p90
Recommended runtime coefficient:
Kmodel = p80
p80 is intentionally conservative: it reduces the chance of overstating
cache_read_input_tokens.
Output Contract
For each model, report:
- normalized model name
- sample count
p50p80p90- recommended
Kmodel
Also report:
- date window used
- filters applied
- rows dropped by each filter if available
Guardrails
- Do not auto-write the result into LanceDB or admin config
- Do not mix failed requests into calibration
- Do not use a single global coefficient across models
- If a model has too few samples, say so explicitly instead of inventing a value
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |