Agent skill

Mijia Smart Home Controller

by dean2021 in dean2021/mijia-device-manager

Controls Xiaomi Mijia smart home devices through the mijiaAPI command line and Xiaomi's cloud: list devices, read and set properties, switch lights and plugs, change brightness and color.

No licenceAuto-check passedProductivity & Automation

SKILL.md written in Chinese; this summary is our English description.

Install Mijia Smart Home Controller

skills CLI
$ npx skills add dean2021/mijia-device-manager --skill mijia-device-manager -a claude-code

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

GitHub CLI
$ gh skill install dean2021/mijia-device-manager mijia-device-manager --agent claude-code

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

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

Facts

Skill name
mijia-device-manager
GitHub stars
129
Token cost
~679 tokens
SKILL.md length
143 words
Files
2
Skills in repo
1
Repo updated
First seen
Licence
None found

At a glance

Controls Xiaomi Mijia smart home devices through the mijiaAPI command line and Xiaomi's cloud: list devices, read and set properties, switch lights and plugs, change brightness and color.

  • Works in 3 steps: 首次登录 → 查看设备列表 → 控制设备
  • Turning a Mijia lamp, bulb or plug on or off from the terminal
  • SKILL.md covers 概述, 功能特性, 前提条件 and 快速开始, plus 3 more sections
  • Calls python and pip

What it does

The skill wraps the mijiaAPI command-line package. After `pip install mijiaAPI`, the first login runs `python -m mijiaAPI --list_homes`, which shows a QR code to scan with the Mijia app. Listing devices with `-l` returns each device's `did`, which the `get` and `set` commands use together with a property name such as `on`, `brightness`, `color-temperature` or `color`.

Because devices support different properties, the agent first finds the device model with `--list_devices` and reads its properties and value ranges with `--get_device_info` before it sets anything. Troubleshooting notes cover deleting the saved auth file under `~/.config/mijia-api` to log in again, confirming the device is added in the app and online, and checking property ranges. The instructions are written in Chinese.

When your agent uses it

  • Turning a Mijia lamp, bulb or plug on or off from the terminal
  • Listing the devices and homes on a Xiaomi account
  • Checking which properties a device supports before changing them

Example prompts

  • “List my Mijia devices and tell me which ones are online.”
  • “Turn on the desk lamp and set its brightness to 40.”
  • “Which properties does my bedroom light support, and what are their ranges?”

Requirements

  • Python with the `mijiaAPI` package
  • A Xiaomi account with the Mijia app for QR login
  • Network access to Xiaomi's cloud

Workflow steps

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

  1. 首次登录
  2. 查看设备列表
  3. 控制设备

What it can do on your machine

Read from SKILL.md and the folder at commit e734d6a. 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:

    • python
    • pip

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

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • home.miot-spec.com

    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

Mijia Smart Home Controller loads about 679 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 143 words of instructions outside code blocks.

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

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

Without a licence we can't republish the file, so here is its outline and opening line. It has 143 words (~679 tokens).

“此技能用于管理和控制小米/米家智能家居设备,直接调用 mijiaAPI CLI 通过小米云端 API 控制设备。”

— opening of SKILL.md by dean2021
name
mijia-device-manager

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file in the repository root of dean2021/mijia-device-manager.

  • SKILL.md
  • README.md

Open the folder on GitHubat commit e734d6a

Compare with similar skills

Mijia Smart Home Controller 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.

Mijia Smart Home Controller compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mijia Smart Home Controller this skilldean2021/mijia-device-manager129—~679Automated safety check: PassNone
Process Inboxtelegramdesktop/tdesktop33k2 repos~4.5kAutomated safety check: PassGPL-3.0
Tavily Web Searchallenpeng0705/EnvoyMesh3.1k4 repos~2.5kAutomated safety check: NotesNone
Disk Storage AnalyzerKKKKhazix/khazix-skills21k1 repos~1.4kAutomated safety check: PassMIT
MoviePilot Downloader Operationjxxghp/MoviePilot12k—~4.4kAutomated safety check: PassGPL-3.0
Browser Automation Edge Casesaden-hive/hive11k—~1.8kAutomated safety check: PassMIT

Similar skills

  • Process Inbox

    telegramdesktop/tdesktop

    Process the local ignored ai-tdesktop inbox into durable, independently testable Telegram Desktop task records while task execution worktrees remain active.

    33k GitHub starsUsed in 2 repos~4.5k tokens
    Productivity & AutomationAuto-check passed
  • Tavily Web Search

    allenpeng0705/EnvoyMesh

    Searches the web through the Tavily API with LLM-friendly output: clean structured results, optional AI-written answers, domain filters, news mode, images and raw content.

    3.1k GitHub starsUsed in 4 repos~2.5k tokens
    Productivity & AutomationAuto-check: notes
  • Disk Storage Analyzer

    KKKKhazix/khazix-skills

    Scans a Mac or Windows PC read-only to find what fills the disk, grades each item by how safe it is to clean and builds an interactive HTML report.

    21k GitHub starsUsed in 1 repo~1.4k tokens
    Productivity & AutomationAuto-check passed
  • Inspects, diagnoses and directly controls qBittorrent, Transmission or rTorrent downloaders configured in MoviePilot through a bundled Python helper.

    12k GitHub stars~4.4k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Step-by-step procedure for debugging browser automation failures on complex sites such as LinkedIn, Twitter/X, single-page apps and Shadow DOM pages.

    11k GitHub stars~1.8k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Skyvern Browser Automation

    Skyvern-AI/skyvern

    Automates websites with Skyvern's AI browser agent to fill forms, extract data, download files, log in and run multi-step workflows through SDKs, REST, MCP or a CLI.

    23k GitHub stars~1.9k tokensUpdated today
    Productivity & AutomationAuto-check passed

Works with

Questions about Mijia Smart Home Controller

What does Mijia Smart Home Controller do?

Controls Xiaomi Mijia smart home devices through the mijiaAPI command line and Xiaomi's cloud: list devices, read and set properties, switch lights and plugs, change brightness and color. The skill wraps the mijiaAPI command-line package. After `pip install mijiaAPI`, the first login runs `python -m mijiaAPI --list_homes`, which shows a QR code to scan with the Mijia app.

When should I use Mijia Smart Home Controller?

Mijia Smart Home Controller fits situations like: turning a Mijia lamp, bulb or plug on or off from the terminal; listing the devices and homes on a Xiaomi account; checking which properties a device supports before changing them.

How do I install Mijia Smart Home Controller in Claude Code?

Run `npx skills add dean2021/mijia-device-manager --skill mijia-device-manager -a claude-code`. Or copy the skill folder (the dean2021/mijia-device-manager repository) into .claude/skills/mijia-device-manager in your project. Claude Code loads it when a task matches its description.

How do I install Mijia Smart Home Controller in Codex?

Run `npx skills add dean2021/mijia-device-manager --skill mijia-device-manager -a codex`. Or copy the skill folder (the dean2021/mijia-device-manager repository) into .agents/skills/mijia-device-manager in your project. Codex loads it when a task matches its description.

Can I use Mijia Smart Home Controller 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 dean2021/mijia-device-manager --skill mijia-device-manager -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mijia-device-manager, .gemini/skills/mijia-device-manager, .github/skills/mijia-device-manager and .opencode/skills/mijia-device-manager in your project.

What does Mijia Smart Home Controller need to run?

Going by SKILL.md and its folder, Mijia Smart Home Controller needs the command-line tools its instructions call (python and pip). Our summary lists: Python with the `mijiaAPI` package; A Xiaomi account with the Mijia app for QR login; Network access to Xiaomi's cloud.

Does Mijia Smart Home Controller access the network?

SKILL.md names 2 domains. As links in the text: github.com and home.miot-spec.com. This is read from the text; nothing was executed.

Is Mijia Smart Home Controller 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 Mijia Smart Home Controller use?

No licence was found for Mijia Smart Home Controller or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Mijia Smart Home Controller use?

About 679 tokens (SKILL.md is roughly 2.7k 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 Mijia Smart Home Controller?

Skills that share tags, products or a category with Mijia Smart Home Controller: Process Inbox (telegramdesktop/tdesktop, 33k stars), Tavily Web Search (allenpeng0705/EnvoyMesh, 3.1k stars), Disk Storage Analyzer (KKKKhazix/khazix-skills, 21k stars) and MoviePilot Downloader Operation (jxxghp/MoviePilot, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mijia Smart Home Controller?

dean2021 (a GitHub user) maintains it in dean2021/mijia-device-manager, which has 129 GitHub stars. The repository was last updated on February 11, 2026.

Source: dean2021/mijia-device-manager on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.