kiro-usage-day-report

Aggregates one China-time day's Kiro credit usage from LanceDB usage events.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lancedb, and includes scripts (resource) components.

What problem does it solve? Answering questions like "how many Kiro credits were used yesterday in China time" requires querying the llm_gateway_usage_events LanceDB table, but LanceDB's query layer cannot reliably run aggregate expressions like sum(credit_usage). This Skill fetches the filtered rows and aggregates them locally in Python, producing accurate daily totals and per-account breakdowns. ## Core Features & Use Cases - Daily Credit Totals: Computes the global Kiro credit total for one Asia/Shanghai calendar day using a half-open time window. - Account Subset Breakdowns: Filters accounts by case-insensitive name substrings plus user-specified exact account names, with per-account totals and explicit reporting of exact accounts with zero usage. - Missing-Metering Awareness: Detects rows with missing credit_usage and reports totals as lower bounds instead of silently treating them as zero. - Use Case: Ask "昨天中国时间 Kiro 用了多少积分?账号名包含 laohan 的号用了多少?再把 KitWilliam 也算进去" and get the global total, subset total, and per-account breakdown in one report. ## Quick Start Use the kiro-usage-day-report skill to total yesterday's Kiro credits in China time and break down accounts containing laohan plus the exact account KitWilliam.

Frequently Asked Questions about kiro-usage-day-report

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

FAQPage Schema
How do I total Kiro credit usage for one day from LanceDB?▼

Run the bundled Python script with --date in YYYY-MM-DD format. It filters llm_gateway_usage_events by provider_type = 'kiro' and the China-time day window, then sums credit_usage locally in Python since LanceDB aggregate expressions are unreliable.

How to filter LanceDB usage rows by account name substring?▼

Pass one or more --contains arguments to the script for case-insensitive substring matching on account_name. You can also add --account flags for exact account names that should be included even when they do not match the substring.

Why is the Kiro credit total reported as a lower bound?▼

Rows with credit_usage_missing = true or null credit_usage have no upstream metering data. When such rows exist, the summed total only covers metered rows, so the script reports it as >= value instead of an exact figure.

Does the report handle timezones for daily usage queries?▼

Yes, the requested date is interpreted in Asia/Shanghai and converted to a half-open window [00:00:00, next day 00:00:00), then translated to UTC timestamps for the LanceDB filter. The output shows both the China-time and UTC windows.

Can I get the Kiro usage report as JSON?▼

Yes, pass --format json to the script. The JSON output includes the time window, provider-day totals, row counts, missing-credit row counts, and a selection object with per-account breakdowns and zero-usage exact accounts.