Introduction¶
Xiaomi Home Automation “Geek Edition” represents the entire scene as editable JSON. When manually modifying trigger conditions, action nodes, or MIoT addressing, it is easy to hit limitations not documented by the platform, or discover invalid structure after importing to the console. When handing rules over to a Large Language Model (LLM) for modification, if the model is unaware of the node type table and addressing methods, the generated results often cannot be imported directly.
Below is an introduction to the community skill Mi Home Geek Edition Rule Writing (@user_f691e479/mijia-geek-rule) on SkillHub. It is used for designing, writing, modifying, or reviewing Geek Edition rules, and generating importable rules with the help of a tool library, allowing the Agent to answer based on a unified knowledge base.
What is this¶
This skill is targeted at rule development and review for Mi Home Automation Geek Edition, maintained by community publisher user_f691e479. Current version 1.0.0, categorized as dev-programming, source community. The SkillHub page shows a rating of 100000 and 1036 downloads; tags requires_api_key=false, no extra API Key required.
The skill description covers: Geek Edition rule JSON structure, node type table, MIoT device addressing, platform behavior constraints, and the generation tool library mijia_rule_kit. The official documentation specifies the relationships: .bak packaging/unpacking see mijia-geek-backup, console import and self-verification see mijia-geek-console; beginner users should load mijia-geek-beginner first.
Core Capabilities¶
Combining the official description, the capabilities of this skill can be summarized into the following categories (all based on the SkillHub page description):
- Rule JSON Structure: Explains the organization method of Geek Edition automation at the file/logic level, facilitating side-by-side modification.
- Node Type Table: Distinguishes node types such as triggers, conditions, and actions, reducing confusion or incorrect field filling.
- MIoT Device Addressing: Correctly references device MIoT expressions within the rule, preventing import failures such as “device not found”.
- Platform Behavior Constraints: Aligns with limitations on the Geek Edition/Console side during writing or review, reducing unexecutable or silent failure rules.
- mijia_rule_kit: Serves as the entry knowledge for the generation tool library, used when tools need to produce importable rules.
Applicable actions include: designing new rules, rewriting existing JSON, performing structural review, and importing into Mi Home after generating with the tool library.
Installation and Activation¶
Installing SkillHub CLI (if not already installed)¶
First, confirm if skillhub is already installed on your machine:
command -v skillhub && skillhub --version
If not installed, you can perform a full installation (CLI + default Skill) as per the SkillHub installation documentation:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
When only the CLI is needed:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
Installing this Skill¶
The official page requires referring to SkillHub Installation Documentation, with the installation coordinates:
@user_f691e479/mijia-geek-rule
When installing, you must use --dir to point to the current Agent’s skills directory, otherwise the default falling to ./skills/ may not be recognized. Example:
skillhub install user_f691e479/mijia-geek-rule --dir <skills directory>
Common skills directories for each environment (extracted from the same installation documentation, select one based on the Agent you actually use):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/in the project
After installation, load or activate the Skill according to the instructions for the Agent you are using; when using the Geek Edition workflow for the first time, it is recommended to load mijia-geek-beginner as needed.
Typical Usage¶
The official page does not include standalone, copyable blocks of rule examples; typical workflows can be organized based on the scenarios in the introduction:
- New Rule Design: Explain devices, triggers, and action intentions in the conversation, allowing the Agent to produce or draft in segments under JSON structure, node type, and MIoT addressing constraints.
- Modifying Existing JSON: Paste the current Geek Edition rule snippet and request incremental modifications based on the node type table and platform behavior constraints, highlighting fields that may violate constraints.
- Review: Perform a “structure + constraints” check before importing, then use the mijia-geek-console related skill to cover console import and self-verification (if installed).
- Tool Generation: When batch or templated output is needed, explicitly use mijia_rule_kit in the conversation to generate importable rules, and coordinate with mijia-geek-backup for backup flow.
The above steps rely on the Agent reading the documents within the skill; specific commands and APIs are based on SKILL.md and associated references inside the skill package. This article does not invent field names or example JSON.
Applicable Scenarios and Notes¶
Who is it for: Developers or advanced users already using or planning to use Mi Home Automation Geek Edition who are willing to directly manipulate JSON; teams that need to co-create and review rules in IDEs using tools like Cursor, Claude Code, Codex, etc.
Notes:
- The skill is from the community source; rules and platform policies are subject to actual Xiaomi-side behavior; major changes should be verified on a test account or single device before full deployment.
- Packaging, importing, and beginner instructions are split into supporting skills. Installing this skill alone cannot replace the full process of backup and console verification.
- Incorrect installation directories are a common pitfall: make sure to use
--dirto point to the current Agent’s skills path.
Conclusion¶
Mi Home Geek Edition Rule Writing consolidates Geek Edition JSON, node table, MIoT addressing, platform constraints, and mijia_rule_kit into a single Skill, suitable for systematically writing, modifying, and reviewing rules within Agent sessions. Official entry points:
- Skill Page: https://www.skillhub.cn/skills/user_f691e479/mijia-geek-rule
- API Coordinates: https://api.skillhub.cn/user_f691e479/mijia-geek-rule