prewalk

A two-stage coding workflow that has one AI model plan and start a change, then hands the work to another model to finish it.

In plain words
What is it for?
Use it to have a planning model inspect a repository, create a short plan, and make the first edit before an executor model completes and checks the implementation.
Why use it?
It separates careful planning from faster implementation, reducing the need to use the same model for every part of a task.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/vivekascoder/codex-prewalk/prewalk
Any agent
npx skills add vivekascoder/codex-prewalk --skill prewalk
Clone the repo
git clone --depth 1 https://github.com/vivekascoder/codex-prewalk

Made for: Claude Code, Codex.

Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.00534
Opus 5 $0.00016 $0.00267
Sonnet 5 $0.00007 $0.00107
Haiku 4.5 $0.00003 $0.00053

Measured 2d ago against content hash b403bf96bbaf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prewalk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/prewalk/SKILL.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prewalk

Run the bundled Prewalk orchestrator for $ARGUMENTS.

Resolve this skill directory to its real path first (the user install may be a symlink under ~/.agents/skills/prewalk). From the resolved skill directory, the repository root is two directories up and the orchestrator is:

node "<repo-root>/scripts/prewalk.mjs" --cwd "$PWD" "$ARGUMENTS"

Behavior

The orchestrator:

  1. Starts a fresh Codex app-server thread on the planner model.
  2. Supplies the Prewalk planning nudge as turn-scoped developer instructions.
  3. Requires the planner to inspect the repository, establish a compact plan/todo list, and begin implementation.
  4. Watches turn/plan/updated and successful fileChange events.
  5. If the planner finishes a turn before the first edit lands, continues the planner on the same thread with an implementation nudge (up to the configured continuation limit).
  6. Once a plan exists and the first successful file edit lands, interrupts the planner turn.
  7. Starts an empty-input continuation turn on the same thread with the executor model.
  8. Lets the executor finish implementation and validation from the inherited trajectory.

If the planner never reaches the plan + successful-edit boundary within the continuation limit, the orchestrator exits non-zero instead of treating the run as successful.

Defaults

  • planner: gpt-5.6-sol
  • executor: gpt-5.6-luna
  • planner effort: high
  • executor effort: medium
  • planner continuations: 3

Environment overrides: CODEX_PREWALK_PLANNER, CODEX_PREWALK_EXECUTOR, CODEX_PREWALK_PLANNER_EFFORT, CODEX_PREWALK_EXECUTOR_EFFORT, and CODEX_PREWALK_PLANNER_CONTINUATIONS.

Constraints

  • Do not replace this with ordinary Plan mode; Prewalk must preserve the same Codex thread trajectory and the planner's first edit.
  • Do not continue the task yourself in the parent turn after the nested run succeeds.
  • The nested Codex thread uses the workspace-write sandbox with approvalPolicy: never.
  • If Codex app-server is unavailable or the orchestrator exits non-zero, report the error clearly instead of silently re-running the task outside Prewalk.

Read the full file on GitHub · 48 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 48 lines · 33 tokens per session scan A b403bf96bbaf

Subscribe to this mod's changes

prewalk is a skill published in the GitHub repository vivekascoder/codex-prewalk (1 stars, last pushed 8d ago), licensed Apache-2.0. It adds 33 tokens to every session and 534 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

pixel-office

Show Codex subagents working in a live Stardew-style pixel office web page. Use PROACTIVELY and implicitly whenever a task starts or observes subagents (spawnagent/collaboration or subagentactivity), even when the user never mentions this plugin; automatically open the Codex app right sidebar page. Also use when the…

frankshane/pixel-office · 100 tokens

manage-taskboard

Manage Codex Taskboard / e-taskboard work with taskctl. Use for taskboard issue IDs, status sync, comments, or taskctl cloud setup—not for unrelated product docs.

chuspeeism/dashi-taskboard · 41 tokens

dev-flow

Use Dev Flow for bounded Codex software development tasks: implementation, bug fixes, refactoring, targeted testing, development delivery, and explicit parallel batches isolated in separate Git worktrees. It may be selected implicitly for those tasks or explicitly with $dev-flow-codex:dev-flow. Do not create a Dev…

Innocent-children/dev-flow · 84 tokens

codexkit-repository-maintenance

Use when maintaining or improving the GameStudio-CodexKIT source repository, including CI, governance, catalog, generators, adapters, packaging, documentation, versioning, or release readiness.

hoatv2211/GameStudio-CodexKIT · 45 tokens

deep-discovery

Use when the user asks for deep discovery, 100-question brainstorming, idea interrogation, architecture stress testing, strategy vetting, weakness finding, hole-poking, exhaustive exploration, planning or auditing Codex plugins or skills, or pre-commitment review of a design, plan, strategy, architecture, product…

forsonny/deep-discovery · 76 tokens

unity-ui-art-and-motion-production

Use when new or revised Unity UI visuals, icons, panels, 9-slice sprites, component states, HUD or menu layouts, popup motion, screen transitions, or flattened UI screenshot decomposition must be produced through Figma and integrated into uGUI, NGUI, or UI Toolkit; not for UI debugging, localization-only work…

hoatv2211/GameStudio-CodexKIT · 83 tokens