codex-luna

Delegates frozen implementation plans to a GPT-5.6 Luna executor via Codex CLI.

4|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/sukbearai/king-ai --skill codex-luna-sukbearai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codex-luna
Source: https://github.com/sukbearai/king-ai/tree/main/packages/skills/skills/codex-luna
Command: npx skills add https://github.com/sukbearai/king-ai --skill codex-luna-sukbearai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Non-trivial implementation work in a Codex session often mixes planning and execution, causing scope drift and unverified changes. This Skill separates the two: the current Codex session freezes an explicit plan, a separate Codex CLI process running gpt-5.6-luna at max reasoning executes it, and the coordinator reviews and verifies the diff. ## Core Features & Use Cases - Plan Freezing: Requires an accepted plan with exact files, ordered steps, verification commands, and protected paths before any delegation happens. - Scoped Luna Execution: Invokes codex exec with the gpt-5.6-luna model at max reasoning, passing the frozen plan through a prompt file so shell quoting cannot corrupt the spec. - Follow-Up Fixes: Resumes the most recent Luna session with narrow corrections and failure proof instead of starting expensive fresh runs. - Coordinator Verification: Keeps diff review, test execution, pushes, and releases in the coordinator session; executor claims are advisory until verified. - Use Case: You have a resolved plan to refactor a module across five files. Freeze the plan, hand it to Luna for execution, then inspect the diff and run the test suite yourself before committing. ## Quick Start In a Codex session, ask the agent to use the codex-luna workflow to freeze your implementation plan and delegate execution to a GPT-5.6 Luna executor, then review and verify the resulting diff.

Frequently Asked Questions about codex-luna

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

FAQPage Schema
How do I delegate a coding task to a separate Codex CLI process?▼

Write the frozen plan into a temporary prompt file, then run `codex exec --yolo -C <repo> --model gpt-5.6-luna -c model_reasoning_effort="max"` with the prompt piped via stdin. Read the saved output file afterward and verify the diff yourself in the coordinator session.

When should I use plan-then-delegate instead of implementing directly?▼

Use it when implementation is non-trivial, the exact file-level path can be frozen, and a separate max-reasoning execution pass justifies the delegation overhead. Skip it for tiny edits, design-only work, or ordinary one-pass investigation.

Can this workflow run outside a Codex session?▼

No. The session gate requires the current session to be Codex, which acts as coordinator owning planning, review, and verification. In any non-Codex harness the workflow must not be applied.

How do I fix a failed Luna execution run?▼

Resume the most recent session with `codex exec resume --last` from the repo directory, passing a narrow correction and the failure proof in a new prompt file. After two failed execution rounds, stop delegating and take over in the coordinator.

Why must the executor not delegate recursively?▼

The executor starts with zero coordinator context, so nested delegation would lose the frozen plan and constraints, creating uncontrolled agent trees. The only valid path is coordinator planning, one Luna executor, then coordinator verification.