Skip to main content
skill CX Codex

plan-exit — Claude Code skill for leaving plan mode

The plan-exit Claude Code skill checks whether plan mode is closed and names the next step toward implementation. It reads the room status and staged items.

MIT ★ 571 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add orwa-mahmoud/nightshift --skill plan-exit -a claude-code
Open on GitHub

What plan-exit does

The skill checks the plan room and reports what should happen next. It reads the open-item and staged-draft counts from ns status rather than counting items itself.

If the room remains open, the skill reports that and gives the owner the terminal command to close it. In Codex, the hook runs only after it has been reviewed and trusted. The skill does not start implementation; work begins when the owner asks or starts a shift.

What it helps with

  • check whether the plan room has closed
  • see how many items remain open and drafts are staged
  • identify the next step after planning

Example prompts for the agent

  • Check whether the plan room has closed and tell me what comes next.
  • Read the status and report the open items and staged drafts.
  • Check the plan room; if it is still open, show me the terminal exit command.

How to install plan-exit

1Skills CLI (Vercel)

npx skills add orwa-mahmoud/nightshift --skill plan-exit -a claude-code

2Manually: put the files in place

~/.claude/skills/plan-exit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/plan-exit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about plan-exit

How do I install plan-exit in Claude Code?

Run npx skills add orwa-mahmoud/nightshift --skill plan-exit -a claude-code. The skill file is at ~/.claude/skills/plan-exit/SKILL.md.

What does plan-exit do?

It checks the plan room status and reports whether the room is closed. It then names the next step based on the open-item and staged-draft counts.

Why might the plan room stay open in Codex?

The Codex hook runs only after it has been reviewed and trusted. If the hook did not run, the skill reports that the owner needs to close the room from the terminal.

Source text

SKILL.md · MIT
---
name: plan-exit
description: Leave the plan room and name the next step toward building what was planned.
disable-model-invocation: true
license: MIT
metadata:
  internal: true
---

The owner typed this command to leave the plan room. Typing it is what closes the room: the host's
prompt hook removes the room's marker before this skill runs. This skill removes nothing. It reports
whether the room is closed and what comes next.

Resolve the installed plugin root to an absolute `$NIGHTSHIFT_PLUGIN_ROOT` — `${CLAUDE_PLUGIN_ROOT}`
on Claude Code, `$PLUGIN_ROOT` on Codex when set, otherwise the absolute path this skill was
attached from (`skills/plan-exit/SKILL.md`). Run every command below through
`"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns"` — native Windows: `& "$NIGHTSHIFT_PLUGIN_ROOT\runtime\windows\ns.ps1"`
in the PowerShell tool, same verbs — which resolves the host and the workspace; `ns help` lists the
verbs, and `ns bind` prints the six resolved facts (`TASK_ROOT`, `NIGHTSHIFT_WORKSPACE`, `NS`,
`NIGHTSHIFT_PLUGIN_ROOT`, `HOST`, `SOURCE`); `$NS` below is that `NS`. Never a bare relative path: the working
directory persists between calls. Each `$NS/...` path below is where the current layout keeps that file;
`ns path <key>` prints where this workspace keeps it, and `ns path --list` names every key.

## 1. Check the room

```bash
"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns" status
```

- **No `Plan room:` line** — the room is closed. Tell the owner in one line that the plan room is
  closed and this conversation can build again.
- **A `Plan room:   open` line** — the command did not reach the host's prompt hook, so the room is
  still open. On Codex the hook runs only after it has been reviewed and trusted. Tell the owner the
  room is still open and give them the terminal exit to run themselves:
  `"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns" plan-exit` (native Windows:
  `& "$NIGHTSHIFT_PLUGIN_ROOT\runtime\windows\ns.ps1" plan-exit`), with the plugin root written out in
  full. Never run it yourself: the hooks refuse it, and the exit is the owner's.

## 2. Name the next step

Read it off the same status output: the `Items:` line (`open=N`) and the `staged` fact
(`drafts=N`). Do not count boxes yourself.

- Drafts staged and no open items: the next step is Start — `/nightshift:start` on Claude Code
  and Cursor, `$nightshift:start` on Codex. Start offers the staged items to promote and begins the
  shift.
- Drafts staged and open items already in the punch list: Start works those first. The owner can
  move the planned items into the punch list themselves before starting.
- No drafts staged: say so. The discussion stays in this conversation, and nothing was staged.

Begin no work in this skill. Building starts when the owner asks for it or starts a shift.

© orwa-mahmoud · MIT · orwa-mahmoud/nightshift

Similar skills

SKILL.md skills catalog →

From the same set17

The whole set →
reset The reset Claude Code skill clears damaged or confusing runtime state in an open project. It removes temporary markers and the deadline while preserving work and evidence. CX Codex +1 ★ 571repo stars quality This Claude Code skill groups project quality work into a single shift. It starts on requests about tests, accessibility, documentation, contracts, or security. CX Codex +1 ★ 571repo stars purge The purge Claude Code skill deletes Nightshift state from a project. It prints the .nightshift/ path and waits for the owner to confirm before deletion. CX Codex +1 ★ 571repo stars plan This Claude Code skill opens a planning room to explore a project and shape the work with its owner. Implementation waits until the owner deliberately leaves the room. CX Codex +1 ★ 571repo stars nightshift The nightshift Claude Code skill works through a project punch list during an autonomous shift. Start it with a request to work on the project, with or without a time budget. CX Codex +1 ★ 571repo stars import-issues The import-issues Claude Code skill stages selected GitHub issues as project drafts. It previews each issue before asking which ones to add. CX Codex +1 ★ 571repo stars hunt The hunt Claude Code skill builds a Nightshift work shift from a project request. Give it a task and a number of hours, and it starts without asking for catalog choices. CX Codex +1 ★ 571repo stars doctor The doctor Claude Code skill diagnoses a Nightshift project and reports detected issues. Run it to inspect the workspace, shift state, markers, and deadlines. CX Codex +1 ★ 571repo stars

Project sponsors

Companies that keep this analytics open