一键导入
nightshift-archive
Archive a Nightshift shift by moving its directory to .nightshift/archive/YYYY-MM-DD-<name>/. Use when the user invokes /nightshift:archive.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Archive a Nightshift shift by moving its directory to .nightshift/archive/YYYY-MM-DD-<name>/. Use when the user invokes /nightshift:archive.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add 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.
Create 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.
Execute one Nightshift task on one item, self-validate, retry on failure, and emit a structured result. Invoked by manager via `claude -p` subprocess; runs in a fresh top-level Claude Code session and inherits all user-configured MCPs.
Verify that Nightshift's required system dependencies (qsv, flock, jq) are installed and on PATH. Use when the user invokes /nightshift:doctor.
Start or resume execution of a Nightshift shift by forking into the manager subagent. Use when the user invokes /nightshift:start.
Run a single Nightshift task on a single table item for testing — without modifying table.csv or manager.md. Spawns a claude -p subprocess of /nightshift:do-task with --read-only. Use when the user invokes /nightshift:test-task.
| name | nightshift:archive |
| description | Archive a Nightshift shift by moving its directory to .nightshift/archive/YYYY-MM-DD-<name>/. Use when the user invokes /nightshift:archive. |
| disable-model-invocation | true |
| allowed-tools | Bash(qsv *) Bash(flock *) Bash(test *) Bash(ls *) |
| argument-hint | ["shift-name"] |
Archive shift $ARGUMENTS.
Steps
Resolve the shift
$ARGUMENTS is non-empty, use it..nightshift/ (excluding archive/); auto-select if exactly one exists, otherwise use AskUserQuestion to pick.Validate the shift exists
Check .nightshift/<shift>/ exists. If not, report the error and stop.
Check for incomplete items
For each task column (from flock -x .nightshift/<shift>/table.csv qsv headers --just-names .nightshift/<shift>/table.csv):
flock -x .nightshift/<shift>/table.csv qsv search --exact done --select <task-column> --invert-match .nightshift/<shift>/table.csv | qsv count
If any non-done items exist, break down by status:
flock -x .nightshift/<shift>/table.csv qsv search --exact todo --select <task-column> .nightshift/<shift>/table.csv | qsv count
flock -x .nightshift/<shift>/table.csv qsv search --exact failed --select <task-column> .nightshift/<shift>/table.csv | qsv count
Warn the user with the breakdown and use AskUserQuestion to confirm:
"Archive anyway?"
Options: "Yes, archive with incomplete items" / "No, cancel". If the user cancels, stop.
Run the bundled archive script
${CLAUDE_SKILL_DIR}/scripts/archive.sh <shift>
The script computes today's date in ISO format and moves the directory atomically. It exits non-zero on collision (.nightshift/archive/YYYY-MM-DD-<shift>/ already exists).
Confirm
## Shift Archived
**Shift:** <shift>
**Location:** `.nightshift/archive/YYYY-MM-DD-<shift>/`
All files preserved (manager.md, table.csv, task files).
Guardrails
YYYY-MM-DD format for the archive prefix..md files).