archive
File finished shift state into a dated archive so the live files stay lean.
Work a punch list to completion autonomously — overnight, through a todo list, or until a product is polished — parking decisions and leaving receipts.
$ npx -y skills add orwa-mahmoud/claude-nightshift --skill nightshift --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/nightshiftContext preview
The summary Claude sees to decide when to auto-load this skill.
Work a punch list to completion autonomously — overnight, through a todo list, or until a product is polished — parking decisions and leaving receipts.
name: nightshift description: Work a punch list to completion autonomously — overnight, through a todo list, or until a product is polished — parking decisions and leaving receipts. license: MIT
If no shift is armed, run Start first; it asks nothing. This skill is the work, not the door.
A **shift** is a stretch of autonomous work with a punch list you cannot walk away from. The list lives in `.nightshift/punch-list.md`: a contract that binds you for the whole night, then `## Items` — one checkbox per task, each with its own Verify and Commit lines. The clock-out gate holds the session until every box is `- [x]`, a stop-work order lands, or the whistle blows. That is the push model: the list pushes the work forward item by item, and finishing it is the ordinary way out.
Nothing interrupts the owner while they sleep. A decision that is genuinely theirs gets a sensible production default and a written note, so the morning is a review rather than a pile of questions.
**What the owner reads in the morning**, all plain markdown under `.nightshift/`:
Never route an ordinary plan through Hunt, call later work "parked," or put a known task in the parking lot. Repository mode leaves commits as the punch-list contract says — one per item unless the contract above `## Items` says otherwise; artifact mode completes an item with its receipt under `$NS/receipts/`.
**Three ways a shift gets composed**, after Setup has scaffolded the site once:
headless run behaves exactly like an interactive one.
directly — then cuts and starts it.
Those skills own scaffolding, composition, and preflight. This skill owns the work itself.
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/nightshift/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.
Nightshift is an engineering workflow for a persistent project workspace. If the resolved project root is under `/workspace/scratch/`, stop before setup or shift work and give the OpenAI-native redirect from the setup skill: open the project you want Nightshift to change in Codex (or connect Codex to its GitHub repository), then mention Nightshift there. Never create durable-looking run state in a disposable ChatGPT scratch workspace, and never claim those temporary files affect or preserve the user's repository. A non-git project outside that explicit scratch path remains valid.
`$NS/punch-list.md` has a contract section, then `## Items`. Read `$NS/punch-list.md` in full once, when the shift starts and before the first item; after that, each item reaches you through the helper in step 1. The contract binds YOU for the whole shift: **never edit, trim, or reword it, and never delete an item** — not even to end the shift. Step 1 of every item is the helper, which gives you that item and the current `## Gates` block, so a mid-shift change to the gates reaches you without re-reading the file. The gate holds the contract and the items to what they were at arming and blocks with the repair named if either moves, so watching for that is not your job.
Read the resolved policy once at the start of the shift and follow it:
"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns" shift-policy resolve --table
Two rows decide how the loop below runs. `verificationLevel` is the gate cadence: `none` runs the `## Gates` block never, `final` once before clock-out, `per-item` before every tick, and `custom` on the cadence the punch list itself names. `toolingPolicy` says what to do about tooling the project does not have. The rest of the table is guards and the owner's preference blocks — `receipts.*`, `handoff.*`, `archive.*`, `recovery.*` and `shift.*` — and they apply whatever this skill says.
The table is the whole surface: every preference this skill tells you to honour is a row in it, so nothing here needs the owner's rules file opened. Reading is always permitted; writing it is not, and stays denied while the shift is armed.
The level chooses **when** the gate runs, never whether its result is honest. A gate that runs must be green before the tick; a level of `none` means no gate ran, and the receipt says exactly that rather than calling the item verified. A profile name is not evidence.
Top to bottom, one item:
1. **Read** the item and the current `## Gates` block — one call, and the only punch-list read an item needs:
"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns" punch-list nex
Give the agent a shift. Come back to work you can review. Nightshift gives Claude Code, OpenAI Codex, and Cursor a durable work contract for long coding runs. Bring a task list, choose a ready-made shift, or give your agent an objective and hours to work.
Repo: orwa-mahmoud/claude-nightshift
File finished shift state into a dated archive so the live files stay lean.
Read-only diagnosis of the workspace, rules, markers, lease, watchman and deadline, with classified next actions.
Compose a shift from the ready catalog under one time budget, guided or automatic, reviewed first or run directly.
Stage explicitly selected GitHub issues onto the drafting table as quoted source; never searches or writes back.
Permanently delete this project's Nightshift state; does not uninstall the plugin.
Compose a shift that works the project's quality debt: tests, code, accessibility, contracts, docs, dependencies, security.