purge

Deletes a project's Nightshift state directory after path validation and owner confirmation.

63|3|Updated Jul 14, 2026
One-click install
npx skills add https://github.com/orwa-mahmoud/nightshift --skill purge-orwa-mahmoud
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: purge
Source: https://github.com/orwa-mahmoud/nightshift/tree/main/plugins/nightshift/skills/purge
Command: npx skills add https://github.com/orwa-mahmoud/nightshift --skill purge-orwa-mahmoud

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When you want to remove Nightshift's working data from a project, manually deleting the .nightshift/ directory risks targeting the wrong path, following a symlink, or wiping more than intended. This Skill performs a guarded, confirmed deletion of punch lists, rules, receipts, archives, and history without touching the installed plugin or repository files. ## Core Features & Use Cases - Validated deletion: Resolves the canonical workspace path, prints it, and requires the owner to confirm that exact path before running the purge helper. - Safety guards: Refuses symlinks, malformed links, workspace roots, home directories, /, and other broad paths; never deletes repository files outside Nightshift state. - Linked task roots: Handles projects linked via .nightshift-link by targeting the opened task root with --project so the host link is removed too. - Use Case: After finishing a long-running Nightshift contract on a repository, you want a clean slate. Invoke the purge flow, confirm the printed .nightshift/ path, and all receipts, archives, and punch lists are removed while the global plugin stays installed. ## Quick Start Ask the agent to purge this project's Nightshift state, review the exact path it prints, and confirm to permanently delete it.

Frequently Asked Questions about purge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delete Nightshift data from a project?

Run the purge flow, which resolves the canonical .nightshift/ path, prints it, and asks you to confirm that exact path. After confirmation, the ns purge-workspace helper deletes punch lists, rules, receipts, archives, and history.

Does purging Nightshift uninstall the plugin?

No, purging only deletes the project's .nightshift/ state directory and a local .nightshift-link when present. The globally installed Nightshift plugin remains installed and can be used on other projects.

Can purge delete files outside the .nightshift directory?

No, the helper refuses symlinks, malformed links, workspace roots, home directories, root paths, and other broad targets. It never deletes repository files outside the validated Nightshift state directory.

What happens if I run purge twice with the same confirmation?

A second purge with the same confirmation is safe. The helper validates the target each time and only deletes the confirmed .nightshift/ directory, so repeated runs do not cause additional damage.

How do I purge a project that uses a linked task root?

Pass the folder you opened as --project "$TASK_ROOT" to the purge command. Purging only the workspace path would leave the host link in place, so the task root must be targeted directly.