uninstall について
claude-ops プラグインと作成された関連データを完全に削除する Claude Code スキルです。ファイルや設定を調べ、削除する項目ごとに確認を求めます。
主な機能
- 01プラグインデータとキャッシュの検出
- 02確認後の認証情報と設定の削除
- 03シェルのエクスポートと MCP 登録の整理
- 04Claude Code のプラグイン設定の更新
活用シーン
- 01不要になった claude-ops の削除
- 02削除前のプラグイン残存物の確認
MCP 対応
~/.claude.json にある Telegram と Slack の MCP 登録を確認し、削除する選択肢を提示します。
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ davepoon/ buildwithclaude --skill uninstallインストール後、Claude Code で/uninstallを入力して読み込まれたか確認します。
詳細
OPS > アンインストール
claude-ops プラグインを完全にアンインストールしています。これにより、プラグインと /ops:setup が作成したすべてのものが削除されます。削除手順では必ず AskUserQuestion でユーザーの確認を得てください。確認なしに削除してはいけません。
ステップ 1 — 意図の確認
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]
キャンセルされた場合は、ただちに停止します。
ステップ 2 — 存在するものを検出
claude-ops のアーティファクトをすべてスキャンします。存在するものの一覧を作成します。
# 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
見つかったものの概要を表示してから、各カテゴリの削除に進みます。
ステップ 3 — キーチェーンの認証情報を削除
見つかったキーチェーンエントリごとに、AskUserQuestion で確認します。
Remove keychain credential: <key-name>?
[Yes] [Skip]
「はい」の場合:
security delete-generic-password -s "<key-name>" 2>/dev/null
ステップ 4 — 設定とキャッシュを削除
AskUserQuestion で確認します。
Remove plugin data?
- Preferences: <prefs-dir>
- Cache: <cache-dir>
[Yes, delete both] [Skip]
「はい」の場合:
rm -rf "$PREFS_DIR"
rm -rf "$CACHE_DIR"
ステップ 5 — シェルプロファイルをクリーンアップ
CLAUDE_PLUGIN_ROOT を含むシェルプロファイルファイルごとに、次の操作を行います。
AskUserQuestion で確認します。
Remove CLAUDE_PLUGIN_ROOT export from <file>?
[Yes] [Skip]
「はい」の場合、ファイルを読み込み、CLAUDE_PLUGIN_ROOT を含む行を削除します。sed などを使用してください。ファイル全体を書き換えてはいけません。特定のエクスポート行だけを削除します。
sed -i '' '/CLAUDE_PLUGIN_ROOT/d' "<file>"
ステップ 6 — MCP の登録を削除
~/.claude.json にプラグインが追加した MCP サーバーエントリ(telegram、slack-mcp)が含まれているか確認します。各エントリについて、次の操作を行います。
AskUserQuestion で確認します。
Remove MCP server registration: <server-name> from ~/.claude.json?
[Yes] [Skip]
「はい」の場合、jq を使用してエントリを削除します。
jq 'del(.mcpServers["<server-name>"])' ~/.claude.json > /tmp/claude-json-tmp && mv /tmp/claude-json-tmp ~/.claude.json
ステップ 7 — Claude Code の設定からプラグインを削除
/plugin uninstall の UI では、設定ファイルが常にクリーンアップされるとは限りません。Claude Code が起動時に読み込む JSON 設定ファイルから、ops に関するすべての参照を直接削除します。
7a — 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 — 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 — settings.json と settings.local.json から削除
~/.claude/settings.json と ~/.claude/settings.local.json の両方に、enabledPlugins エントリや、ops-marketplace のパスを参照する古い permissions.allow エントリが含まれている可能性があります。
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 — マーケットプレイスとキャッシュのディレクトリを削除
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"
ステップ 8 — 最終確認
次を表示します。
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