switchbot

A control guide for SwitchBot smart-home devices, including lights, locks, curtains, sensors, plugs, and infrared appliances such as TVs and air conditioners. It uses the SwitchBot command-line tool and checks the user’s device settings before acting.

In plain words
What is it for?
Use it to discover devices and capabilities, check their status, control them, manage scenes, inspect account quota, and follow the configured safety policy.
Why use it?
It reduces mistakes caused by guessing device identifiers, available commands, or safety-sensitive settings.

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/openwonderlabs/switchbot-openapi-cli/switchbot
Any agent
npx skills add OpenWonderLabs/switchbot-openapi-cli --skill switchbot
Clone the repo
git clone --depth 1 https://github.com/OpenWonderLabs/switchbot-openapi-cli

Made for: Claude Code, Codex.

Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,399 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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 $0.00069 $0.02399
Opus 5 $0.00034 $0.01200
Sonnet 5 $0.00014 $0.00480
Haiku 4.5 $0.00007 $0.00240

Measured 2d ago against content hash a82048d7aa44, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

switchbot scanned grade A with 0 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/claude-code-plugin/plugins/switchbot/skills/switchbot/SKILL.md · 213 lines

How it starts

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

SwitchBot skill

Drive the user's SwitchBot smart home through the switchbot CLI. Always query the CLI for ground truth — never guess commands, deviceIds, or parameter values.


Authority chain

Question Authoritative command
What can I do (cold start)? switchbot agent-bootstrap --compact --json
What commands exist? switchbot capabilities --json
What flags does this command take? switchbot <cmd> --help --json
What devices does the user have? switchbot devices list --json
What's this device doing right now? switchbot devices status <id> --json
What can I do with this specific device type? switchbot devices describe <id> --json
What scenes are configured? switchbot scenes list --json
What's on the user's AI MindClip (recordings, todos, daily/weekly summaries)? mindclip_recordings (action: list/get/summary), mindclip_list_todos, mindclip_recall (period: daily/weekly/urgent_todos) MCP tools
What's in the user's policy.yaml? cat ~/.config/openclaw/switchbot/policy.yaml
Is my quota OK? switchbot quota status --json
Is the setup healthy? switchbot doctor --json
What automation rules are configured? switchbot rules list --json
Are the rules valid? switchbot rules lint
Draft an execution plan from intent switchbot plan suggest --intent "..." --device <id>
Run a plan with per-step approval switchbot plan run <file> --require-approval
Draft an automation rule from intent switchbot rules suggest --intent "..." --device <id>
Inject a rule into policy.yaml switchbot policy add-rule [--dry-run] [--enable] (reads YAML from stdin)

Network requirements

Claude Code registers the SwitchBot MCP server via claude mcp add switchbot -- switchbot mcp serve — or via .mcp.json in managed environments. The default profile exposes 17 tools (read + action); add --tools all to also expose admin tools (policy, audit, rules — 28 total, including 25 canonical tools + 3 deprecated device_history aliases). No manual setup is required once the MCP server is registered. The MCP server needs outbound HTTPS to api.switch-bot.com. If connection errors appear, see references/claude-code-network.md.

Read the full file on GitHub · 213 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 213 lines · 69 tokens per session scan A a82048d7aa44

Subscribe to this mod's changes

switchbot is a skill published in the GitHub repository OpenWonderLabs/switchbot-openapi-cli (131 stars, last pushed 14d ago), licensed MIT. It adds 69 tokens to every session and 2,399 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

article-writing

Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.

affaan-m/ECC · 57 tokens

a-evolve

Apply A-Evolve's agentic evolution methodology to improve AI agent performance across runs. Use when the user wants to diagnose agent failures, generate targeted skills from error patterns, evolve system prompts, or accumulate episodic knowledge. Works standalone or inside AutoResearchClaw pipelines. Triggers on…

aiming-lab/AutoResearchClaw · 100 tokens

hive.chart-creation-foundations

Required reading whenever any chart tool is available. Teaches the one-tool embedding contract (call chartrender → live chart appears in chat AND a downloadable PNG lands in the queen session dir), the ECharts (data viz) vs Mermaid (structural diagrams) decision, the BI/financial-grade aesthetic baseline (no…

aden-hive/hive · 133 tokens

📝 任务完成后归档

重要提醒: 每次完成复杂调试或开发任务后,主动执行此流程! 将学到的经验归档为 skill,供以后参考。不要等用户提醒。.

Project-N-E-K-O/N.E.K.O · 49 tokens

deck-course-module

暖纸背景 + Playfair, 左侧学习目标常驻, 含 MCQ 自测页.

nexu-io/html-anything · 25 tokens

code-documenter

Use when adding docstrings, creating API documentation, or building documentation sites. Invoke for OpenAPI/Swagger specs, JSDoc, doc portals, tutorials, user guides.

zebbern/claude-code-guide · 39 tokens