kiro-kmodel-calibrator

Recalibrates Kiro cache-estimation coefficients from recent successful usage samples.

2|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/zero-yx/static_flow --skill kiro-kmodel-calibrator-zero-yx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kiro-kmodel-calibrator
Source: https://github.com/zero-yx/static_flow/tree/main/skills/kiro-kmodel-calibrator
Command: npx skills add https://github.com/zero-yx/static_flow --skill kiro-kmodel-calibrator-zero-yx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Kiro cache-estimation coefficients (Kmodel) drift over time as pricing, multipliers, and usage patterns change, causing inaccurate conservative cache estimates. This Skill provides a reproducible offline process to recompute per-model Kmodel values from real usage data without touching production configuration. ## Core Features & Use Cases - Filtered Usage Sampling: Queries the LanceDB table llm_gateway_usage_events for successful Kiro requests from the last 30 days, excluding failed requests and missing credit data. - Statistical Coefficient Computation: Normalizes model aliases, applies sample-quality filters, and computes p50, p80, and p90 ratios per model, recommending p80 as the conservative Kmodel. - Safe Recommendation Output: Produces a report with sample counts, percentiles, and filter drop counts for manual review before updating /admin/kiro-gateway. - Use Case: When Kiro credit usage trends drift from current estimates, run this calibration to get data-backed per-model Kmodel recommendations, then manually apply them in the admin panel. ## Quick Start Recalibrate the Kiro Kmodel coefficients using the last 30 days of successful usage events and show me the recommended values per model.

Frequently Asked Questions about kiro-kmodel-calibrator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recalibrate Kiro Kmodel cache-estimation coefficients?▼

Query the llm_gateway_usage_events table for successful Kiro requests from the last 30 days, compute the ratio of credit_usage to (input tokens plus 5 times output tokens) per sample, then group by normalized model and take the p80 percentile as the recommended Kmodel.

What data is used for Kiro Kmodel calibration?▼

Calibration uses rows from the LanceDB table llm_gateway_usage_events where provider_type is kiro, status_code is 200, credit_usage is present, finite, and non-negative, and created_at falls within the last 30 days.

Why does the calibration use p80 instead of the median?▼

The p80 percentile is intentionally conservative: it reduces the chance of overstating cache_read_input_tokens in the runtime estimate. The p50 and p90 values are still reported so reviewers can judge the distribution.

Does this calibration update production Kiro settings automatically?▼

No. The output is a recommendation only. You must review sample quality and manually update the live values in the /admin/kiro-gateway admin page; the process never writes to LanceDB or admin config.

What happens when a Kiro model has too few usage samples?▼

The process explicitly reports that the model has insufficient samples instead of inventing a coefficient. It also never applies a single global coefficient across different models.