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
npx skills add orwa-mahmoud/nightshift --skill plan-exit -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/plan-exit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/plan-exit/
1Skills CLI (Vercel)
npx skills add orwa-mahmoud/nightshift --skill plan-exit -a codex2Manually: put the files in place
.agents/skills/plan-exit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add orwa-mahmoud/nightshift --skill plan-exit -a cursor2Manually: put the files in place
.cursor/skills/plan-exit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install orwa-mahmoud/nightshift plugins/nightshift/skills/plan-exit2Manually: put the files in place
.github/skills/plan-exit/SKILL.md1Skills CLI (Vercel)
npx skills add orwa-mahmoud/nightshift --skill plan-exit -a gemini-cli2Platform CLI
gemini skills install https://github.com/orwa-mahmoud/nightshift --path plugins/nightshift/skills/plan-exitManually: put the files in place
.devin/skills/plan-exit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add orwa-mahmoud/nightshift --skill plan-exit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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