---
name: plan-mode-guard
description: Require a planning-only response before implementation when a request needs design, sequencing, risk analysis, user approval, or replaces Claude-Code-style EnterPlanMode/ExitPlanMode instructions in Codex skills. Use when updating or authoring Codex skills that mention plan mode, EnterPlanMode, ExitPlanMode, planning gates, or "plan before editing" workflows, and when Codex must avoid file edits unless the session was explicitly started with /plan.
---

# Plan Mode Guard

## Guard

Use this skill to replace unavailable agent-callable `EnterPlanMode` / `ExitPlanMode` steps with a Codex-compatible user boundary.

If the request requires planning before implementation and the current session is not clearly already in Codex plan mode:

- Do not edit files.
- Produce a concise planning-only response.
- Tell the user to rerun the request as:
  `/plan $plan-mode-guard <task>`
- Stop after the plan unless the user explicitly asks to implement.

## Planning-Only Response

Keep the response short and actionable. Include only:

- Assumptions.
- Proposed implementation phases.
- Files or areas likely to change.
- Validation commands.
- Open questions or blockers.
- The exact rerun instruction:
  `/plan $plan-mode-guard <task>`

## When Already In Plan Mode

If the user already invoked the request through `/plan`, inspect the repository as needed and produce the plan. Do not edit files during the planning response.

When the user later explicitly asks for implementation outside plan mode, proceed normally while following the approved plan.

## Skill Authoring Rule

When updating another skill, replace any instruction that says to invoke `EnterPlanMode`, `ExitPlanMode`, or `/plan` internally with this guard. Do not claim Codex can enter plan mode from inside a skill.
