agent-kill-switch

agent-kill-switch is a skill for Claude Code from vivekchand/clawmetry. It costs 95 tokens per session (1,120 once invoked), scanned B, original, MIT.

A local dashboard and control tool for coding agents. It shows running sessions and usage, can stop a session, and can pause risky tool calls for human approval.

In plain words
What is it for?
It is for monitoring agent sessions and token use, stopping sessions, setting spending limits, and approving gated tool calls.
Why use it?
It helps people notice runaway agents, monitor spending, and retain control over actions that may be risky.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

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/vivekchand/clawmetry/agent-kill-switch
Any agent
npx skills add vivekchand/clawmetry --skill agent-kill-switch
Clone the repo
git clone --depth 1 https://github.com/vivekchand/clawmetry

Made for: Claude Code.

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 agent-kill-switch

README.md
[![agentmods](https://agentmods.dev/badge/skills/vivekchand/clawmetry/agent-kill-switch.svg)](https://agentmods.dev/skills/vivekchand/clawmetry/agent-kill-switch)
Your own site
<a href="https://agentmods.dev/skills/vivekchand/clawmetry/agent-kill-switch"><img src="https://agentmods.dev/badge/skills/vivekchand/clawmetry/agent-kill-switch.svg" alt="Measured on agentmods" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,120 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. 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.1 $0.00095 $0.01120
Opus 5 $0.00048 $0.00560
Sonnet 5 $0.00019 $0.00224
Haiku 4.5 $0.00010 $0.00112

Measured 2d ago against content hash 062b7ff9c104, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

agent-kill-switch scanned grade B with 2 findings 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 2d 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.

clawmetry hooks install # adds a PreToolUse hook to ~/.claude/settings.json, idempotent

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://localhost:8900/api/overview | head -c 400
skills/agent-kill-switch/SKILL.md · 117 lines

How it starts

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

Agent kill switch

An agent that loops, re-reads the same files, or shells out to something it should not is expensive by the minute. This skill wires up ClawMetry, a local, read-only dashboard that reads the session logs the runtimes already write on disk, and uses it for three things: see what is running, stop one session, and hold risky tool calls until a human says yes.

Nothing here modifies the agent. Observation is read-only. Every control below is opt-in and stated as what it does, so tell the user exactly which ones you enabled.

1. Install and start

pip install clawmetry && clawmetry

The dashboard is at http://localhost:8900. It auto-detects the runtimes on the machine (Claude Code, Codex, Cursor, Gemini CLI, OpenClaw, Goose, Aider, Cline, OpenCode and others); no config. Confirm it is up:

curl -s http://localhost:8900/api/overview | head -c 400

If the port is taken: clawmetry --port 8901 and use that port below.

2. See what is running and what it costs

curl -s http://localhost:8900/api/sessions      # live and recent sessions, ids look like claude_code:<uuid>
curl -s http://localhost:8900/api/usage         # tokens and cache-aware cost per model and per session

Tell the user in plain words: which sessions are active, which one is spending the most, and whether any is showing loop signs. The dashboard's Sessions tab shows the full transcript and every tool call for a session.

3. Stop one session (the off switch)

curl -s -X POST http://localhost:8900/api/sessions/<session_id>/stop
  • 200 with "ok": true and a pid: the session's process received SIGTERM.
  • 409 with "ok": false: ClawMetry could not identify a process for that session, for example a Cursor editor conversation, which shares the IDE process. Say so instead of claiming it was stopped.

Never call this on your own initiative. Only when the user asks to stop a session, and confirm which session id first.

Read the full file on GitHub · 117 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. 2d ago First seen · 117 lines · 95 tokens per session scan B 062b7ff9c104

Subscribe to this mod's changes

agent-kill-switch is a skill published in the GitHub repository vivekchand/clawmetry (406 stars, last pushed today), licensed MIT. It adds 95 tokens to every session and 1,120 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

phoenix-observability

Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.

davila7/claude-code-templates · 47 tokens

frontmcp-observability

Use when adding tracing, structured logging, metrics, or monitoring to a FrontMCP server. Covers zero-config OpenTelemetry distributed tracing across all flows; the this.telemetry API for custom spans, events, and attributes in tools, plugins, agents, and skills; structured JSON logging with trace correlation and…

agentfront/frontmcp · 177 tokens

otel-python

OpenTelemetry in Python — SDK setup, declarative config, zero-code instrumentation (opentelemetry-instrument, opentelemetry-distro), contrib auto-instrumentation, manual API, performance tuning, breaking changes. Use when configuring or troubleshooting OpenTelemetry in a Python service. Triggers on "setup otel in…

ollygarden/opentelemetry-agent-skills · 120 tokens

phoenix-observability

Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.

OpenLAIR/dr-claw · 47 tokens

claude-statusbar

Manage cs (claude-statusbar) — switch theme/style/density, override severity colors, preview combinations, run doctor, reset config, install, upgrade (cs upgrade — the only supported upgrade path), or remove the bar, toggle fast/daemon mode, show cost or prompt-cache age, toggle the AgentParty/Codex bridge line, or…

leeguooooo/claude-code-usage-bar · 281 tokens

phoenix-observability

Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.

synthetic-sciences/openscience · 47 tokens