Skip to content

Sathvikar01/Agent-engineering-skills / agent-cost-and-latency

agent-cost-and-latency

Verified

Optimize AI-system cost and latency per verified successful outcome using measured budgets. Use when profiling model/tool/retrieval spend or delays, setting agent run ceilings, choosing model routing/escalation, caching, batching or parallelism under quality constraints. Do not use for general application performance without model/agent costs, speculative model recommendations, or reducing tokens without outcome measurements.

FileKindSize
SKILL.mdskill md4.5 KB
evals/evals.jsonconfig5.4 KB
evals/trigger-evals.jsonconfig4.9 KB
references/cost-comparison.mdmarkdown1.6 KB

references/cost-comparison.md

View on GitHub
# Cost per outcome

Variant A: total spend 20, verified successes 80/100 → 0.25 per successful task. Variant B: total spend 12, successes 40/100 → 0.30 per success. B's smaller bill is not better outcome economics and its lower success rate may violate quality requirements. Include all failures, retries, escalation, worker overhead and relevant cache costs in total spend. Zero successes makes this ratio undefined.

Track safe abstentions and task mix separately so a system cannot make its metric look better by refusing hard tasks or redefining eligibility after measurement. Include denominators and predefined quality/safety floors. Report user-facing p95 completion latency and interactive first-response latency separately when they differ materially.

For a routing experiment, compare direct larger-model execution to smaller→larger fallback using actual route frequency, quality and total spend. A confidence score alone is not a calibrated escalation policy. Freeze the route definition and test difficult cases and provider errors.

For caching, include tenant/principal access, canonical input, model/prompt/schema/tool/index versions and freshness in the key. A permission revocation must prevent a previously cached disclosure. Do not cache approval as authority. Distinguish warm and cold measurements and provider cache creation/read charges.

Measure the critical path before parallelizing. Independent reads may overlap; dependent mutations still require ordered admission/version checks. Atomic aggregate budget reservation prevents each worker consuming the entire nominal run cap. Resume preserves expenditure and remaining ceilings.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall