Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Route coding work so GPT-5.6 Sol remains the commander and reviewer while a separate GPT-5.6 Luna Max Codex CLI session performs concrete implementation. Use when the user asks for Sol to direct, plan, supervise, or review work done by Luna Max; when native Sol-to-Luna subagent spawning is unavailable or incompatible; or when a task needs an auditable plan, bounded worker ownership, verification, and review loop.
.claude/skills/majiayu000-sol-luna-router/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 191% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 143% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 75% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 216% | 0% |
| case-20 | ✓→✗ | ▼ Worse | 363% | 0% |
Keep Sol responsible for decisions and final verification. Use Luna Max for one bounded implementation or read-only investigation. Use the bundled runner instead of native spawn_agent; current Sol and Luna releases can select different multi-agent backends.
this thread.
to Luna Max.
gpt-5.6-luna with reasoning effort max.use isolated worktrees with explicit, disjoint file ownership.
credential, or secret-handling flags.
command an explicit bound before launch.
launch one bounded worker, collect one result, and combine independent verification commands into the smallest safe check. Resume only from concrete failed evidence.
AGENTS.md files and repository verification commands.verification commands.
Select implementation for edits and focused tests (workspace-write, 1800s default). Select bounded-review for investigation (read-only, 900s, at most 8 commands, no full suites).
Use bounded-review whenever repository mutation is not the deliverable. It instructs Luna to return broader checks as requires_commander_verification; Sol decides whether to run them later. The runner also disables Python bytecode writes and redirects common Python, Rust, Go, Node, Ruff, and mypy caches to temporary storage for the duration of the worker.
Write a temporary UTF-8 task file outside the target repository. Include only task-local context:
textRole: implementation worker. Objective: <one bounded outcome> Target repository: <absolute path> Allowed files: <explicit paths or one narrow subtree> Do not touch: <user changes and out-of-scope paths> Constraints: <applicable requirements> Reproduction or evidence: <fresh evidence> Command budget: <count, per-command limit, and forbidden broad suites> Done when: <observable conditions> Verification: <repository commands to run> Return: root cause, changed files, commands with outcomes, and remaining risks.
Do not leak an intended patch or diagnosis when Luna must independently determine the root cause.
For implementation, run the bundled script with an absolute target directory and task-file path:
bashpython3 <skill-dir>/scripts/run_luna_worker.py run \ --cwd /absolute/path/to/repo \ --prompt-file /absolute/path/to/task.md \ --sandbox workspace-write
For review or diagnosis, add --profile bounded-review to use the budgeted read-only profile.
The script fixes new and resumed workers to gpt-5.6-luna with model_reasoning_effort="max", disables native multi-agent tools for the worker, invokes Codex without a shell, and returns one JSON object containing thread_id, final_response, usage, profile, sandbox, duration, and repository metadata.
Every invocation also appends one privacy-safe record to $CODEX_HOME/state/sol-luna-router/runs.jsonl (normally under ~/.codex). It captures the commander session ID, Luna thread ID, token usage, duration, profile, warnings or failure class, and a prompt fingerprint, but not prompt text, final response text, or raw errors. The current Codex session is detected from CODEX_THREAD_ID; use --parent-session-id only when an explicit override is required. Use --run-log to select another absolute ledger or --no-run-log for an intentional one-off opt-out. A ledger write failure is reported without discarding a successful worker result. Read references/run-log.md before analyzing or exporting the ledger.
Use --allow-non-git only when the user explicitly wants work outside a Git repository. Raw events are off by default because they can contain task and answer content. Use --events-file /absolute/path/events.jsonl only when a durable raw trace is explicitly needed. The path must be absolute and new; the runner writes mode-0600 JSONL there while Luna runs and emits a heartbeat to stderr every 30 seconds.
requires_commander_verification; never weaken tests.run_id returned under telemetry:bashpython3 <skill-dir>/scripts/run_luna_worker.py annotate \ --run-id <run_id> \ --outcome verified \ --checks-passed <count> \ --checks-failed 0
Use needs_correction, blocked, or rejected instead when that is the evidence-backed result. verified requires at least one fresh passing check and no failed checks. The annotation is append-only and contains no free-text notes. Summarize accumulated reliability, quality, and cost:
bashpython3 <skill-dir>/scripts/analyze_run_log.py --format json
Treat the report as observational evidence. Its token totals cover Luna only, not the Sol commander. Use comparable task cohorts or controlled A/B benchmarks that include both agents before claiming that routing caused an efficiency improvement.
When evaluating router effectiveness, read the 2026-08-12 transport-warning benchmark and its machine-checkable record for measured scope, arithmetic, and claim limits.
Credit estimation is opt-in. Without --rate-card, the analyzer does not estimate credits and keeps the existing token-only report behavior. The bundled card is a dated benchmark assumption, not current pricing:
bashpython3 <skill-dir>/scripts/analyze_run_log.py \ --run-log /absolute/private/runs.jsonl \ --rate-card <skill-dir>/references/rate-card-2026-08-05.json \ --format json
The card calculates Luna worker credits from input_tokens, cached_input_tokens, and output_tokens; input_tokens includes cached input, so uncached input is the difference. Every run, including failed runs, is costed when it has exact valid usage. Missing usage is unresolved rather than zero; malformed, negative, or inconsistent supplied usage is excluded and reported as unresolved. Worker-only normalized metrics are null when worker usage coverage is incomplete. gpt-5.6-luna remains fixed at max reasoning; the estimate does not change routing or reasoning.
Joining Sol commander usage is a separate explicit opt-in and reads only parent IDs already present in the ledger:
bashpython3 <skill-dir>/scripts/analyze_run_log.py \ --run-log /absolute/private/runs.jsonl \ --rate-card <skill-dir>/references/rate-card-2026-08-05.json \ --codex-sessions-root /absolute/private/.codex/sessions \ --format json
The join reads only session metadata, token-count event timestamps/types, and cumulative token usage. For the union of each parent’s merged run windows, it subtracts the last snapshot at or before each window start from the first snapshot at or after its end. It never copies prompt, response, or raw event text into the report or ledger. Sol preflight before the first run start and work after the last run completion are outside this attribution window. Shared parent windows are charged once; missing baselines/endpoints, counter resets, malformed data, missing sessions, and ambiguous files remain visible as unresolved coverage. Resolved partial commander components may be shown, but commander-plus-worker totals and total-scope normalized metrics are null until every required parent window resolves. A complete total additionally requires every ledger run to have valid worker usage; commander-window coverage alone is insufficient. The runner preserves exact usage on failed Codex exits or failed turns when Codex emitted it, but absent usage remains unresolved. The normalized credit metrics are observational cost-per-outcome measures; controlled A/B remains the causal total-cost proof.
When verification or Sol review finds an actionable defect, write a new temporary prompt containing the exact failure evidence. Annotate the original run as needs_correction, then resume the same worker thread:
bashpython3 <skill-dir>/scripts/run_luna_worker.py resume \ --cwd /absolute/path/to/repo \ --thread-id <thread_id> \ --prompt-file /absolute/path/to/correction.md \ --profile <original-profile>
The resume command reasserts Luna, Max reasoning, disabled native agents, and the selected sandbox; it does not rely on the historical thread configuration. Repeat verification after every correction. Do not open a new worker thread unless the previous thread is unavailable or the task has materially changed.
thread_id and events path; resume with a smaller prompt, or treat a run without a thread ID as unrecoverable.capacity_exhausted as infrastructure capacity, not task quality; never lower Luna effort automatically.turn.failed, missing completion, or missing final response as failure; recovered transport errors remain warnings.require commander evaluations with fresh check evidence and report the sample size.
bounded-review requests or starts an unbudgeted full suite, stop the run and tighten thetask instead of increasing its timeout.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 5,491 | 10,821 | +97% | 1 | 1 | 0% | 370 | 3,209 | +767% | 0 | 0 | — |
case-02 | fail→fail | 4,773 | 6,784 | +42% | 1 | 1 | 0% | 321 | 3,282 | +922% | 0 | 0 | — |
case-03 | fail→fail | 7,355 | 9,673 | +32% | 1 | 1 | 0% | 617 | 3,386 | +449% | 0 | 0 | — |
case-17 | pass→pass | 8,960 | 3,013 | -66% | 1 | 1 | 0% | 1,405 | 3,209 | +128% | 0 | 0 | — |
case-18 | pass→pass | 10,779 | 3,543 | -67% | 1 | 1 | 0% | 1,597 | 3,334 | +109% | 0 | 0 | — |
case-04 | fail→fail | 7,276 | 5,721 | -21% | 1 | 1 | 0% | 1,247 | 3,090 | +148% | 0 | 0 | — |
case-05 | fail→fail | 6,833 | 6,505 | -5% | 1 | 1 | 0% | 1,190 | 3,125 | +163% | 0 | 0 | — |
case-06 | fail→fail | 11,472 | 5,619 | -51% | 1 | 1 | 0% | 1,230 | 3,081 | +150% | 0 | 0 | — |
case-07 | fail→fail | 4,801 | 10,394 | +116% | 1 | 1 | 0% | 236 | 3,473 | +1372% | 0 | 0 | — |
case-08 | fail→pass | 8,384 | 3,592 | -57% | 1 | 1 | 0% | 1,171 | 3,403 | +191% | 0 | 0 | — |
case-09 | fail→fail | 4,906 | 7,450 | +52% | 1 | 1 | 0% | 211 | 3,258 | +1444% | 0 | 0 | — |
case-10 | fail→fail | 11,178 | 7,313 | -35% | 1 | 1 | 0% | 1,328 | 3,120 | +135% | 0 | 0 | — |
case-11 | pass→pass | 13,208 | 4,705 | -64% | 1 | 1 | 0% | 1,920 | 3,527 | +84% | 0 | 0 | — |
case-12 | pass→pass | 9,768 | 13,076 | +34% | 1 | 1 | 0% | 1,448 | 3,682 | +154% | 0 | 0 | — |
case-13 | fail→pass | 10,887 | 6,871 | -37% | 1 | 1 | 0% | 1,610 | 3,915 | +143% | 0 | 0 | — |
case-14 | pass→pass | 10,798 | 3,940 | -64% | 1 | 1 | 0% | 1,534 | 3,447 | +125% | 0 | 0 | — |
case-15 | fail→pass | 13,296 | 4,046 | -70% | 1 | 1 | 0% | 1,957 | 3,434 | +75% | 0 | 0 | — |
case-16 | pass→pass | 9,314 | 5,206 | -44% | 1 | 1 | 0% | 1,376 | 3,584 | +160% | 0 | 0 | — |
case-19 | fail→pass | 7,541 | 4,211 | -44% | 1 | 1 | 0% | 1,116 | 3,528 | +216% | 0 | 0 | — |
case-20 | pass→fail | 3,754 | 7,280 | +94% | 1 | 1 | 0% | 693 | 3,211 | +363% | 0 | 0 | — |
case-21 | pass→pass | 5,634 | 7,417 | +32% | 1 | 1 | 0% | 1,079 | 4,205 | +290% | 0 | 0 | — |
case-22 | pass→pass | 10,578 | 5,617 | -47% | 1 | 1 | 0% | 1,956 | 3,698 | +89% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 12 counted toward the lift figure. The other 10 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +14 percentage points is the difference between those two pass rates over the 12 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.