{"id":17858,"plugin_id":"plugins_6a7c58f65d708191b3a705a8625baffe","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:14:24.739Z","digest":"c2eba0b0d0ad048c4a35c46a504884989aecd28948efcfa438ceb33d45712e69","against":null,"payload":{"description":"Print the launchd, cron or Task Scheduler config that starts a shift at a fixed time; registers nothing.","included_files":[],"name":"schedule","skill_md_contents":"---\nname: schedule\ndescription: Print the launchd, cron or Task Scheduler config that starts a shift at a fixed time; registers nothing.\nlicense: MIT\n---\n\nGet the host-opened project ready to start on a clock, then hand the owner the config. Work through\nthese in order; each one is a check the owner would otherwise discover at 4am.\n\nResolve the installed plugin root to an absolute `$NIGHTSHIFT_PLUGIN_ROOT` — `${CLAUDE_PLUGIN_ROOT}`\non Claude Code, `$PLUGIN_ROOT` on Codex when set, otherwise the absolute path this skill was\nattached from (`skills/schedule/SKILL.md`). Run every command below through\n`\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\"` — native Windows: `& \"$NIGHTSHIFT_PLUGIN_ROOT\\runtime\\windows\\ns.ps1\"`\nin the PowerShell tool, same verbs — which resolves the host and the workspace; `ns help` lists the\nverbs, and `ns bind` prints the six resolved facts (`TASK_ROOT`, `NIGHTSHIFT_WORKSPACE`, `NS`,\n`NIGHTSHIFT_PLUGIN_ROOT`, `HOST`, `SOURCE`); `$NS` below is that `NS`. Never a bare relative path: the working\ndirectory persists between calls. Each `$NS/...` path below is where the current layout keeps that file;\n`ns path <key>` prints where this workspace keeps it, and `ns path --list` names every key.\n\n## 1. Is there a site at all?\n\nNo `$NS/` — stop and point at Setup (`/nightshift:setup` on Claude Code, or ask Nightshift\nto set up on Codex). Nothing below is meaningful without it.\n\nRead `$NS/run/work-mode`. Artifact mode is a persistent folder, not a Git repository; the scheduled\nagent still starts in that work target. A malformed mode or a scratch work target is a refuse —\nfix it with Setup before installing a job. In artifact mode, refuse to print or install a job when `$NS/receipts` exists but is not a usable directory.\nIf `$NS/run/work-mode` is missing and Setup would propose artifact, refuse to print or install a job; a scheduled start will refuse to arm.\nIf the work target cannot be resolved, refuse to print or install a job; a scheduled start will refuse to arm.\n\n## 2. Is there work queued?\n\nA scheduled start works the punch list it finds and **promotes nothing** — parked work orders and\ndrafting-table entries stay exactly where they are. So an empty `## Items` means the scheduled run\ndoes nothing at all, and this is the moment to fix that, not 4am.\n\nCount the open `- [ ]` in `$NS/punch-list.md`:\n\n- **Items present** — say what they are in one line and carry on.\n- **None** — say so plainly and offer the ways to fix it: compose a shift now with\n Hunt (answer **later**, not **now** — a shift started here defeats scheduling it), cut an\n ordinary draft from `$NS/staging/drafting-table.md`, cut a `Status: proposed` import with\n `\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\" import-issues --promote …`, or write an\n item by hand. Then re-check. Never schedule an empty list without saying it will do nothing.\n\nA parked work order is not queued work. If one exists, say so: it must be moved into the punch list\nbefore the scheduled time, because start will not promote it.\n\n## 3. Will the permissions hold?\n\nA scheduled run is headless and cannot answer a prompt. On Claude Code, if neither\n`$TASK_ROOT/.claude/settings.local.json` nor `$TASK_ROOT/.claude/settings.json` grants\nfrictionless permissions, warn\nonce. On Codex the grant travels in the command itself: pass the owner's Codex launch command, as\nthe Codex host page (`$NIGHTSHIFT_PLUGIN_ROOT/skills/nightshift/references/hosts/codex.md`)\nspells it, through `--agent`. The generator's preflight warns when a Codex command carries no\nheadless grant, and a Codex entry generated without one will stall on the first tool that asks.\nSetup offers the fix.\n\n## 4. Confirm the queued work is unarmed\n\nOpen `- [ ]` Items do not activate the clock-out gate by themselves. `.shift-armed` does, and\nscheduling must not create it: the work stays queued until the scheduled Start preflight clears\nstale markers and arms the shift.\n\nIf `$NS/run/.shift-armed` already exists, stop here. This workspace has an active or stale shift,\nnot merely queued work. Report that state and point the owner to Status (`/nightshift:status` on\nClaude Code, or ask Nightshift for status on Codex); do not tell them to create a STOP marker just\nto schedule the list. Continue only after the existing shift has been ended or its stale state has\nbeen diagnosed.\n\n## 5. Print the config\n\nAsk for the time if the owner has not given one — 24-hour `HH:MM`, local — then run the generator\nand show its output as it comes:\n\n```bash\n\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\" schedule --preflight\n\"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns\" schedule --at <HH:MM>\n# Codex projects add: --agent '<the Codex launch command from references/hosts/codex.md>'\n# Linux user timers:  --target systemd\n```\n\n`--preflight` / `-Preflight` checks the agent binary, permissions, resolved workspace, rules, queued work,\ngenerated paths, and scheduler syntax for Claude Code and Codex. It installs nothing, writes\nnothing under LaunchAgents, and does not enable, start, or register an entry. `--list` shows what\nis already registered for this project; `--remove` prints the command that unregisters it. The\ngenerator refuses to hand over a second entry where one exists — two scheduled starts on one punch\nlist is two agents on one shift.\n\n**Install nothing.** The owner runs the command it prints, or does not.\n\n## 6. Close\n\nSay where the run's output will land (`$NS/run/scheduled.log`), and\nmention once that the same generator runs from a terminal with no session —\n`ns schedule` is plain shell and spends no model tokens, which is\nwhat makes it reachable on a day this command is not. On native Windows the equivalent is\n; it likewise spends no model tokens and\nregisters nothing. The README carries the full offline note.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}