Agent skill

Agent Kill Switch

by vivekchand in vivekchand/clawmetry

Give the human an off switch and a cost meter for the coding agents on this machine, using ClawMetry.

MITAuto-check passedDevOps & Cloud

Install Agent Kill Switch

skills CLI
$ npx skills add vivekchand/clawmetry --skill agent-kill-switch -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vivekchand/clawmetry agent-kill-switch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vivekchand/clawmetry.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agent-kill-switch .claude/skills/agent-kill-switch && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-kill-switch
GitHub stars
424
Token cost
~1.1k tokens
SKILL.md length
457 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Give the human an off switch and a cost meter for the coding agents on this machine, using ClawMetry.

  • Works in 5 steps: Install and start → See what is running and what it costs → Stop one session (the off switch) → …
  • The user asks to stop
  • SKILL.md covers 1. Install and start, 2. See what is running and…, 3. Stop one session (the off… and 4. Hold risky tool calls until…, plus 3 more sections
  • Calls curl and pip

What it does

Agent Kill Switch is an agent skill from vivekchand/clawmetry. Give the human an off switch and a cost meter for the coding agents on this machine, using ClawMetry. Use when the user asks to stop or kill a runaway agent, see what an agent is doing or spending, cap agent spend, gate risky tool calls behind approval, or "set up a kill switch" for Claude Code, Codex, Cursor, Gemini CLI, OpenClaw, Goose, Aider and similar runtimes.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Observability and LLM cost and token optimization. It works with OpenTelemetry and Python. The repository describes itself as: See your agent think. Zero-config observability & governance for 30 AI agent runtimes: Claude Code, OpenAI Codex, Hermes, OpenClaw & 26 more. Live token costs, sessions, tool… The licence is MIT.

When your agent uses it

  • The user asks to stop
  • Kill a runaway agent
  • See what an agent is doing
  • Cap agent spend

Example prompts

  • “set up a kill switch”
  • “/agent-kill-switch”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Install and start
  2. See what is running and what it costs
  3. Stop one session (the off switch)
  4. Hold risky tool calls until a human approves (Claude Code)
  5. Cap spend for agents that call the API with a key

What it can do on your machine

Read from SKILL.md and the folder at commit 795d6fa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl and pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Kill Switch loads about 1.1k tokens when it runs. Until then it costs about 97 tokens; SKILL.md has 457 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vivekchand/clawmetry at commit 795d6fa, republished under its MIT licence (© vivekchand). 457 words, ~1,091 tokens.

Download SKILL.mdSave it as .claude/skills/agent-kill-switch/SKILL.md (or your agent's skills folder).
name
agent-kill-switch
description
Give the human an off switch and a cost meter for the coding agents on this machine, using ClawMetry. Use when the user asks to stop or kill a runaway agent, see what an agent is doing or spending, cap agent spend, gate risky tool calls behind approval, or "set up a kill switch" for Claude Code, Codex, Cursor, Gemini CLI, OpenClaw, Goose, Aider and similar runtimes.
license
MIT
metadata.author
vivekchand
metadata.homepage
https://clawmetry.com
metadata.source
https://github.com/vivekchand/clawmetry

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

bash
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:

bash
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

bash
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)

bash
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.

Show full SKILL.md (194 more words)Show less

4. Hold risky tool calls until a human approves (Claude Code)

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

Then one policy gates everything ClawMetry scores high or critical (recursive deletes, force pushes, sudo, credential files, reverse shells, cloud metadata endpoints):

yaml
# ~/.clawmetry/policies.yml
- name: 'Require approval for high-risk actions'
  min_risk: 'high'
  action: 'require_approval'
  timeout: 604800
  on_timeout: 'deny'

A deny blocks that one call; the agent keeps its session. Approvals can be answered from the Approvals tab or, with cloud sync, from a phone push. Undo with clawmetry hooks uninstall (removes only ClawMetry's entries).

5. Cap spend for agents that call the API with a key

bash
clawmetry proxy start --daily-budget 10
export ANTHROPIC_BASE_URL=http://localhost:4100/v1   # or OPENAI_BASE_URL for OpenAI-backed agents

When the cap is hit the proxy returns BUDGET_EXCEEDED instead of forwarding the request. It also detects repeated near-identical requests (loops). This only covers agents whose traffic you route through it; say that.

Honest limits

  • OpenClaw and NemoClaw are free in the open-source app. The other runtimes, and the approvals feature, need ClawMetry Cloud or a self-hosted Pro license after the trial. Tell the user before enabling those.
  • The stop in step 3 is SIGTERM to a process ClawMetry can identify. It is not a guarantee for every runtime; the 409 is the honest answer.
  • Data stays on the machine unless the user runs clawmetry connect, which enables end-to-end encrypted cloud sync.

Remove

bash
clawmetry hooks uninstall
clawmetry proxy stop
pip uninstall clawmetry

© vivekchand, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/agent-kill-switch of vivekchand/clawmetry.

Open the folder on GitHubat commit 795d6fa

Compare with similar skills

Agent Kill Switch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Kill Switch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Kill Switch this skillvivekchand/clawmetry424—~1.1kAutomated safety check: PassMIT
Logfire Instrumentationbasicmachines-co/basic-memory4.1k—~2.3kAutomated safety check: PassAGPL-3.0
Azure Monitor Opentelemetry Exporter Pymicrosoft/skills3.1k6 repos~2.3kAutomated safety check: PassMIT
Azure Monitor Opentelemetry Pymicrosoft/skills3.1k6 repos~2kAutomated safety check: PassMIT
Enforcing Nophi Loggingmaziyarpanahi/openmed5.5k—~1.9kAutomated safety check: PassApache-2.0
App Observabilitygrafana/skills278—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Logfire Instrumentation

    basicmachines-co/basic-memory

    Adds Pydantic Logfire tracing, logging and metrics to Python, JavaScript or TypeScript and Rust projects, with the correct setup order and library extras.

    4.1k GitHub stars~2.3k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Official

    Azure Monitor OpenTelemetry Exporter for Python. An agent skill from microsoft/skills.

    3.1k GitHub starsUsed in 6 repos~2.3k tokens
    DevOps & CloudAuto-check passed
  • Official

    Azure Monitor OpenTelemetry Distro for Python. An agent skill from microsoft/skills.

    3.1k GitHub starsUsed in 6 repos~2k tokens
    DevOps & CloudAuto-check passed
  • Enforcing Nophi Logging

    maziyarpanahi/openmed

    Add a logging and telemetry guard that scrubs or blocks PHI from logs, traces, and error reports around an OpenMed deployment.

    5.5k GitHub stars~1.9k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • App Observability

    grafana/skills

    Official

    Get RED metrics + service maps + frontend RUM + AI/LLM monitoring out of Grafana Cloud — Application Observability (tracesspanmetrics from OTel traces, p50/p95/p99 latency, exemplar-to-trace…

    278 GitHub stars~1.8k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Implementing Observability

    ancoleman/ai-design-components

    Monitoring, logging, and tracing implementation using OpenTelemetry as the unified standard.

    526 GitHub stars~3k tokensUpdated 10 mo ago
    DevOps & CloudAuto-check passed

More from vivekchand/clawmetry

  • Clawmetry Selfcheck

    vivekchand/clawmetry

    Read your own agent telemetry from ClawMetry (waste, progress, cost) and act on it before finishing a task.

    424 GitHub stars~515 tokensUpdated today
    Auto-check passed
  • Clawmetry

    vivekchand/clawmetry

    Real-time observability for OpenClaw agents — local dashboard + optional encrypted cloud sync.

    424 GitHub stars~992 tokensUpdated today
    Auto-check passed

Questions about Agent Kill Switch

What does Agent Kill Switch do?

Give the human an off switch and a cost meter for the coding agents on this machine, using ClawMetry. Agent Kill Switch is an agent skill from vivekchand/clawmetry. Give the human an off switch and a cost meter for the coding agents on this machine, using ClawMetry.

When should I use Agent Kill Switch?

Agent Kill Switch fits situations like: the user asks to stop; kill a runaway agent; see what an agent is doing; cap agent spend.

How do I install Agent Kill Switch in Claude Code?

Run `npx skills add vivekchand/clawmetry --skill agent-kill-switch -a claude-code`. Or copy the skill folder (skills/agent-kill-switch in vivekchand/clawmetry) into .claude/skills/agent-kill-switch in your project. Claude Code loads it when a task matches its description.

How do I install Agent Kill Switch in Codex?

Run `npx skills add vivekchand/clawmetry --skill agent-kill-switch -a codex`. Or copy the skill folder (skills/agent-kill-switch in vivekchand/clawmetry) into .agents/skills/agent-kill-switch in your project. Codex loads it when a task matches its description.

Can I use Agent Kill Switch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vivekchand/clawmetry --skill agent-kill-switch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-kill-switch, .gemini/skills/agent-kill-switch, .github/skills/agent-kill-switch and .opencode/skills/agent-kill-switch in your project.

What does Agent Kill Switch need to run?

Going by SKILL.md and its folder, Agent Kill Switch needs the command-line tools its instructions call (curl and pip). Our summary lists: Python 3.

Does Agent Kill Switch access the network?

SKILL.md contains no URLs. Its commands use curl and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Agent Kill Switch safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Kill Switch use?

Agent Kill Switch is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Kill Switch use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Kill Switch?

Skills that share tags, products or a category with Agent Kill Switch: Logfire Instrumentation (basicmachines-co/basic-memory, 4.1k stars), Azure Monitor Opentelemetry Exporter Py (microsoft/skills, 3.1k stars), Azure Monitor Opentelemetry Py (microsoft/skills, 3.1k stars) and Enforcing Nophi Logging (maziyarpanahi/openmed, 5.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Kill Switch?

vivekchand (a GitHub user) maintains it in vivekchand/clawmetry, which has 424 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.

Source: vivekchand/clawmetry on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.