Skip to main content
skill CX Codex

purge — Claude Code skill: remove Nightshift state

The purge Claude Code skill deletes Nightshift state from a project. It prints the .nightshift/ path and waits for the owner to confirm before deletion.

MIT ★ 571 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add orwa-mahmoud/nightshift --skill purge -a claude-code
Open on GitHub

What purge does

The skill removes a project's Nightshift punch lists, rules, receipts, archives, and history stored in .nightshift/. The Nightshift plugin stays installed. It prints the exact $NS path first, and runs the cleanup only after the owner confirms that path.

The runtime/ns helper resolves the workspace and host, then removes only the validated .nightshift/ directory and, if present, a local .nightshift-link on the opened task root. It rejects symlinks and broad targets such as home directories or /. For a linked task root, pass the opened folder with --project "$TASK_ROOT"; otherwise the host link remains.

What it helps with

  • remove Nightshift punch lists and rules from a project
  • delete project receipts, archives, and history
  • clear the local .nightshift-link when purging a linked task root

Example prompts for the agent

  • Delete this project's Nightshift state, show me the exact path, and wait for my confirmation.
  • Remove .nightshift/ and the local .nightshift-link from the opened task root.
  • Show the $NS path and explain what will be deleted before asking me to confirm.

How to install purge

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/purge/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/purge/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about purge

How do I install purge in Claude Code?

Run npx skills add orwa-mahmoud/nightshift --skill purge -a claude-code. The skill file is available at ~/.claude/skills/purge/SKILL.md.

What does purge do?

It deletes the current project's Nightshift state: punch lists, rules, receipts, archives, and history under .nightshift/. The plugin remains installed.

How does purge limit what it deletes?

It shows the exact $NS path and waits for the owner to confirm. The helper removes only a validated .nightshift/ directory and a local .nightshift-link when present; it rejects symlinks and broad targets.

Source text

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

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:

```bash
"$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.

© orwa-mahmoud · MIT · orwa-mahmoud/nightshift

Similar skills

SKILL.md skills catalog →
ctx-purge mksglu ctx-purge — a skill to permanently delete project context data in bulk or by session. Wipes the knowledge base, session records, and stats — this action cannot be undone. CX Codex +1 1,600installs find-skills vercel-labs find-skills is a Claude Code skill that locates agent skills for a task and helps assess the results. It activates when someone asks for a capability that may already be installable. CX Codex +1 4,400,000installs frontend-design official anthropics The frontend-design skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. CX Codex +1 1,025,790installs agent-browser vercel-labs This Claude Code skill automates browser interaction for tasks like navigating sites, filling forms, and testing web apps. It also supports exploratory QA and Electron app automation. CX Codex +1 1,600,000installs design-taste-frontend Leonxlnx The design-taste-frontend Claude Code skill sets design rules and checks for websites. It activates for new pages, redesigns, and requests to fix a generic-looking site. CX Codex +1 802,600installs grill-me Matt Pocock grill-me interviews you about a plan or design to expose gaps and sharpen decisions. Use it before implementation starts. CX Codex +1 1,424,476installs grill-with-docs Matt Pocock The grill-with-docs skill interviews you about a plan or design and creates ADRs and a glossary along the way. Use it when decisions need sharper definition. CX Codex +1 1,219,756installs

From the same set17

The whole set →
setup The setup Claude Code skill prepares Nightshift in a project and proposes quality checks through at most four questions. It creates .nightshift/ without enabling checks on its own. CX Codex +1 ★ 571repo stars schedule Prints scheduler configuration for starting a shift at a set time. It checks the Nightshift workspace and queued work before generating it. CX Codex +1 ★ 571repo stars reset The reset Claude Code skill clears damaged or confusing runtime state in an open project. It removes temporary markers and the deadline while preserving work and evidence. CX Codex +1 ★ 571repo stars quality This Claude Code skill groups project quality work into a single shift. It starts on requests about tests, accessibility, documentation, contracts, or security. CX Codex +1 ★ 571repo stars plan This Claude Code skill opens a planning room to explore a project and shape the work with its owner. Implementation waits until the owner deliberately leaves the room. CX Codex +1 ★ 571repo stars plan-exit The plan-exit Claude Code skill checks whether plan mode is closed and names the next step toward implementation. It reads the room status and staged items. CX Codex +1 ★ 571repo stars nightshift The nightshift Claude Code skill works through a project punch list during an autonomous shift. Start it with a request to work on the project, with or without a time budget. CX Codex +1 ★ 571repo stars import-issues The import-issues Claude Code skill stages selected GitHub issues as project drafts. It previews each issue before asking which ones to add. CX Codex +1 ★ 571repo stars

Project sponsors

Companies that keep this analytics open