disconnect

disconnect is a skill for Claude Code from rad-security/claude-code-plugin. It costs 35 tokens per session (637 once invoked), scanned B, original, MIT.

A skill that disconnects AgentKeeper by removing its Claude Code hooks and stored API key. Hooks are automatic actions that run when certain agent events occur.

In plain words
What is it for?
Use it when you want to unlink AgentKeeper, delete its saved key, and remove its hooks from Claude Code settings.
Why use it?
It removes the account connection and automatic integration settings before uninstalling or unlinking the plugin.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the agentkeeper plugin — 13 skills, 4 hooks shipped together

Good fit Use it when you want to unlink AgentKeeper, delete its saved key, and remove its hooks from Claude Code settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rad-security/claude-code-plugin/disconnect
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rad-security/claude-code-plugin --skill disconnect
Clone the repo
git clone --depth 1 https://github.com/rad-security/claude-code-plugin

Made for: Claude Code.

Or install agentkeeper, the plugin that ships this one along with the rest of its 13 skills, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for disconnect

README.md
[![agentmods](https://agentmods.dev/badge/skills/rad-security/claude-code-plugin/disconnect/github.svg)](https://agentmods.dev/skills/rad-security/claude-code-plugin/disconnect)
Your own site
<a href="https://agentmods.dev/skills/rad-security/claude-code-plugin/disconnect"><img src="https://agentmods.dev/badge/skills/rad-security/claude-code-plugin/disconnect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for disconnect

Your own site · 80×15
<a href="https://agentmods.dev/skills/rad-security/claude-code-plugin/disconnect"><img src="https://agentmods.dev/badge/skills/rad-security/claude-code-plugin/disconnect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 637 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00637
Opus 5.5 $0.00014 $0.00255
Sonnet 5.5 $0.00007 $0.00127
Haiku 4.5 $0.00003 $0.00064

Measured 2mo ago against content hash d5227d3d2ee8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

disconnect scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Remove AgentKeeper hooks from ~/.claude/settings.json
plugins/agentkeeper/skills/disconnect/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AgentKeeper Disconnect

You are helping the user remove AgentKeeper hooks and disconnect from their account.

Step 1: Confirm

Display:

This will:
  - Remove AgentKeeper hooks from ~/.claude/settings.json
  - Delete your stored API key

Local detection via the plugin will still work.
Run /agentkeeper:connect to reconnect later.

Proceed? (y/n)

If the user declines, stop.

Step 2: Remove hooks and key

Run:

python3 << 'PYEOF'
import json, os

settings_path = os.path.expanduser("~/.claude/settings.json")
api_key_path = os.path.expanduser("~/.agentkeeper-plugin/api_key")

removed_hooks = False
removed_key = False

# Remove hooks from settings.json
if os.path.isfile(settings_path):
    try:
        with open(settings_path) as f:
            settings = json.load(f)
        hooks = settings.get("hooks", {})
        changed = False
        for event_name in list(hooks.keys()):
            existing = hooks[event_name]
            cleaned = []
            for group in existing:
                sub_hooks = group.get("hooks", [])
                if any("www.agentkeeper.dev" in (h.get("url") or "") for h in sub_hooks):
                    changed = True
                    continue
                cleaned.append(group)
            if cleaned:
                hooks[event_name] = cleaned
            else:
                del hooks[event_name]
                changed = True
        if not hooks and "hooks" in settings:
            del settings["hooks"]
            changed = True
        if changed:
            with open(settings_path, "w") as f:
                json.dump(settings, f, indent=2)
                f.write("\n")
            removed_hooks = True
    except (json.JSONDecodeError, KeyError):
        pass

# Delete API key
if os.path.isfile(api_key_path):
    os.remove(api_key_path)
    removed_key = True

if removed_hooks:
    print("HOOKS_REMOVED")
if removed_key:
    print("KEY_REMOVED")
if not removed_hooks and not removed_key:
    print("NOTHING_TO_REMOVE")
PYEOF

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 108 lines · 35 tokens per session scan B d5227d3d2ee8

Subscribe to this mod's changes

disconnect is a skill published in the GitHub repository rad-security/claude-code-plugin (3 stars, last pushed 23d ago), licensed MIT. It adds 35 tokens to every session and 637 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

disconnect compared with skills from other repositories

disconnect next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
disconnectrad-security/claude-code-pluginSkill323d agoMITB35Claude Code
imagegenopenai/codexSkill134ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99ktodayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79ktodayMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill314k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code