Agent SkillsSethGammon/Citadel › unharness

unharness

GitHub

用于安全移除 Citadel 插件的 Skill。通过读取采纳凭证生成不可变删除计划,执行精确文件清理并保留归档,确保无副作用退出。

skills/unharness/SKILL.md SethGammon/Citadel

Trigger Scenarios

用户希望完全移除项目中的 Citadel 需要导出 Citadel 状态但不删除文件

Install

npx skills add SethGammon/Citadel --skill unharness -g -y
More Options

Use without installing

npx skills use SethGammon/Citadel@unharness

指定 Agent (Claude Code)

npx skills add SethGammon/Citadel --skill unharness -a claude-code -g -y

安装 repo 全部 skill

npx skills add SethGammon/Citadel --all -g -y

预览 repo 内 skill

npx skills add SethGammon/Citadel --list

SKILL.md

Frontmatter
{
    "name": "unharness",
    "license": "MIT",
    "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.",
    "auto-trigger": false,
    "last-updated": 1785369600,
    "user-invocable": true,
    "trigger_keywords": [
        "unharness",
        "remove citadel",
        "uninstall citadel",
        "clean up citadel",
        "remove harness",
        "uninstall harness"
    ]
}

/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:

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:

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:

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

node {citadelRoot}/scripts/adopt.js doctor \
  --target {projectRoot} \
  --json

Doctor may report not_adopted after a clean leave. Report the leave receipt, archive path, removed entries, retained conflicts, and every unknown unregistration observation. “Citadel removed” is permitted only when the receipt proves every required local and external removal.

Export-only compatibility

When the user explicitly wants a human-readable export without leaving:

node {citadelRoot}/scripts/unharness.js {projectRoot} --export-only

This writes the legacy Markdown archive but does not remove harness material.

Fringe Cases

  • If .planning/ does not exist, treat it as an empty portable-state set and show the setup/import hint; do not create it merely to leave.
  • Missing or invalid adoption authority blocks leave. Use import plan or private-ledger recovery; never guess ownership.
  • A changed saved plan, source, target, or pre-image requires a fresh plan.
  • An unavailable runtime unregister API stays unknown; report the manual observation required.
  • If the Citadel root cannot be located, stop with the exact missing path.

Quality gates

  • Planning is read-only unless the user explicitly requests --out.
  • Apply consumes the exact saved plan and revalidates source, target, and pre-images.
  • Modified owned material is retained with an explicit conflict.
  • Shared runtime files restore exact pre-images only while installed bytes remain exact.
  • Missing receipts, malformed receipts, and unenumerable registrations are unknown or blocked, never successful.
  • The portable archive and private receipt ledger remain available for restore and recovery.

Exit Protocol

Return the leave operation ID and receipt digest, portable archive path, exact removed/restored counts, retained conflicts, and unknown external removals. State plainly whether exact exit was proved. Do not claim success from a completed command when required removal evidence is missing.

Version History

  • d33c70c Current 2026-08-20 02:48

    重构为基于采纳凭证的两步协议,引入计划验证、精确所有权检查及导入流程,替代原有的直接脚本调用方式。

  • 4bac8cd 2026-07-25 08:46

Same Skill Collection

skills/architect/SKILL.md
skills/archon/SKILL.md
skills/ascii-diagram/SKILL.md
skills/autopilot/SKILL.md
skills/cost/SKILL.md
skills/create-app/SKILL.md
skills/create-skill/SKILL.md
skills/daemon/SKILL.md
skills/dashboard/SKILL.md
skills/decision-map/SKILL.md
skills/deploy-steward/SKILL.md
skills/design/SKILL.md
skills/do/SKILL.md
skills/doc-gen/SKILL.md
skills/evolve/SKILL.md
skills/experiment/SKILL.md
skills/fleet/SKILL.md
skills/grill/SKILL.md
skills/houseclean/SKILL.md
skills/improve/SKILL.md
skills/infra-audit/SKILL.md
skills/learn/SKILL.md
skills/live-preview/SKILL.md
skills/loop/SKILL.md
skills/map/SKILL.md
skills/marshal/SKILL.md
skills/merge-review/SKILL.md
skills/organize/SKILL.md
skills/postmortem/SKILL.md
skills/pr-watch/SKILL.md
skills/prd/SKILL.md
skills/qa/SKILL.md
skills/refactor/SKILL.md
skills/research-fleet/SKILL.md
skills/research/SKILL.md
skills/review/SKILL.md
skills/scaffold/SKILL.md
skills/schedule/SKILL.md
skills/session-handoff/SKILL.md
skills/setup/SKILL.md
skills/systematic-debugging/SKILL.md
skills/telemetry/SKILL.md
skills/test-gen/SKILL.md
skills/triage/SKILL.md
skills/verify/SKILL.md
skills/watch/SKILL.md
skills/wiki/SKILL.md
skills/workspace/SKILL.md
scripts/fixtures/ecosystem/anthropics-template-skill/SKILL.md

Metadata

Files
0
Version
d33c70c
Hash
974d435e
Indexed
2026-07-25 08:46

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 04:05
浙ICP备14020137号-1 $mapa de visitantes$