In short:
ak-codex-goalis for long, mostly mechanical work that you want Codex to do on its own over many turns with/goal. It puts the work through a 3-part test, then writes a goal contract with a check command after each milestone and a measurable stop point. It only creates the goal when you ask clearly and the runtime supports it. Otherwise you get a draft to run yourself.
Disclosure: I maintain AgentKit and have an affiliate relationship with it: the AgentKit link in this post is an affiliate link; buying through it gets you 30% off.
Summary
Use it when the work spans many turns, is mostly mechanical and has a command that tells you it is done, such as moving a whole test suite to Vitest, or when you want to review a goal draft before pasting it into Codex. Do not use it for open-ended work like "make the code cleaner": the skill will tell you which part fails instead of creating a goal.
flowchart LR
W["ak-goal-warmup for multi-hour work"] -.-> B["ak-codex-goal"]
A["Long, mechanical work with a check command"] --> B
B --> C["Goal running in Codex"]
B --> D["Goal draft for you to run"]
B --> E["Not a fit for a goal, with the reason"]
C --> F["You review the final diff before merging"]It rests on 4 ideas:
| Idea | Question | Example |
|---|---|---|
| The 3-part test | Is this work worth a goal? | Move 40 test files to Vitest, done when the test command passes: passes. "Make the code cleaner": fails |
| A checkable stop point | When may Codex stop? | "Stop when pnpm build and pnpm test both pass, or when the next step needs your decision" |
| The goal contract | What does a good goal contain? | Objective, files to read first, constraints, check command after each milestone, progress log, stop point, a ban on loosening tests |
| Check the runtime first | Can the current runtime create goals? | If not, the skill says so and hands you a draft, without changing runtime settings |
All 3 parts must hold at once: the work is long and mostly mechanical, the stop point is checkable by a test, eval, build or a concrete artifact, and the scope is clear enough that Codex does not wait for your decision at each milestone. A goal is not a safety fence and does not make product decisions for you.
Sample prompt for long, mechanical work:
/ak-codex-goal Create a goal: move every test in <test folder> from Jest to Vitest.
Read first: <plan or issue file>.
Constraints: do not change product code, do not change the public API.
Check after each milestone: <test command>.
Done when: all tests run on Vitest and pass, with no Jest dependency left.This skill has no flags. After the command you write an objective or paste a goal draft you have written.
Below is the detailed version: the run flow, 5 situations with prompts, how to write the input, the change history by ak release, and common pitfalls. The detailed version and the interactive page are for subscribers. Your agent can also search them through the portal's MCP.
Opens when your account has subscriber access
This guide is for subscribers
Once your account has access, the full piece, the interactive visual and the agent call all open.
- Sign in or create a modernEngineer accountReading access belongs to your account email.
- Choose a plan on the pricing page1, 3 or 12 months, paid by VietQR bank transfer. Access opens about a minute after the money arrives.
- Or redeem a Facebook subscriber codePeople supporting the page on Facebook get an activation code by message each month.
Already a subscriber? Sign in to read.
Use this piece in your agent
Get an API keyCopy the text below and paste it into Claude Code, Codex or whichever agent you use. The agent reads the piece and checks it against the repo you have open.
Read "ak-codex-goal: write long-running Codex goals with a checkable stop point" on modernEngineer and apply it to this repo.
1. Call the content_get tool of the modernengineer MCP server with locale "en", slug "ak-codex-goal". If the modernengineer MCP server is not connected, stop and walk me through connecting it from https://modernengineer.dev/en/mcp.
2. Summarize the main steps of the piece and point out which apply to this repo.
3. Propose concrete changes and ask me before editing any file.Connect MCP in Claude Code (once)
claude mcp add --transport http modernengineer \
https://api.modernengineer.dev/mcp \
--header "Authorization: Bearer <API key>"Reading the full piece over MCP needs an API key from a subscriber account or one that bought this guide. Without access, the agent only gets the opening.
- Version
- v1.0.0
- Updated
- 22/10/2026
- Licence
- All rights reserved
- Slug
- ak-codex-goal


