efficiency-review
БесплатноЗапускает вложенные скриптыНе проверенWeekly cross-pillar review of a deployment: cost, speed and answer quality joined on the turn, so an efficiency is a gain on one pillar that costs the others…
от Boise-State-Development★ 22 звезды на GitHubОб этом скилле
Efficiency review
Three pillars, one unit. Cost, speed and quality are each measured somewhere already; this skill joins them on the turn and slices by model, release, model calls per turn, tool, surface and documents. A win on one pillar that costs another is a trade, not an efficiency, so every candidate is reported against all three.
scripts/efficiency_review.py: builds every table and the mechanical leads. Stdlib only, run withpython3 -I.docs/efficiency-reviews/<end date>.jsonand.md: one pair per run. The newest.jsonis the next run's--previous.
It sits beside two other readers and does not replace them:
| Question | Reader |
|---|---|
| Did this release regress? | /release-readout (release ledger, candidate vs baseline) |
| What kind of usage carries the spend? | /usage-patterns-dashboard (patterns × cost mechanism) |
| Where can we gain on one pillar without paying on another? | this skill |
0. Settle the inputs
| Input | Default | Notes |
|---|---|---|
| AWS profile and table prefix | ask | The deployment's read-only profile (memory may name it); <prefix>-sessions-metadata |
| Window | 28 days ending today (UTC) | The headline compares the last 7 days with the 7 before; the tables use all 28 so the floors clear |
Work in a fresh scratchpad directory: RAW=<scratch>/eff/raw, OUT=<scratch>/eff/out.
Raw scans stay there. Never copy them, or any id from them, into the repo.
1. Pull the data (read-only)
Run each command on one line. A prod read-only guard may refuse multi-line
commands and any scripting runtime on a line that names the prod profile. The
projections are the privacy boundary: never add title, displayText,
citations, fileName or any message field.
aws dynamodb scan --profile <PROFILE> --table-name <PREFIX>-sessions-metadata --filter-expression "(begins_with(SK, :c) AND #t >= :d) OR (begins_with(SK, :f) AND updatedAt >= :d)" --projection-expression "sessionId,userId,#t,messageId,#c,tokenUsage,modelInfo.modelId,latency,cacheStatus,cacheGapSeconds,wastedUsd,toolCalls,outputChars,hasDocuments,turnDurationMs,compactionEvents,turnAgentId,projectId,agentSwitched,modelSwitched,rewound,outcome,emptyAnswer,appVersion,callKind,usageEstimated,#v,reason,retryMessageId,#s,#k,#n,updatedAt" --expression-attribute-names '{"#t":"timestamp","#c":"cost","#v":"value","#n":"count","#s":"signal","#k":"kind"}' --expression-attribute-values '{":c":{"S":"C#"},":f":{"S":"F#"},":d":{"S":"<START>"}}' --output json > $RAW/rows.json
One pass returns two row families: C# cost rows and F# feedback rows
(thumbs, and the implicit copy / continue signals, which have no fleet
index and so are only reachable by a scan). A thumb's reason is a fixed
code, never text. signal, kind, count and value are DynamoDB reserved
words, hence the aliases.
The scan grows with traffic (about 250 MB for 80K calls); run it in the
background with a 10-minute timeout. If /usage-patterns-dashboard ran today,
its scan lacks latency, outputChars and the feedback rows; scan again.
Eval runs, from the deployment the eval harness publishes to (dev: profile
dev-ai, prefix dev-boisestateai-v2). A small query; skip it only if that
deployment is unreachable, and say so in the report:
aws dynamodb query --profile <DEV PROFILE> --table-name <DEV PREFIX>-system-cost-rollup --key-condition-expression "PK = :p AND SK >= :d" --projection-expression "SK,modelId,track,k,gateFailed,families,efficiency,appVersion" --expression-attribute-values '{":p":{"S":"LEDGER#EVAL"},":d":{"S":"<START>"}}' --output json > $RAW/evals.json
2. Build
python3 -I .claude/skills/efficiency-review/scripts/efficiency_review.py --rows $RAW/rows.json --evals $RAW/evals.json --window-start <START> --window-end <END> --previous docs/efficiency-reviews/<previous end>.json --out $OUT
Omit --previous on a first run. It prints review.md; summary.json holds
the same numbers. Neither carries a session or user id.
3. Read it, in this order
- Coverage. Each line is the share of turns that carry a signal. A pillar
whose coverage is low cannot rank anything: say so instead of ranking on it.
A
—is under the floor of 20 and is no evidence, never zero. - Week over week. A move of 10% or more is a lead, not a finding. Check the model mix and the turn count before believing it.
- The joins. These are where an efficiency shows:
- By model calls per turn and by turn length: where time and cost concentrate together.
- Tool turns, with and without an error: the gap is an upper bound. Long loops have more chances to fail, so never claim the whole difference.
- By model: cost per turn beside turn time and completion. A cheaper, faster model is an efficiency only where quality holds, which needs the eval harness, not this table.
- Tools: a tool's turn cost is the cost of turns that used it, not the cost it caused. Where
Установить efficiency-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл efficiency-review?
Weekly cross-pillar review of a deployment: cost, speed and answer quality joined on the turn, so an efficiency is a gain on one pillar that costs the others nothing. Scans the per-call cost rows and feedback rows (read-only, content-free), runs scripts/efficiency_review.py, compares the last 7 days with the 7 before and with the previous run, and ends in a short ranked list of candidates with what each does to all three pillars. Use when the user says "efficiency review", "weekly efficiency", "find efficiencies", "where are we wasting time or money", "cost, speed and quality this week", or wants to repeat the cross-pillar analysis.
Как установить скилл efficiency-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл efficiency-review запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic