disconnect

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 CodeCodex

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.

agentmods
npx agentmods add skills/rad-security/claude-code-plugin/disconnect
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, Codex.

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. Scan, not verified.
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 $0.00035 $0.00637
Opus 5 $0.00017 $0.00318
Sonnet 5 $0.00007 $0.00127
Haiku 4.5 $0.00003 $0.00064

Measured yesterday against content hash d5227d3d2ee8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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. yesterday 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 (2 stars, last pushed 26d ago), licensed MIT. It adds 35 tokens to every session and 637 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens