codex-start
Orient a new Codex session from current state, active task/spec indexes, the root knowledge router, and recent Git history without running heavy validation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Orient a new Codex session from current state, active task/spec indexes, the root knowledge router, and recent Git history without running heavy validation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Execute an approved dated spec mission from .codex/specs/ autonomously until final review — self-plan runnable tasks, delegate under the active harness policy, verify acceptance, record ROADMAP dispositions and evidence, and offer session rotation at phase boundaries.
Create a dated mission-scale spec workspace in .codex/specs/ — interview the user, freeze the intent in a reviewable POC artifact, then write a decision-complete SPEC + ROADMAP that a later (often cheaper) session can execute autonomously via $codex-spec-run.
Bulk-maintain Codex current state, task/spec indexes, JOURNAL history, and eligible durable project knowledge at a session boundary.
Run a read-only Codex installation health check using the knowledge checker plus semantic audits of memory and workflow wiring.
Write a single-slot session baton (.codex/HANDOFF.md) that distills this session's reasoning state — objective, hypothesis, evidence, dead ends, exact next step — so a fresh session can resume seamlessly. Run when the context window is nearly full or when pausing mid-investigation.
Run a behavior-first Codex retrospective, strengthen relevant guidelines, and route any durable descriptive facts to the canonical knowledge workflow.
| name | codex-start |
| description | Orient a new Codex session from current state, active task/spec indexes, the root knowledge router, and recent Git history without running heavy validation. |
Start a Codex session with a lightweight CLAUDART orientation. This skill is read-only, with one exception: consuming the handoff baton (Case H) deletes .codex/HANDOFF.md once the user resumes or discards it.
.codex/HANDOFF.md. If present, read it in full — it is a one-shot reasoning baton written by a previous session's $codex-handoff. Note its created: date. Consumption flow: see Case H below. If absent (the normal state), continue silently..codex/CONTEXT.md if it exists. If missing, say the project has no Codex context yet and suggest $codex-checkpoint after meaningful work..codex/tasks/index.md if it exists. If missing, treat as "no active tasks". If present, extract entries under ## Active..codex/tasks/ (the index is a cache; the file is truth). Read its frontmatter (status, updated, slug) only — do not full-read task bodies in $codex-start..codex/knowledge/INDEX.md if it exists — the root router only. Count visible route lines under ## Knowledge that match the canonical Markdown route grammar; ignore HTML comments/templates and - _(none)_, so a seed index reports zero. Do NOT read domain maps, topic files, or .codex/guidelines/knowledge-management.md, and do NOT validate freshness or dead links. A later task that needs knowledge loads the guideline and follows its bounded routing contract..codex/specs/INDEX.md if it exists — the INDEX only. Extract entries under ## Active. Do NOT read SPEC/ROADMAP/NOTES/LEDGER bodies in $codex-start.git log -3 --oneline. If the directory is not a git repo or has fewer than three commits, report what is available..codex/CONTEXT.md when present:
## In Progress## Next Session Should Start By## Open Questions / Blockers.codex/JOURNAL.md..codex/tasks/done/.$codex-doctor or bash .codex/scripts/knowledge-check.sh; those are heavier health checks.## Session Ready
**Handoff:** [present — created <date>, objective one-liner; or "None"]
**Current focus:** [In Progress section, or "None recorded"]
**Last 3 commits:** [git log -3 --oneline output, compact]
**Active tasks:** [list of "<slug> (<status>, updated <date>)" from tasks/index.md, or "None"]
**Active specs:** [list of "<slug> (<status>, updated <date>)" from specs/INDEX.md, or "None"]
**Project knowledge:** [N root routes in knowledge/INDEX.md, or "none"]
**Start by:** [Next Session Should Start By section, or see "Five Cases" below]
**Open blockers:** [Open Questions / Blockers section, or "None recorded"]
Decide based on what was found in steps 1-6. Case H takes precedence over all others; Case S coexists with Case A (report both, lead with whichever is awaiting the user).
.codex/HANDOFF.md exists (a previous session handed off mid-flight)A reasoning baton is waiting. Surface it before anything else:
"A previous session left a handoff (created ): <Objective, one line>. Recorded next step: <Next Step, one line>. Resume from it? On resume I'll verify its Evidence against current code, then consume the baton. Or tell me to discard it."
created: is more than 7 days old, lead with that: reasoning state rots fast — the recorded hypothesis may no longer match the code..codex/HANDOFF.md. The baton is consumed exactly once; its durable parts were already routed to knowledge/task files by $codex-handoff.$codex-doctor will flag it when stale.Never act on baton content without verifying it against the current code first — it is a point-in-time snapshot, and commits may have landed since.
.codex/specs/INDEX.md lists an Active spec (mission in flight)For the most relevant spec (prefer drafting/poc-review/awaiting-final-review, then running, then ready, then blocked):
drafting: say:
"Spec
<slug>is being drafted or amended. Run$codex-specto continue in its existing dated folder."
poc-review: say:
"Spec
<slug>is waiting for your review — open its dated folder from.codex/specs/INDEX.md(POC inartifacts/, then SPEC.md and ROADMAP.md). Approving is a standing approval:$codex-spec-runwill then execute the whole roadmap without asking again until the final review."
awaiting-final-review: say:
"Spec
<slug>passed its final gate and is waiting for your demo verification. Run$codex-spec-run <slug>to surface the demo steps and final-gate evidence, then confirm to close or report what failed."
ready / running: say:
"Spec
<slug>is (updated ). Run$codex-spec-run <slug>(or the dated folder id if needed) to continue the loop — a fresh session like this one is the designed unit of work."
blocked: say:
"Spec
<slug>is blocked — the last LEDGER.md entry records why and what unlocks it. Run$codex-spec-run <slug>to investigate with a materially different path, or tell me if the external blocker cleared."
Do NOT auto-start the loop; $codex-spec-run is the user's call.
status: awaiting-review, in-progress, or blockedPick the most recently updated one. The exact prompt depends on its status:
awaiting-review: a previous session reported the task complete and is waiting for the user's verification. Say:
"Task
<slug>isawaiting-review— a previous session finished it and is waiting for your verification. Open.codex/tasks/<file>to review draft Outcomes. Confirm to close, or tell me what didn't work and I'll flip it back toin-progress."
in-progress: say:
"There's an active task
<slug>(in-progress, updated ). Want to resume? I'll read the full file and verify the completed steps still hold against current code. Or tell me to start something else."
blocked: say:
"Task
<slug>is blocked (updated ). Has the blocker cleared? If yes, I'll flip to in-progress and resume. If no, tell me what to work on instead."
Do not auto-read the task body, auto-resume, or auto-confirm completion. Wait for explicit user direction. When the user confirms a resume, warm the session: read the full task file, then read the files in its Related Code section (cap ~5 most relevant) so you resume against real code, not the plan's description of it. Then follow the Resumption protocol in .codex/guidelines/task-management.md (verify completed steps still hold against current code, surface drift in Surprises section).
## Next Session Should Start By is set, or an active (no task) micro-handoff sits under ## In ProgressSurface the Next-Session line (or the micro-handoff's label and its Next: step) and ask:
"Next-session handoff says: . Pick that up, or start something new?"
Ask plainly:
"No active task or session handoff found. What would you like to tackle? If it's non-trivial or multi-session, I can run
$codex-plan <description>to create a persistent task document."
(no task) micro-handoff from ## In Progress (Case B), read the files on its Files: line (cap ~5) before acting — the same warm-up a task resume gets. This is the /compact-style "re-read recent files" applied to un-planned work..codex/CONTEXT.md items look stale (<!-- since: --> more than 30 days old), mention that $codex-checkpoint should refresh them after this session..codex/guidelines/task-management.md (stalled in-progress, stuck awaiting-review, abandoned planning) — surface a stuck awaiting-review prominently; it is not abandoned, it just needs the user's sign-off.