# Unharness

Safely leave Citadel using the active adoption receipt.

- Repository: https://github.com/SethGammon/Citadel (927 stars)
- Category: Writing
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add SethGammon/Citadel --skill unharness -g -a claude-code -y`
Codex: `npx skills add SethGammon/Citadel --skill unharness -g -a codex -y`
Cursor: `npx skills add SethGammon/Citadel --skill unharness -g -a cursor -y`
Gemini CLI: `npx skills add SethGammon/Citadel --skill unharness -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add SethGammon/Citadel`

## Description

Safely leave Citadel using the active adoption receipt. Produces a no-write, reviewable plan, preserves a portable archive, removes only exact owned material, and reports modified or externally registered surfaces as retained or unknown. Legacy installs must be imported before exact leave is claimed.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /unharness - Receipt-owned exit from Citadel

## Orientation

Use this skill when the user wants Citadel removed from a project. Exit is a
two-step, receipt-owned operation. A plan never mutates the project. Apply
requires the exact saved plan and its confirmation token.

Do not infer ownership from familiar paths. Do not delete `.planning/`,
`.citadel/`, runtime settings, hooks, skills, or registrations merely because
they look Citadel-related.

## Protocol

### 1. Locate Citadel and inspect adoption authority

Read `.citadel/plugin-root.txt` when present. Otherwise use the directory
containing this skill. Check for `.citadel/adoption/active.json`; the adoption
planner also checks the private recovery ledger.

### 2. Create a no-write leave plan

Choose a plan path inside the project, such as
`.planning/adoption/leave.plan.json`, and run:

```bash
node {citadelRoot}/scripts/adopt.js leave plan \
  --target {projectRoot} \
  --out {planPath} \
  --json
```

Show the user:

- exact files that will be removed or restored;
- modified or ambiguous footprint entries that will be retained;
- portable archive path;
- runtime registrations whose removal evidence is `unknown`;
- the plan digest and confirmation token.

If the result is `NOT_ADOPTED`, stop. Create a conservative legacy inventory:

```bash
node {citadelRoot}/scripts/adopt.js import plan {citadelRoot} \
  --target {projectRoot} \
  --out {importPlanPath} \
  --json
```

Apply that import only after its own explicit approval. Then create a new leave
plan from the resulting receipt. Never describe legacy cleanup as exact
removal.

### 3. Obtain explicit approval

Leaving is destructive. Ask the user to approve the displayed plan and exact
confirmation token. Do not apply from an unsaved or regenerated plan.

### 4. Apply and verify

After approval:

```bash
node {citadelRoot}/scripts/adopt.js leave apply {planPath} \
  --confirm {confirmationToken} \
  --json

The rest: https://github.com/SethGammon/Citadel/blob/HEAD/skills/unharness/SKILL.md
