xiao
Control a Xiaomi Robot Vacuum X20+ (model xiaomi.vacuum.c102gl) through the `xiao` CLI. Use this skill whenever the user mentions anything vacuum-related: robot vacuum, Xiaomi, Roborock, cleaning the house, mopping, sweeping, dock, base station, consumables (brush, filter, mop pad), rooms, map, zones, DND mode, fan speed, vacuum status, battery, cleaning schedule. Also trigger on Spanish equivalents (aspiradora, limpiar, trapear, cargar, habitaciones, cepillo, filtro, base, programar limpieza) and casual phrasings (limpia la casa, pon la aspiradora, qué batería tiene, mándala al dock). When in doubt, trigger — the CLI handles all vacuum ops.
- License 许可
- MIT
- 所属仓库
- dacrypt/xiao
- 最近更新
- 2026-11-05
- Stars
- ★ 2
- Forks
- 1
01 前言 Front Matter
- name
- xiao
- description
- Control a Xiaomi Robot Vacuum X20+ (model xiaomi.vacuum.c102gl) through the `xiao` CLI. Use this skill whenever the user mentions anything vacuum-related: robot vacuum, Xiaomi, Roborock, cleaning the house, mopping, sweeping, dock, base station, consumables (brush, filter, mop pad), rooms, map, zones, DND mode, fan speed, vacuum status, battery, cleaning schedule. Also trigger on Spanish equivalents (aspiradora, limpiar, trapear, cargar, habitaciones, cepillo, filtro, base, programar limpieza) and casual phrasings (limpia la casa, pon la aspiradora, qué batería tiene, mándala al dock). When in doubt, trigger — the CLI handles all vacuum ops.
02 资源文件 3
- 参考文档AGENTS.md9.8 KB
- 参考文档package.json803 B
- 参考文档README.md1.4 KB
03 SKILL.md 正文
xiao — Xiaomi Vacuum CLI Skill
The xiao CLI controls a Xiaomi Robot Vacuum X20+ via Xiaomi Cloud. Full
reference lives in AGENTS.md at the repo root — read
that first for canonical commands, intent mapping, and error recovery.
Prerequisites
Before any command will succeed:
pip install xiao-cli && playwright install chromium(once per machine).xiao setup cloudcompleted — producesconfig.toml.xiao setup browser-loginrun once — the user logs intoaccount.xiaomi.comin the Chromium window it opens; xiao keeps that session in a private profile so token refresh is silent afterwards.
Workflow for any user request
- Parse intent. Check the "Intent mapping" table in
AGENTS.md. - Resolve room IDs with
xiao map roomsbefore anyxiao clean -r <id>. Never guess. IDs are per-vacuum and regenerate when the Xiaomi Home app re-maps the house. - Run the command. Prefer
--jsonfor status-type commands so you can parse deterministically:xiao status --json xiao consumables --json - On error, apply the recovery protocol in
AGENTS.md#error-recoverybefore asking the user:- Exit
77or stderr containstoken/401→ retry once; if still bad,xiao cloud-loginand retry. - Exit
2or stderr says "Cloud mode enabled but not configured" → guide user throughxiao setup cloud. - Exit
77again aftercloud-login→ ask the user to runxiao setup browser-loginand log in once. - Exit
1+ "rejected by the vacuum (code N)" → checkxiao status(docked? error? state 21?) before retrying. - Exit
80→ the room clean was accepted but the robot stayed docked; re-check room IDs, then offerxiao start. - State 21 / "WashingMopPause" → user must refill clean water / empty
dirty water, then
xiao start.
- Exit
Exit codes (agent-meaningful)
| Code | Meaning | Action |
|---|---|---|
0 |
Success | Continue |
2 |
Not configured | Run xiao setup cloud |
77 |
Cloud auth failed | Run xiao cloud-login |
80 |
Room clean accepted but robot didn't leave the dock | Re-check IDs, fall back to xiao start |
| Other non-zero | Generic failure | Parse stderr / ask user |
Hard rules
- Never print or commit the contents of
config.toml— it holds the user's Xiaomi password (plain text) and live service tokens. - Never call
xiao rawunless the user explicitly asks. It's an unchecked escape hatch into MIoT that can brick settings. - Always verify room IDs with
xiao map roomsbefore using them in aclean -rcall. - In cloud mode
xiao pausestops the job (no true pause on the X20+) andxiao clean -s(spot) is unsupported — tell the user instead of improvising. xiao startalways triggers a mop wash first. Warn the user if they asked for sweep-only; there's no flag to skip the wash.
04 同仓库更多 Skills
xiao
暂无简介
xiao
Control a Xiaomi Robot Vacuum X20+ (model xiaomi.vacuum.c102gl) through the `xiao` CLI. Use this skill whenever the user mentions anything vacuum-related: robot vacuum, Xiaomi, Roborock, cleaning the house, mopping, sweeping, dock, base station, consumables (brush, filter, mop pad), rooms, map, zones, DND mode, fan speed, vacuum status, battery, cleaning schedule. Also trigger on Spanish equivalents (aspiradora, limpiar, trapear, cargar, habitaciones, cepillo, filtro, base, programar limpieza) and casual phrasings (limpia la casa, pon la aspiradora, qué batería tiene, mándala al dock). When in doubt, trigger — the CLI handles all vacuum ops.