Hook Development for Claude Code Plugins
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
Query and control Aqara/Lumi Studio smart home devices and manage spaces via the Aqara Open Platform API (HTTP JSON).
$ npx skills add LeoYeAI/openclaw-master-skills --skill aqara-open-api -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills aqara-open-api --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/aqara-open-api .claude/skills/aqara-open-api && rm -rf skills-srcUse ~/.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/
Install the "aqara-open-api" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/aqara-open-api into .claude/skills/aqara-open-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aqara-open-api", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/aqara-open-apiType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill aqara-open-api -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills aqara-open-api --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/aqara-open-api .agents/skills/aqara-open-api && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "aqara-open-api" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/aqara-open-api into .agents/skills/aqara-open-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aqara-open-api", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill aqara-open-api -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills aqara-open-api --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/aqara-open-api .cursor/skills/aqara-open-api && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "aqara-open-api" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/aqara-open-api into .cursor/skills/aqara-open-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aqara-open-api", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/aqara-open-api--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill aqara-open-api -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills aqara-open-api --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/aqara-open-api .gemini/skills/aqara-open-api && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "aqara-open-api" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/aqara-open-api into .gemini/skills/aqara-open-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aqara-open-api", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills aqara-open-apiInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill aqara-open-api -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/aqara-open-api .github/skills/aqara-open-api && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "aqara-open-api" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/aqara-open-api into .github/skills/aqara-open-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aqara-open-api", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill aqara-open-api -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills aqara-open-api --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/aqara-open-api .opencode/skills/aqara-open-api && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "aqara-open-api" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/aqara-open-api into .opencode/skills/aqara-open-api/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aqara-open-api", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
aqara-open-apiQuery and control Aqara/Lumi Studio smart home devices and manage spaces via the Aqara Open Platform API (HTTP JSON).
Aqara Open API is an agent skill from LeoYeAI/openclaw-master-skills. Query and control Aqara/Lumi Studio smart home devices and manage spaces via the Aqara Open Platform API (HTTP JSON). Use when the user asks to list Aqara devices, get device status, control lights/switches/sensors, or manage rooms/spaces. Requires AQARAOPENAPITOKEN and AQARAENDPOINTURL.
Its SKILL.md is about 5.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `README-CLAWHUB.md`, `_meta.json` and `references/examples.md`).
It works with Bash. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
2 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
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.
Ships 1 file in scripts/ (Shell), which the agent can run.
Shell commands in SKILL.md call:
bashcurlFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
AQARA_OPEN_API_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Aqara Open API loads about 5.9k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 2,209 words of instructions outside code blocks.
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.
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); the scripts in this folder are not scanned.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 2,209 words, ~5,872 tokens.
.claude/skills/aqara-open-api/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.This skill equips the agent to operate Aqara/Lumi Studio smart home devices via HTTPS requests to the Aqara Open Platform API. All operations are performed exclusively through curl commands, except GetAllDevicesWithSpaceRequest, which must be executed through bash scripts/fetch_all_devices.sh to refresh the local cache file data/devices.json.
This skill supports only:
The following environment variables are required:
AQARA_ENDPOINT_URL: The base URLAQARA_OPEN_API_TOKEN: Your Long-Lived Access Token.This section is a navigation and execution summary only. It does not add new rules or change existing constraints.
deviceId, endpointId, functionCode, and traitCode from cachedata/devices.jsonbash scripts/fetch_all_devices.shdata/devices.json existsdeviceId + endpointId + functionCode + traitCode from cachecurl for ExecuteTraitRequestcurl for GetDeviceTypeInfosRequestbash scripts/fetch_all_devices.shcurl for GetSpacesRequestspaceId from GetSpacesRequestCreateSpaceRequest or UpdateSpaceRequestspaceId from GetSpacesRequestdeviceId values from data/devices.jsonAssociateDevicesToSpaceRequestGetAllDevicesWithSpaceRequest may only be executed via bash scripts/fetch_all_devices.sh.curl.type, version, msgId, and data; version must always be "v1".type is whitelist-only: use only the exact request types listed in this document; never test guessed alternatives such as GetAllSpacesRequest, GetSpaceListRequest, or QuerySpaceListRequest.deviceId, endpointId, functionCode, traitCode, or spaceId.data/devices.json existsdeviceId, endpointId, functionCode, and traitCode from the cache filespaceId is needed, call GetSpacesRequest firstspaceId from GetSpacesRequest and deviceId values from data/devices.jsondata/devices.json, which stores the data array from GetAllDevicesWithSpaceRequestendpoints[].endpointIdGetSpacesRequest or cached space.spaceId## API Protocol### Execution Model### File Cache Model (Cache-First Data Model)## API Commands under ### Device Management### Space Management## Standard Operating Procedures (SOP)## Cache Decision Tree and ## API Call Decision Tree## Forbidden Behaviorreferences/trait-codes.mdRole: You are a strict hardware interface controller. Never infer or guess IDs or capability fields.
Any operation involving live device state, such as power, brightness, or temperature, must follow this rule:
| Power status | Valid interpretation | Response style |
|---|---|---|
Switch == "false" | Brightness / color temperature / power should be treated as 0 or "off" | "The device is currently off" |
Switch == "true" | Use the actual returned value | "Brightness is X%" |
Never produce logically inconsistent output such as "the light is off but brightness is 100%".
AQARA_OPEN_API_TOKEN: your Aqara Open API Bearer token (JWT)AQARA_ENDPOINT_URL: the API base URLReal environment value rule: AQARA_ENDPOINT_URL and AQARA_OPEN_API_TOKEN must be read from the runtime environment (via $AQARA_ENDPOINT_URL and $AQARA_OPEN_API_TOKEN). Do not guess, fabricate, or use example placeholders as real request values. If either variable is missing or empty, tell the user to configure it first.
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"GetAllDevicesWithSpaceRequest","version":"v1","msgId":"test-1"}'Base URL: $AQARA_ENDPOINT_URL
All requests use a single unified POST endpoint. Routing is determined by the type field in the JSON body.
The request-body JSON may contain exactly these 4 fields. Do not add, remove, or replace fields:
{
"type": "<RequestType>",
"version": "v1",
"msgId": "<unique-id>",
"data": { ... }
}| Field | Required | Meaning | Forbidden behavior |
|---|---|---|---|
type | Yes | API method name, such as ExecuteTraitRequest or GetSpacesRequest | Do not modify, abbreviate, or replace it with a value not listed in this document |
version | Yes | Must be the string "v1" | Do not omit it; do not use "v2", "1.0", or any other value |
msgId | Yes | Unique request identifier, such as "msg-1234567890" | None |
data | Yes | Payload for the selected type (null, object, array, or string depending on the request) | Only use structures defined in this document or references/ |
Strict request-body constraints
version: every curl request body must include "version":"v1".senderId, source, timestamp, or any field not defined in this document.data may contain made-up fields or undocumented shapes.type values: if this document says the request type is GetSpacesRequest, then type must be exactly GetSpacesRequest.type: names such as GetAllSpacesRequest, GetSpaceListRequest, QuerySpaceListRequest, ListSpacesRequest, or other self-created variants are forbidden unless they are explicitly documented in this file.Authorization: Bearer $AQARA_OPEN_API_TOKEN
Content-Type: application/json{
"type": "<ResponseType>",
"version": "v1",
"msgId": "<matching-id>",
"code": 0,
"message": null,
"data": { ... }
}code: 0 = success. Non-zero = error. Common error codes:
The -d value for every curl request must be a JSON object with only 4 keys: type, version, msgId, and data. Replace <TYPE> with the API method name and <DATA> with the correct payload:
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"<TYPE>","version":"v1","msgId":"msg-'$(date +%s)'","data":<DATA>}'Always keep "version":"v1" in -d, and never add senderId or any other field not defined in this document.
Execution rules (must follow):
GetAllDevicesWithSpaceRequest: execute it via bash scripts/fetch_all_devices.sh. The script calls the API and writes the response data to data/devices.json. Do not call this request directly with curl.ExecuteTraitRequest, GetSpacesRequest, CreateSpaceRequest, UpdateSpaceRequest, and AssociateDevicesToSpaceRequest): execute them with bash + curl. The JSON body must contain exactly 4 keys: type, version, msgId, and data.type retries: when a request fails, do not try nearby or similar type names. Verify the documented type, payload shape, token, IDs, cache, and required preconditions, then retry the same documented request only if appropriate.Local cache file
data/devices.json — the data array from GetAllDevicesWithSpaceRequest, including complete device information: deviceId, name, deviceTypesList, state, space, endpoints, and all functions/traits/current valuesRefresh cache (create/overwrite cache file)
bash scripts/fetch_all_devices.shUsage rules (must follow)
data/devices.json exists and is non-empty.GetAllDevicesWithSpaceRequest again.bash scripts/fetch_all_devices.sh to refresh the cache. After refresh, re-read the cache file before continuing.bash scripts/fetch_all_devices.sh and then re-read the file.ExecuteTraitRequest) still go directly to the API via curl, but all deviceId / endpointId / functionCode / traitCode values must come from the cache file.NEVER guess, fabricate, or infer deviceId, endpointId, functionCode, or traitCode. Every value used in control calls MUST come from the cached data/devices.json file.
endpointId must be taken from the device's endpoints[].endpointId.functionCode and traitCode must be taken from endpoints[].functions[].traits[].value type must match the trait definition.When the user asks for a subset of devices (for example, all lights, devices in the bedroom, or online switches):
data/devices.json locally by deviceTypesList, name, state, or space.name / space.spatialMarking.deviceTypesList.bash scripts/fetch_all_devices.sh to refresh cache and retry.data/devices.json and run bash scripts/fetch_all_devices.sh to regenerate.GetAllDevicesWithSpaceRequestRetrieve all smart home devices in a single call, including full device info, space assignment, endpoints, functions, traits, and current values. No data field is needed (or data: null).
The agent MUST write this response to the local cache file (data/devices.json) and use the cache for all subsequent device queries, status checks, and as the basis for control commands. Use the provided script to fetch and cache:
bash scripts/fetch_all_devices.shManual curl (for reference only — prefer the script):
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"GetAllDevicesWithSpaceRequest","version":"v1","msgId":"msg-'$(date +%s)'"}'GetDeviceTypeInfosRequestRetrieve every device type available in the current project. Each entry contains a deviceType code and its localized display name.
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"GetDeviceTypeInfosRequest","version":"v1","msgId":"msg-'$(date +%s)'"}'ExecuteTraitRequestControl one or more device functions, such as turning on/off or adjusting level. endpointId, functionCode, and traitCode must be read from the cache.
# Turn on
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"ExecuteTraitRequest","version":"v1","msgId":"msg-'$(date +%s)'","data":[{"deviceId":"<deviceId>","endpointId":<endpointId>,"functionCode":"<functionCode>","traitCode":"OnOff","value":true}]}'
# Turn off
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"ExecuteTraitRequest","version":"v1","msgId":"msg-'$(date +%s)'","data":[{"deviceId":"<deviceId>","endpointId":<endpointId>,"functionCode":"<functionCode>","traitCode":"OnOff","value":false}]}'GetSpacesRequestRetrieve all spaces as a hierarchical tree. Each space includes its ID, name, parent space ID, spatial marking label, and nested children.
Space request type hard rule: the request type for space listing is only GetSpacesRequest. Do not try GetAllSpacesRequest, GetSpaceListRequest, QuerySpaceListRequest, or any other guessed variant.
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"GetSpacesRequest","version":"v1","msgId":"msg-'$(date +%s)'"}'CreateSpaceRequestCreate a room, zone, or building. Omit parentSpaceId to create a top-level space. Run GetSpacesRequest first if the parent space ID is not known.
# Top-level space
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"CreateSpaceRequest","version":"v1","msgId":"msg-'$(date +%s)'","data":{"name":"Living Room","spatialMarking":"living_room"}}'
# Sub-space
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"CreateSpaceRequest","version":"v1","msgId":"msg-'$(date +%s)'","data":{"name":"Bedroom","parentSpaceId":"<parentSpaceId>","spatialMarking":"bedroom"}}'UpdateSpaceRequestUpdate the name or spatial marking of an existing space. Only provided fields are updated. spaceId is required.
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"UpdateSpaceRequest","version":"v1","msgId":"msg-'$(date +%s)'","data":{"spaceId":"<spaceId>","name":"New Room Name"}}'AssociateDevicesToSpaceRequestAssign one or more devices to an existing space. Response data only contains failed items; empty means all succeeded.
curl -s -X POST "$AQARA_ENDPOINT_URL" \
-H "Authorization: Bearer $AQARA_OPEN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"AssociateDevicesToSpaceRequest","version":"v1","msgId":"msg-'$(date +%s)'","data":{"spaceId":"<spaceId>","deviceIds":["<deviceId1>","<deviceId2>"]}}'data/devices.json exists and is non-empty.bash scripts/fetch_all_devices.sh to generate the cache, then read the file.data/devices.json is missing, run bash scripts/fetch_all_devices.sh first.value.data/devices.json is missing, run bash scripts/fetch_all_devices.sh first.deviceId, endpointId, functionCode, and traitCode from the cache file.ExecuteTraitRequest curl command with only cached values.data only contains failed items; an empty array means all commands succeeded.data/devices.json.GetSpacesRequest curl command to retrieve the full space hierarchy tree.CreateSpaceRequest, UpdateSpaceRequest, or AssociateDevicesToSpaceRequest as needed.Does the user request involve devices, spaces, or types?
├── Yes → Check the local cache file `data/devices.json`
│ ├── Cache hit (file exists and is non-empty)
│ │ └── Read from the file directly and filter/aggregate locally
│ └── Cache miss / missing file
│ ├── Run `bash scripts/fetch_all_devices.sh`
│ ├── Re-read the cache file
│ └── Continue with the refreshed data
└── No → Continue with the normal flow
Does the task require device control?
├── Yes → Ensure `data/devices.json` exists (refresh first if missing)
│ ├── Read `deviceId + endpointId + functionCode + traitCode` from cache
│ └── Call `ExecuteTraitRequest` via curl
└── No → Return the cached data result
Did the user explicitly ask to refresh device data?
└── Run `bash scripts/fetch_all_devices.sh` to overwrite the cache, then re-read itUser wants devices by type?
→ data/devices.json exists? → Yes: filter file by deviceTypesList
→ No: bash scripts/fetch_all_devices.sh, then filter
User wants to list/discover all devices?
→ data/devices.json exists? → Yes: return full list from file
→ No: bash scripts/fetch_all_devices.sh, then read
User wants state of a device?
→ data/devices.json exists? → No: bash scripts/fetch_all_devices.sh
→ Read value from file: endpoints[].functions[].traits[].value
User wants to control a device?
→ data/devices.json exists? → No: bash scripts/fetch_all_devices.sh
→ Get deviceId + endpointId + functionCode + traitCode from file
→ curl ExecuteTraitRequest with correct value type
User wants devices by space/room?
→ data/devices.json exists? → Yes: filter file by space.name / spatialMarking
→ No: bash scripts/fetch_all_devices.sh, then filter
User wants to refresh device data?
→ bash scripts/fetch_all_devices.sh
User wants to see spaces?
→ curl GetSpacesRequest
User wants to create, update, or assign spaces?
→ curl GetSpacesRequest if a real spaceId is needed
→ then curl CreateSpaceRequest / UpdateSpaceRequest / AssociateDevicesToSpaceRequest| Forbidden | Correct behavior |
|---|---|
Guessing or fabricating deviceId | Always use IDs from data/devices.json cache file. |
Guessing or creating endpointId | Always take from endpoints[].endpointId in cache file. |
Guessing functionCode or traitCode | Always take from endpoints[].functions[].traits[] in cache file. |
Running ExecuteTraitRequest without first resolving device/endpoint info | Ensure data/devices.json exists and use the cached structure. |
Using curl to call GetAllDevicesWithSpaceRequest | Only this request goes through the script: use bash scripts/fetch_all_devices.sh. |
| Calling the script or API for devices when cache file already exists and user did not ask to refresh | Read data/devices.json instead. |
| Making a separate API call to read device status/values | Device status and trait values are already in data/devices.json. |
| Inferring device type from device name | Filter cached devices by deviceTypesList. |
Guessing spaceId | Always use IDs from GetSpacesRequest response or cached device space.spaceId. |
Guessing or testing undocumented request type values | Use only the exact request names listed in Request Type Whitelist. |
| Trying alternate request names after a failure | Keep the documented type unchanged; inspect payload, token, IDs, cache, and preconditions. |
Trying guessed space-list request names such as GetAllSpacesRequest, GetSpaceListRequest, or QuerySpaceListRequest | Use only GetSpacesRequest to list spaces. |
Guessing or fabricating AQARA_ENDPOINT_URL or AQARA_OPEN_API_TOKEN | These must be read from the runtime environment. |
scripts/fetch_all_devices.sh — cache refresh script; calls GetAllDevicesWithSpaceRequest and writes data/devices.jsondata/devices.json — cache file generated by the script; contains complete device datareferences/examples.md — example curl invocationsreferences/trait-codes.md — full list of trait codes with type, unit, read/write, subscribe flagsKeep this SKILL.md lean; consult references for details.
© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts, references) in skills/aqara-open-api of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
Aqara Open API 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Aqara Open API this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~5.9k | Automated safety check: Pass | MIT | |
| Hook Development for Claude Code Pluginsanthropics/claude-plugins-official | 38k | 10 repos | ~4.1k | Automated safety check: Notes | Apache-2.0 | |
| Plugin Settings Patternanthropics/claude-plugins-official | 38k | 7 repos | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Mole Bug Patternstw93/Mole | 70k | — | ~2k | Automated safety check: Pass | GPL-3.0 | |
| Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills | 21k | — | ~1.9k | Automated safety check: Pass | MIT | |
| E2Ecallstack/react-native-pager-view | 3.4k | 1 repos | ~2.1k | Automated safety check: Pass | MIT |
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
anthropics/claude-plugins-official
Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.
tw93/Mole
A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.
KKKKhazix/khazix-skills
Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.
callstack/react-native-pager-view
Agentic end-to-end tests with e2e, the e2e runner. An agent skill from callstack/react-native-pager-view.
automazeio/ccpm
Runs a spec-driven workflow from PRD to epic to GitHub issues to parallel agents, with status, standup and blocked-work reports from bundled scripts.
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Works with
Query and control Aqara/Lumi Studio smart home devices and manage spaces via the Aqara Open Platform API (HTTP JSON). Aqara Open API is an agent skill from LeoYeAI/openclaw-master-skills. Query and control Aqara/Lumi Studio smart home devices and manage spaces via the Aqara Open Platform API (HTTP JSON).
Aqara Open API fits situations like: the user asks to list Aqara devices; get device status; control lights/switches/sensors; manage rooms/spaces.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill aqara-open-api -a claude-code`. Or copy the skill folder (skills/aqara-open-api in LeoYeAI/openclaw-master-skills) into .claude/skills/aqara-open-api in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill aqara-open-api -a codex`. Or copy the skill folder (skills/aqara-open-api in LeoYeAI/openclaw-master-skills) into .agents/skills/aqara-open-api in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill aqara-open-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/aqara-open-api, .gemini/skills/aqara-open-api, .github/skills/aqara-open-api and .opencode/skills/aqara-open-api in your project.
Going by SKILL.md and its folder, Aqara Open API needs a shell for the scripts in its folder, the command-line tools its instructions call (bash and curl) and credentials named AQARA_OPEN_API_TOKEN. Our summary lists: A Bash shell; A credential in AQARA_OPEN_API_TOKEN.
SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Aqara Open API is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.9k tokens (SKILL.md is roughly 23k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Aqara Open API: Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Plugin Settings Pattern (anthropics/claude-plugins-official, 38k stars), Mole Bug Patterns (tw93/Mole, 70k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,160 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.