uninstall

GitHub

用于卸载 claude-ops 插件及其所有关联数据,包括凭证、缓存、偏好设置和 MCP 注册。通过交互式确认逐步执行清理,确保操作安全可控。

claude-ops/skills/uninstall/SKILL.md Lifecycle-Innovations-Limited/claude-ops

Trigger Scenarios

用户请求卸载 ops 移除 claude-ops

Install

npx skills add Lifecycle-Innovations-Limited/claude-ops --skill uninstall -g -y
More Options

Non-standard path

npx skills add https://github.com/Lifecycle-Innovations-Limited/claude-ops/tree/main/claude-ops/skills/uninstall -g -y

Use without installing

npx skills use Lifecycle-Innovations-Limited/claude-ops@uninstall

指定 Agent (Claude Code)

npx skills add Lifecycle-Innovations-Limited/claude-ops --skill uninstall -a claude-code -g -y

安装 repo 全部 skill

npx skills add Lifecycle-Innovations-Limited/claude-ops --all -g -y

预览 repo 内 skill

npx skills add Lifecycle-Innovations-Limited/claude-ops --list

SKILL.md

Frontmatter
{
    "name": "uninstall",
    "effort": "low",
    "maxTurns": 15,
    "description": "OPS on-demand: This skill should be used when the user asks to \"uninstall ops\", \"remove claude-ops\", or…",
    "allowed-tools": [
        "Bash",
        "Read",
        "AskUserQuestion"
    ],
    "argument-hint": "[--confirm]",
    "disable-model-invocation": true
}

OPS > UNINSTALL

Load ops-rules before acting. Public repo (no personal data). Outbound: one draft → one approval → one send. If AskUserQuestion / Workflow are missing, follow Rule 10 in ops-rules (Hermes: numbered options / two-turn Telegram card; delegate_task).

You are running a complete uninstall of the claude-ops plugin. This removes everything the plugin and /ops:setup created. Every deletion step requires user confirmation via AskUserQuestion — never delete silently.


Step 1 — Confirm intent

Use AskUserQuestion:

This will completely remove claude-ops and all its data:
  - Plugin installation and marketplace registration
  - Stored preferences and project registry
  - Cached plugin files
  - Keychain credentials (Telegram, Slack tokens)
  - Shell profile exports (CLAUDE_PLUGIN_ROOT)
  - MCP server registrations (Telegram, Slack)

  [Uninstall everything]  [Cancel]

If cancelled, stop immediately.


Step 2 — Detect what exists

Scan for all claude-ops artifacts. Build a list of what's present:

# Preferences
PREFS_DIR="${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}"
ls -la "$PREFS_DIR" 2>/dev/null

# Cache
CACHE_DIR="$HOME/.claude/plugins/cache/ops-marketplace"
ls -la "$CACHE_DIR" 2>/dev/null

# Keychain entries (macOS)
for key in telegram-api-id telegram-api-hash telegram-phone telegram-session slack-xoxc slack-xoxd; do
  security find-generic-password -s "$key" 2>/dev/null && echo "FOUND: $key"
done

# Shell profile exports
grep -l 'CLAUDE_PLUGIN_ROOT' ~/.zshrc ~/.bashrc ~/.zprofile ~/.bash_profile 2>/dev/null

# MCP registrations
grep -l 'telegram\|slack-mcp' ~/.claude.json 2>/dev/null

Print a summary of what was found, then proceed to delete each category.


Step 3 — Remove keychain credentials

For each found keychain entry, ask via AskUserQuestion:

Remove keychain credential: <key-name>?
  [Yes]  [Skip]

On Yes:

security delete-generic-password -s "<key-name>" 2>/dev/null

Step 4 — Remove preferences and cache

Ask via AskUserQuestion:

Remove plugin data?
  - Preferences: <prefs-dir>
  - Cache: <cache-dir>

  [Yes, delete both]  [Skip]

On Yes:

rm -rf "$PREFS_DIR"
rm -rf "$CACHE_DIR"

Step 5 — Clean shell profile

For each shell profile file that contains CLAUDE_PLUGIN_ROOT:

Ask via AskUserQuestion:

Remove CLAUDE_PLUGIN_ROOT export from <file>?
  [Yes]  [Skip]

On Yes, read the file and remove lines containing CLAUDE_PLUGIN_ROOT. Use sed or similar — do NOT rewrite the entire file. Only remove the specific export line.

sed -i '' '/CLAUDE_PLUGIN_ROOT/d' "<file>"

Step 6 — Remove MCP registrations

Check if ~/.claude.json contains MCP server entries added by the plugin (telegram, slack-mcp). For each:

Ask via AskUserQuestion:

Remove MCP server registration: <server-name> from ~/.claude.json?
  [Yes]  [Skip]

On Yes, use jq to remove the entry:

jq 'del(.mcpServers["<server-name>"])' ~/.claude.json > /tmp/claude-json-tmp && mv /tmp/claude-json-tmp ~/.claude.json

Step 7 — Remove plugin from Claude Code settings

The /plugin uninstall UI does not always clean up settings files. Directly remove all ops references from the JSON config files that Claude Code reads on startup.

7a — Remove from installed_plugins.json

INSTALLED="$HOME/.claude/plugins/installed_plugins.json"
if [ -f "$INSTALLED" ] && grep -q 'ops.*marketplace' "$INSTALLED"; then
  python3 -c "
import json, sys
with open('$INSTALLED') as f: data = json.load(f)
keys_to_remove = [k for k in data.get('plugins', {}) if 'ops-marketplace' in k or 'ops@ops' in k]
for k in keys_to_remove: del data['plugins'][k]
with open('$INSTALLED', 'w') as f: json.dump(data, f, indent=2)
print(f'Removed {len(keys_to_remove)} entries from installed_plugins.json')
"
else
  echo "No ops entries in installed_plugins.json"
fi

7b — Remove from known_marketplaces.json

KNOWN="$HOME/.claude/plugins/known_marketplaces.json"
if [ -f "$KNOWN" ] && grep -q 'ops-marketplace' "$KNOWN"; then
  python3 -c "
import json
with open('$KNOWN') as f: data = json.load(f)
keys_to_remove = [k for k in data if 'ops-marketplace' in k or 'ops' in k.lower()]
for k in keys_to_remove: del data[k]
with open('$KNOWN', 'w') as f: json.dump(data, f, indent=2)
print(f'Removed {len(keys_to_remove)} marketplace entries from known_marketplaces.json')
"
else
  echo "No ops marketplace in known_marketplaces.json"
fi

7c — Remove from settings.json and settings.local.json

Both ~/.claude/settings.json and ~/.claude/settings.local.json may contain enabledPlugins entries and stale permissions.allow entries referencing ops-marketplace paths.

for SETTINGS_FILE in "$HOME/.claude/settings.json" "$HOME/.claude/settings.local.json"; do
  [ -f "$SETTINGS_FILE" ] || continue
  if grep -q 'ops' "$SETTINGS_FILE"; then
    python3 -c "
import json, re
with open('$SETTINGS_FILE') as f: data = json.load(f)
# Remove ops from enabledPlugins
ep = data.get('enabledPlugins', {})
ops_keys = [k for k in ep if 'ops' in k.lower()]
for k in ops_keys: del ep[k]
# Remove ops-marketplace permission entries
perms = data.get('permissions', {})
if 'allow' in perms:
  before = len(perms['allow'])
  perms['allow'] = [p for p in perms['allow'] if 'ops-marketplace' not in p and 'claude-ops' not in p]
  removed = before - len(perms['allow'])
else:
  removed = 0
# Remove ops from extraKnownMarketplaces
ekm = data.get('extraKnownMarketplaces', {})
ekm_keys = [k for k in ekm if 'ops' in k.lower()]
for k in ekm_keys: del ekm[k]
with open('$SETTINGS_FILE', 'w') as f: json.dump(data, f, indent=2)
print(f'Cleaned $SETTINGS_FILE: {len(ops_keys)} plugin entries, {removed} permissions, {len(ekm_keys)} extra marketplaces')
"
  else
    echo "No ops references in $SETTINGS_FILE"
  fi
done

7d — Remove marketplace and cache directories

rm -rf "$HOME/.claude/plugins/marketplaces/ops-marketplace" 2>/dev/null
rm -rf "$HOME/.claude/plugins/cache/ops-marketplace" 2>/dev/null
rm -rf "$HOME/.claude/plugins/data/ops-inline" 2>/dev/null
echo "Removed marketplace, cache, and data directories"

Step 8 — Final confirmation

Print:

claude-ops has been completely removed.

  Keychain:    <N> credentials deleted
  Preferences: deleted
  Cache:       deleted
  Shell:       <N> exports removed
  MCP:         <N> servers removed
  Settings:    cleaned (installed_plugins, known_marketplaces, settings)
  Directories: removed (marketplace, cache, data)

Run `/reload-plugins` then `/plugin` in Claude Code to verify ops no longer appears.

To reinstall later:
  /reload-plugins
  /plugin marketplace add Lifecycle-Innovations-Limited/claude-ops
  /plugin install ops@lifecycle-innovations-limited-claude-ops
  /reload-plugins
  /ops:setup

Version History

  • 6f1e3e0 Current 2026-08-27 09:34

    新增对偏好设置、缓存、密钥链、Shell 配置和 MCP 注册的具体检测与删除步骤实现;移除版本中缺失的脚本细节。

  • 64bad13 2026-08-12 09:02

Same Skill Collection

claude-ops/skills/boss/SKILL.md
claude-ops/skills/flow/SKILL.md
claude-ops/skills/humanizer/SKILL.md
claude-ops/skills/ledger/SKILL.md
claude-ops/skills/ops-accounts/SKILL.md
claude-ops/skills/ops-ar/SKILL.md
claude-ops/skills/ops-aws-audit/SKILL.md
claude-ops/skills/ops-comms/SKILL.md
claude-ops/skills/ops-competitors/SKILL.md
claude-ops/skills/ops-credentials/SKILL.md
claude-ops/skills/ops-daemon/SKILL.md
claude-ops/skills/ops-dash/SKILL.md
claude-ops/skills/ops-deploy-fix/SKILL.md
claude-ops/skills/ops-deploy/SKILL.md
claude-ops/skills/ops-desk/SKILL.md
claude-ops/skills/ops-desktop/SKILL.md
claude-ops/skills/ops-doctor/SKILL.md
claude-ops/skills/ops-ecom/SKILL.md
claude-ops/skills/ops-feature-dev/SKILL.md
claude-ops/skills/ops-fires/SKILL.md
claude-ops/skills/ops-fleet/SKILL.md
claude-ops/skills/ops-go/SKILL.md
claude-ops/skills/ops-gtm/SKILL.md
claude-ops/skills/ops-home/SKILL.md
claude-ops/skills/ops-humanizer/SKILL.md
claude-ops/skills/ops-inbox/SKILL.md
claude-ops/skills/ops-integrate/SKILL.md
claude-ops/skills/ops-leadgen/SKILL.md
claude-ops/skills/ops-linear/SKILL.md
claude-ops/skills/ops-mac/SKILL.md
claude-ops/skills/ops-marketing/SKILL.md
claude-ops/skills/ops-mcp/SKILL.md
claude-ops/skills/ops-merge/SKILL.md
claude-ops/skills/ops-monitor/SKILL.md
claude-ops/skills/ops-next/SKILL.md
claude-ops/skills/ops-orchestrate/SKILL.md
claude-ops/skills/ops-package/SKILL.md
claude-ops/skills/ops-pocket/SKILL.md
claude-ops/skills/ops-projects/SKILL.md
claude-ops/skills/ops-recap/SKILL.md
claude-ops/skills/ops-release/SKILL.md
claude-ops/skills/ops-resume/SKILL.md
claude-ops/skills/ops-revenue/SKILL.md
claude-ops/skills/ops-rotate-setup/SKILL.md
claude-ops/skills/ops-rotate/SKILL.md
claude-ops/skills/ops-rules/SKILL.md
claude-ops/skills/ops-secret-sync/SKILL.md
claude-ops/skills/ops-settings/SKILL.md
claude-ops/skills/ops-ship/SKILL.md
claude-ops/skills/ops-social-planner/SKILL.md

Metadata

Files
0
Version
057e72d
Hash
173eea9e
Indexed
2026-08-12 09:02

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-26 01:17
浙ICP备14020137号-1