/nightshift:test-taskfrom nightshift
Runs a single Nightshift task on one table item for testing without modifying state. Spawns a read-only subprocess of /nightshift:do-task. Useful for verifying task behavior before production runs.
Ships in nightshift. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Execute a single Nightshift task on one item for testing purposes against shift $ARGUMENTS. Do NOT modify table state.
Steps
Resolve the shift
$ARGUMENTS is non-empty, use it..nightshift/ (excluding archive/); auto-select if exactly one exists, otherwise use AskUserQuestion to pick.Select the task
List task columns from flock -x .nightshift/<shift>/table.csv qsv headers --just-names .nightshift/<shift>/table.csv (or list .md files in the shift directory excluding manager.md).
Select the item
Determine the valid range from flock -x .nightshift/<shift>/table.csv qsv count .nightshift/<shift>/table.csv. Use AskUserQuestion to ask:
"Which item do you want to test? Enter an item number (1–N)."
Read the item's row column value via flock -x .nightshift/<shift>/table.csv qsv slice --index <qsv_index> .nightshift/<shift>/table.csv | qsv select row (where qsv_index = item_number - 1). Use that row value as <item-id> when invoking the do-task skill.
Show a preview of the item via flock -x .nightshift/<shift>/table.csv qsv slice --index <qsv_index> .nightshift/<shift>/table.csv.
Spawn the dev subprocess with --read-only
Invoke the /nightshift:do-task skill in a fresh claude -p subprocess with the --read-only flag as the 4th positional argument. This guarantees no mutation of table.csv, manager.md, or the task file. Use --permission-mode bypassPermissions for test-task — auto mode adds classifier overhead that isn't necessary for a one-off non-mutating run, and the read-only flag plus the do-task skill's safety boundary handle the rest.
# Per-test log file (separate from manager-driven shift logs)
mkdir -p .nightshift/<shift>/logs
LOG_PATH=.nightshift/<shift>/logs/test-<task>-<row-value>-$(date -u +%Y-%m-%dT%H-%M-%S).jsonl
claude -p "/nightshift:do-task <shift> <task> <row-value> --read-only. Safety: do not modify table.csv, manager.md, or any task file; this is a read-only test run." \
--output-format stream-json \
--verbose \
--permission-mode bypassPermissions \
> "$LOG_PATH" 2>&1
Parse and display results
Find the last {"type":"result", ...} line in the log file and extract status, attempts, recommendations, and error. Display:
## Test Results: <task-name> on Item <N> (row=<row-value>)
**Status:** <done | failed>
**Attempts:** <number>
**Recommendations:** <step improvements, or "None">
**Error:** <error details if failed, omit if done>
**Log:** <log-path>
Note: Table state was NOT modified. This was a test run only.
If the log file does not contain a result event (e.g. the subprocess crashed), report the subprocess's exit code and the last 20 lines of the log so the user can debug.
Guardrails
table.csv during a test run.manager.md during a test run.--read-only as the 4th positional argument to /nightshift:do-task (defense in depth alongside the safety boundary prompt).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub johndaskovsky/nightshift --plugin nightshift8 skills in this plugin
/add-tasknightshift:add-taskAdd a task definition to an existing Nightshift shift, registering it in manager.md and adding a status column to table.csv. Use when the user invokes /nightshift:add-task./archivenightshift:archiveArchive a Nightshift shift by moving its directory to .nightshift/archive/YYYY-MM-DD-<name>/. Use when the user invokes /nightshift:archive./createnightshift:createCreate a new Nightshift shift — a structured unit of batch agent work — with manager.md and an empty table.csv. Use when the user invokes /nightshift:create.Other plugins' skills for the same job