Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/astra-sh/qvr/optimize-skill-loopnpx skills add astra-sh/qvr --skill optimize-skill-loopgit clone --depth 1 https://github.com/astra-sh/qvrWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00144 | $0.05707 |
| Opus 5 | $0.00072 | $0.02854 |
| Sonnet 5 | $0.00029 | $0.01141 |
| Haiku 4.5 | $0.00014 | $0.00571 |
Grade A, and why
optimize-skill-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 396 lines — stays where its author put it; the contents beside it link to each section on GitHub.
optimize-skill-loop
A deterministic harness for improving one inner skill on a feedback loop.
- You (the agent) are the outer loop — the brain, the judge.
- qvr is the ledger and the session bookkeeper — it spawns nothing, but as of
0.30.x it derives clean per-agent spans for every agent (claude, codex, …),
so it captures every fresh headless run, owns its session id, attributes it
to the skill content version (
subtree_hash), records its cost, and buckets the cohorts. You no longer mint run-keys or correlate session ids — that whole layer is gone; a naked headless run is fully attributed by qvr. - The inner loop is fresh, no-leak headless agents (
claude -p,codex,cursor,gemini, …) — each one a clean process running the inner skill on a fixed scenario, so no cross-run context bleeds the comparison.
What the loop still owns (qvr can't infer it): the version tag it ran (set via
qvr switchbefore the cohort) — the candidate's identity, and the key quality joins on. That is all. The runner records no session id, no timing, no window: qvr stamps every session with the skill content version it ran (subtree_hash), so the grader attributes a cohort's ledger sessions by skill identity, not by a wall-clock window. The outer loop does only evals + candidate generation; every bit of session/cost/attribution bookkeeping is qvr's.
The whole point of this skill over an ad-hoc loop is determinism: the grader is frozen before the loop starts and never moves, so every cohort is judged by the identical yardstick. You only ever change the inner skill — never the rubric, never the evaluator, never the scenarios.
This skill sits downstream of an eval source, and is source-agnostic. It does
not author the eval or define how a run is graded. The contract it consumes is
one line: a run is a qvr session; an eval source is anything that turns each
session into metrics ∈[0,1]. Any upstream source that (1) freezes an eval which
rides the skill's qvr version and (2) maps each cohort run → metrics plugs in
unchanged — the native one is create-skill-eval, but a foreign runner that
already emits per-run scores conforms by normalizing them into the same rows. The
loop consumes that normalized cohort, joins it to the ledger by the version it
switched to, and owns only the outer machinery. The full seam — the qvr-ledger
spine, the session → metrics row schema, and the adapter interface — is in
references/eval-source-boundary.md.
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 396 lines · 144 tokens per session scan A ba42c9bb190d
optimize-skill-loop is a skill published in the GitHub repository astra-sh/qvr (23 stars, last pushed 2mo ago), licensed MIT. It adds 144 tokens to every session and 5,707 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
macos-swiftui-patterns
Build macOS SwiftUI scenes and components with desktop patterns. Use when shaping windows, commands, toolbars, settings, split views, or inspectors.
build-and-run-macos-app
Slash command that creates or updates the project-local macOS script/buildandrun.sh and uses it as the default build/run entrypoint. Invoke explicitly with /build-and-run-macos-app — this skill never self-triggers.
macos-test-triage
Triage macOS tests across Xcode and SwiftPM. Use when narrowing failures, explaining assertions or crashes, or separating setup from regressions.
macos-packaging-notarization
Prepare macOS packaging and notarization workflows. Use when archiving apps, validating bundles, or explaining distribution-only failures.
macos-swiftpm
Build, run, and test SwiftPM macOS packages and executables. Use when the repo is package-first or has no Xcode project.
fix-codesign-error
Slash command that inspects a macOS signing or entitlement failure and explains the minimum fix path. Invoke explicitly with /fix-codesign-error — this skill never self-triggers.