Skills
Prepare durable Codex work with ak:codex-goal
Draft a bounded, verifiable Codex Goal mode contract and keep control of long-running work with ak:codex-goal.
Use ak:codex-goal to turn a clear, mainly mechanical objective into a
reviewable contract for Codex Goal mode. The Skill helps define the outcome,
constraints, validation loop, checkpoints, and stop condition; the persistent
goal itself belongs to Codex and remains attached to the active chat.
Choose ak:codex-goal for durable Codex work
Use ak:codex-goal when
- Work will take more than one normal turn and can progress without repeated product or architecture decisions.
- Tests, an eval, a build, or another explicit artifact can prove completion.
- Scope and unchanged contracts are clear enough to survive multiple checkpoints.
- You want to draft and review the goal before starting it in Codex.
Choose another workflow when
- The desired outcome is exploratory or vague. Clarify it with planning first.
- A multi-hour or dependency-heavy goal needs blocker and credential preflight.
Use
ak:goal-warmup. - Work is a local metric-driven iteration loop or a headless multi-CLI job. Use the dedicated loop or orchestration workflow.
- The task changes production credentials, destructive shared infrastructure, or an unrelated backlog. Keep it outside Goal mode.
Prepare Codex Goal mode
Current Codex documentation exposes /goal in the desktop app, interactive CLI,
and IDE extension. Open the slash-command list and confirm it is present in the
surface you will use. If it is missing, follow that runtime's current feature
and update guidance rather than assuming a private or undocumented state.
| Runtime | Skill invocation | Persistent goal boundary |
|---|---|---|
| Claude Code | /ak:codex-goal ... | Can draft the contract only; Claude does not gain Codex /goal state from this Skill. |
| Cursor | /ak:codex-goal ... | Can draft the contract only; the released evidence does not establish Cursor goal persistence. |
| Codex | $ak:codex-goal ... | Drafts the contract; start and control persistence with native /goal commands in the active Codex chat. |
Run the Skill
Pass an objective or draft. The Skill defines no flags; its output should be a goal contract for review, not an automatically started goal.
/ak:codex-goal "Finish the TypeScript migration, preserve behavior, keep strict mode clean, and make the focused test suite pass"/ak:codex-goal "Finish the TypeScript migration, preserve behavior, keep strict mode clean, and make the focused test suite pass"$ak:codex-goal "Finish the TypeScript migration, preserve behavior, keep strict mode clean, and make the focused test suite pass"After review, start the persistent goal from a Codex surface:
/goal Finish the TypeScript migration. Read the accepted plan first. Preserve public behavior and strict mode. Validate after each checkpoint with the focused test command. Stop when the build and tests pass, or when a human decision is required.Use /goal to view the current goal, /goal edit to revise it, /goal pause
and /goal resume to control work, and /goal clear to remove it. Goal text is
limited to 4,000 characters in current Codex guidance; put longer detail in a
file and point the goal at it.
Understand the workflow
- Check suitability. Confirm the work is long enough, mechanically progressable, and has a verifiable end state.
- Name the evidence. Identify files to read, acceptance commands, artifacts, checkpoints, and unchanged contracts.
- Draft one objective. Include outcome, constraints, stop condition, and an explicit ban on weakening, narrowing, skipping, or deleting tests.
- Review before starting. Resolve ambiguity and inspect the authority boundary. Use goal warmup first when dependencies or external approvals are material.
- Start in Codex. The user invokes
/goal; the objective becomes the active chat's persistent target and completion criteria. - Steer and verify. Continue in the same chat, request status when useful, pause for human decisions, and review the final diff before delivery.
Keep authorization separate from persistence
A goal is not a safety boundary
Starting /goal does not grant broader filesystem, network, credential,
deployment, destructive, or external-service authority. The same sandbox and
approval policy continue to apply, and unresolved product decisions still
require the user.
Long-running work consumes model time and may run commands, write project files, or call services allowed by the active session. Validation can also use compute, disk, network, or paid providers. State those effects in the contract and keep irreversible actions behind explicit approval.
Verify progress and completion
Evidence should include the active goal text, checkpoint status, commands run, test or build results, changed files, remaining risk, and any paused decision. Completion requires the stated stop condition, not merely elapsed work. Review the final diff and ensure no test or contract was weakened to manufacture success.
Troubleshoot and limits
| Symptom | Safe next step |
|---|---|
/goal is missing | Check the current Codex slash-command list, version, and official feature guidance; do not claim unsupported lifecycle states. |
| The objective keeps drifting | Pause, restate one outcome and unchanged contracts, or clear it and run ak:goal-warmup. |
| Work needs a product decision | Pause and ask the decision owner; do not invent the answer to keep the goal active. |
| Validation cannot prove completion | Replace the vague stop condition with an executable check or observable artifact before resuming. |
| Two chats may edit the same files | Stop one or isolate the work in separate worktrees before running goals concurrently. |
ak:codex-goal does not start, pause, resume, edit, or clear Goal mode outside a
Codex surface. Persistent state is per active chat, not a portable provider API.
The packaged Skill retains older fallback configuration wording, while current
public Codex guidance presents /goal as a built-in command; prefer the live
slash-command list for availability. The two release snapshots used for this
page contain the same Skill text.
Create and package a Skill with ak:skill-creator
Scope, scaffold, validate, evaluate, and package a reusable Skill with ak:skill-creator.
Preflight long-running work with ak:goal-warmup
Lock an approved outcome, preflight every plan phase, and produce a user-started long-run handoff with ak:goal-warmup.