purge

GitHub

用于永久删除项目中的 Nightshift 状态数据(如 punch lists、规则等),清理 .nightshift 目录,但不卸载全局插件。执行前需确认路径以确保安全。

plugins/nightshift/skills/purge/SKILL.md orwa-mahmoud/nightshift

Trigger Scenarios

用户要求移除或清理项目的 Nightshift 配置和数据 需要重置 Nightshift 工作区状态但保留插件安装

Install

npx skills add orwa-mahmoud/nightshift --skill purge -g -y
More Options

Non-standard path

npx skills add https://github.com/orwa-mahmoud/nightshift/tree/main/plugins/nightshift/skills/purge -g -y

Use without installing

npx skills use orwa-mahmoud/nightshift@purge

指定 Agent (Claude Code)

npx skills add orwa-mahmoud/nightshift --skill purge -a claude-code -g -y

安装 repo 全部 skill

npx skills add orwa-mahmoud/nightshift --all -g -y

预览 repo 内 skill

npx skills add orwa-mahmoud/nightshift --list

SKILL.md

Frontmatter
{
    "name": "purge",
    "license": "MIT",
    "metadata": {
        "internal": true
    },
    "description": "Permanently delete this project's Nightshift state, including punch lists, rules, receipts and archives; does not uninstall the plugin."
}

Remove Nightshift from this project. This deletes punch lists, rules, receipts, archives, and history under the project's .nightshift/ directory. It does not uninstall the global Nightshift plugin.

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/purge/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.

Print the exact canonical $NS path. Warn that punch lists, rules, receipts, archives, and history will be lost, and that the plugin itself stays installed. Do not run the helper until the owner confirms that exact path. Then:

"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns" purge-workspace \
  --confirm-path "$NS"

The helper first performs Reset, then deletes only that validated .nightshift/ directory and a local .nightshift-link on the opened task root when present. It refuses symlinks, malformed links, workspace roots, home directories, /, and other broad paths. It never deletes repository files outside that Nightshift state. A second Purge with the same confirmation is safe.

If the task root is linked, pass the folder you opened as --project "$TASK_ROOT". This is the one command whose target is the task root rather than the workspace, so it is the one place the dispatcher's answer is not the one you want: purging only the workspace path leaves the host link in place.

Version History

  • 0476ca0 Current 2026-11-25 11:58

Same Skill Collection

plugins/nightshift/skills/archive/SKILL.md
plugins/nightshift/skills/customize/SKILL.md
plugins/nightshift/skills/doctor/SKILL.md
plugins/nightshift/skills/hunt/SKILL.md
plugins/nightshift/skills/import-issues/SKILL.md
plugins/nightshift/skills/nightshift/SKILL.md
plugins/nightshift/skills/plan-exit/SKILL.md
plugins/nightshift/skills/plan/SKILL.md
plugins/nightshift/skills/quality/SKILL.md
plugins/nightshift/skills/reset/SKILL.md
plugins/nightshift/skills/schedule/SKILL.md
plugins/nightshift/skills/setup/SKILL.md
plugins/nightshift/skills/start/SKILL.md
plugins/nightshift/skills/status/SKILL.md
plugins/nightshift/skills/stop/SKILL.md
skills/install-nightshift/SKILL.md

Metadata

Files
0
Version
0476ca0
Hash
3572b917
Indexed
2026-11-25 11:58

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-25 18:52
浙ICP备14020137号-1