mcpField
R
remove

remove

github.com/terrylicaAgent workflows271 installsUpdated 1d ago
Repository

About remove

A skill for removing OpenWolf from the current project, including project-specific files, hooks, configuration entries, and its registry entry. It preserves unrelated hooks and files, while global binary removal requires separate user approval.

Key features

  1. 01Removes project-level OpenWolf files
  2. 02Filters matching hooks from settings
  3. 03Removes project registry entry
  4. 04Optionally uninstalls global binary
  5. 05Verifies removal results

Use cases

  1. 01Remove OpenWolf from a project
  2. 02Clean up project hooks and rules
  3. 03Uninstall the global binary with approval

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/terrylica/cc-skills --skill remove

After installing, type/removein Claude Code to confirm it loaded.

Details

From the project README

Remove OpenWolf

Cleanly tear down openwolf for the current project (cwd at invocation). The npm package ships no uninstall command — this skill is the canonical removal path.

Self-Evolving Skill: If openwolf changes its file layout, hook substring, or registry shape — fix this file. Only for real, reproducible drift.

What gets removed (all from the current project)

  1. .wolf/ directory (data + hook scripts)
  2. Hook entries in .claude/settings.json whose command includes .wolf/hooks/ — every other hook is preserved verbatim
  3. .claude/rules/openwolf.md
  4. The 225-byte openwolf snippet at the top of CLAUDE.md (only that block; rest of file untouched)
  5. PM2 daemon openwolf-$(basename "$PROJECT_ROOT") (if PM2 is installed)
  6. Project entry in ~/.openwolf/registry.json

What does NOT get removed

  • The global openwolf npm binary (separate decision; ask user explicitly).
  • Backups under .wolf/backups/ are removed with .wolf/ itself — if you need them, copy out first.

Workflow

Step 1: Confirm with user

Use AskUserQuestion. List all six removal targets above. Offer:

  • Yes, remove openwolf from this project (default)
  • Also uninstall the global openwolf binary (extra step, runs pnpm remove -g openwolf || npm uninstall -g openwolf)
  • Cancel — exit cleanly
Step 2: Capture project basename for PM2 daemon name
PROJECT_ROOT="$(pwd)"
PROJECT_BASE="$(basename "$PROJECT_ROOT")"
PLUGIN_DIR="$(cc-plugin-root openwolf)"
Step 3: Run the removal script
bash "$PLUGIN_DIR/scripts/openwolf-remove.sh"

The script handles all six targets with set -e + step-level error reporting. It is idempotent — every step uses || true for the "already absent" case but reports each action.

Step 4: Optional — uninstall global binary

If the user chose this in step 1:

if command -v pnpm >/dev/null; then pnpm remove -g openwolf
elif command -v bun  >/dev/null; then bun remove -g openwolf
else                                 npm uninstall -g openwolf
fi
Step 5: Verify
[ ! -d "$PROJECT_ROOT/.wolf" ] && echo "  ✓ .wolf/ removed"
[ ! -f "$PROJECT_ROOT/.claude/rules/openwolf.md" ] && echo "  ✓ rules file removed"
grep -q '\.wolf/hooks/' "$PROJECT_ROOT/.claude/settings.json" 2>/dev/null && echo "  ✗ stray .wolf/hooks/ entry in settings.json — investigate" || echo "  ✓ settings.json clean"
grep -q '@\.wolf/OPENWOLF\.md' "$PROJECT_ROOT/CLAUDE.md" 2>/dev/null && echo "  ✗ snippet still in CLAUDE.md — investigate" || echo "  ✓ CLAUDE.md clean"
Step 6: Report

Summarize what was removed and what (if anything) was left behind on purpose.

Post-Execution Reflection

  1. Locate yourself. — This SKILL.md path.
  2. Did the removal script error on any step? — Fix the script (scripts/openwolf-remove.sh), not just this skill.
  3. Did openwolf change its CLAUDE.md snippet? — Update both the script's removal pattern AND the verify regex above.
  4. Did the registry shape change? — Update the node block in the script.

The script scripts/openwolf-remove.sh is the load-bearing component — keep it precise.

Comments

Markdown supported