Agent skill

Gadget Tuya Cloud Devices

by tuya in tuya/tuya-openclaw-skills

Read status and control the user's Tuya app devices through Tuya's cloud end-user API with a user-supplied API key: homes and rooms, device detail, thing-model property control, rename, weather…

MITAuto-check passedData & Analytics

Install Gadget Tuya Cloud Devices

skills CLI
$ npx skills add tuya/tuya-openclaw-skills --skill gadget-tuya-cloud-devices -a claude-code

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

GitHub CLI
$ gh skill install tuya/tuya-openclaw-skills gadget-tuya-cloud-devices --agent claude-code

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

Manual copy
$ git clone --depth 1 https://github.com/tuya/tuya-openclaw-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/platforms/muse .claude/skills/gadget-tuya-cloud-devices && rm -rf skills-src

Use ~/.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/

Facts

Skill name
gadget-tuya-cloud-devices
GitHub stars
479
Token cost
~2.3k tokens
SKILL.md length
1,133 words
Files
2
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Read status and control the user's Tuya app devices through Tuya's cloud end-user API with a user-supplied API key: homes and rooms, device detail, thing-model property control, rename, weather…

  • Works in 6 steps: List homes with GET… → Locate the device: GET… → Read GET… → …
  • Tasks that involve Statistics
  • SKILL.md covers Prerequisites, Workflow, Also Available and Real-Time Subscription, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Gadget Tuya Cloud Devices is an agent skill from tuya/tuya-openclaw-skills. Read status and control the user's Tuya app devices through Tuya's cloud end-user API with a user-supplied API key: homes and rooms, device detail, thing-model property control, rename, weather, hourly statistics, self-send notifications, IPC cloud snapshots and real-time event subscription. Cloud only; prefer a device-specific or local-TCP skill when one matches.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `README.md`).

It sits in Data & Analytics, covering Statistics. The repository describes itself as: Tuya AI Skill Library for OpenClaw/TuyaClaw - An AI-driven skill set built for the development of Tuya's smart ecosystem (e.g., device control). The licence is MIT.

When your agent uses it

  • Tasks that involve Statistics

Example prompts

  • “s Tuya app devices through Tuya”
  • “/gadget-tuya-cloud-devices”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. List homes with GET /v1.0/end-user/homes/all, and rooms with
  2. Locate the device: GET /v1.0/end-user/devices/all, or scope to
  3. Read GET /v1.0/end-user/devices/{device_id}/detail. A null result means the device does
  4. Read the thing model GET /v1.0/end-user/devices/{device_id}/model. Its result.model field
  5. Issue POST /v1.0/end-user/devices/{device_id}/shadow/properties/issue with a body whose
  6. Wait 1–2 seconds, re-read the detail and compare the mapped value before reporting success.

What it can do on your machine

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

    No scripts in the folder and no shell commands in SKILL.md.

    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):

    • tuya.ai
    • openapi.tuyaus.com
    • openapi.tuyaeu.com
    • openapi.tuyain.com
    • openapi-ueaz.tuyaus.com
    • openapi-weaz.tuyaeu.com
    • openapi-sg.iotbing.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

Gadget Tuya Cloud Devices loads about 2.3k tokens when it runs. Until then it costs about 98 tokens; SKILL.md has 1,133 words of instructions outside code blocks.

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

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

The full file from tuya/tuya-openclaw-skills at commit be95c3c, republished under its MIT licence (© tuya). 1,133 words, ~2,324 tokens.

Download SKILL.mdSave it as .claude/skills/gadget-tuya-cloud-devices/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
gadget-tuya-cloud-devices
description
Read status and control the user's Tuya app devices through Tuya's cloud end-user API with a user-supplied API key: homes and rooms, device detail, thing-model property control, rename, weather, hourly statistics, self-send notifications, IPC cloud snapshots and real-time event subscription. Cloud only; prefer a device-specific or local-TCP skill when one matches.

Tuya Cloud Devices: End-User API Control

Use this skill when the user supplies a Tuya end-user API key (sk-...) and asks to control or query devices from their Tuya app account. Devices are reached in the cloud, so no local keys or model-specific datapoint maps are needed. For direct local-TCP control with a confirmed key and datapoint schema, prefer Tuya Wi-Fi devices.

Prerequisites

Follow the shared HomeLink networking and safety rules in home_link.md.

Workflow

  1. List homes with GET /v1.0/end-user/homes/all, and rooms with GET /v1.0/end-user/homes/{home_id}/rooms when the user names one.
  2. Locate the device: GET /v1.0/end-user/devices/all, or scope to .../homes/{home_id}/devices or .../homes/room/{room_id}/devices. Each entry in result.devices[] carries device_id, name, category, category_name, online and, under a home scope, room_id. Match the user's words against category_name first, then fuzzy-match name. With multiple matches, list the candidates with their rooms and ask.
  3. Read GET /v1.0/end-user/devices/{device_id}/detail. A null result means the device does not exist or the key has no access — stop. online: false means report the device as offline and command nothing. result.properties maps each property code to its current value.
  4. Read the thing model GET /v1.0/end-user/devices/{device_id}/model. Its result.model field is a JSON string that needs a second parse. services[].properties[] then defines each property's code, accessMode (ro properties are read-only — say so) and typeSpec:
    • value: min, max, step and scale — the real-world value is the raw number divided by 10^scale.
    • enum: the issued value must be one of range.
    • bool / string: true/false, and maxlen respectively. Common codes are switch_led/switch (bool power), bright_value/temp_value (0–1000), temp_set (16–30) and mode (enum) — the model response is always authoritative.
  5. Issue POST /v1.0/end-user/devices/{device_id}/shadow/properties/issue with a body whose properties value is a JSON string, not an object — it is double-serialized: {"properties": "{\"switch_led\":true}"}. An empty result object means the command was accepted, not that it took effect. For relative asks ("a bit brighter"), adjust the current value by 10% of the typeSpec range for vague amounts or by the stated amount exactly, clamp to [min, max], honor scale and round to step.
  6. Wait 1–2 seconds, re-read the detail and compare the mapped value before reporting success.

Also Available

  • Rename: POST /v1.0/end-user/devices/{device_id}/attribute with {"name": "..."}, max 50 characters.
  • Weather: GET /v1.0/end-user/services/weather/recent with lat, lon and codes — a URL-encoded JSON array of attribute codes such as w.temp, w.humidity, w.condition, w.conditionNum, w.pressure, w.realFeel, w.uvi, w.windDir, w.windLevel, w.windSpeed, plus w.hour.N to set the forecast horizon to the next N hours. Response keys are {code}.{index} with index 0 meaning now. Home coordinates are shaped {"Value": "30.3"} — read the inner Value; ask the user for their city if the home has none set.
  • Hourly statistics: confirm capability with GET /v1.0/end-user/statistics/hour/config (items carry dev_id, dp_code, statistic_type of SUM/COUNT/MAX/MIN), then GET .../hour/data?dev_id=..&dp_code=..&statistic_type=..&start_time=..&end_time=... Times are yyyyMMddHH and one request spans at most 24 hours; page longer ranges and aggregate. Values return as an array of {time: value} pairs with string values.
  • Notifications are self-send only — they reach the key's own user, nobody else. SMS and voice take {"message": "..."}; mail and push take {"subject": "...", "content": "..."}. Rate and duplicate limits apply (per contact: 15–30 per day, identical content more than twice within 50 seconds is refused).
  • IPC cloud snapshots (cameras): POST /v1.0/end-user/ipc/{device_id}/capture/allocate with body {"capture_json": "<json string>"} — double-serialized like property issue. The string carries device_id, capture_type (PIC or VIDEO), optionally pic_count (clamped to 1–5), video_duration_seconds (1–60, default 10) and home_id. Allocate only reserves an upload slot: result.status is ACCEPTED or REJECTED and result carries bucket and the object key(s) (image_object_key, and for VIDEO also video_object_key / cover_image_object_key) — never a media URL; the device still has to capture and upload. Then poll POST .../capture/resolve with a resolve_json string echoing device_id, capture_type, bucket and the object key(s) from allocate, and pass user_privacy_consent_accepted: true. Resolve returns the link to hand the user: the image/video cloud storage URL in decrypt_image_url / decrypt_video_url. status: NOT_READY means keep polling — for PIC sleep 2 s, then resolve every 2 s up to 30 s, then retry up to 3 times 3 s apart; for VIDEO sleep max(5, video_duration_seconds_effective) + 2 s using the clamped duration from the allocate response, then resolve every 2 s up to 120 s, then retry up to 3 times 5 s apart. With pic_count above 1, allocate returns per-snapshot coordinates in pic_slots[] — resolve each slot's key separately. A video's cover image can lag the video itself — check message_for_user.
Show full SKILL.md (295 more words)Show less

Real-Time Subscription

Property changes and online/offline transitions are also pushed over WebSocket. This is a long-lived process for an always-on host (a Linux gadget), not a one-shot query. Write a short Python script using the websockets package:

  • URI by key prefix (same mapping as the REST table): AZ wss://wsmsgs.iot-wus.com, EU wss://wsmsgs.iot-eu.com, IN wss://wsmsgs.iot-ap.com, UE wss://wsmsgs.iot-eus.com, WE wss://wsmsgs.iot-weu.com, SG wss://wsmsgs.iot-sea.com.
  • Auth: an Authorization: <key> header on the handshake — the same key as REST but without the Bearer prefix.
  • Frames are JSON with two top-level fields, eventType and data. A devicePropertyChange carries data.devId and data.status[], each with code, value and time (ms); an onlineStatusChange carries data.devId, data.status ("online"/"offline") and data.time.
  • Codes match thing-model codes. Look their meanings up via the model endpoint instead of guessing from the code string.
  • Reconnect with backoff on transient drops. Treat close codes 1002, 1003, 1008 and 1011 as fatal, and any frame containing error, a failing errorCode, or "success": false as a server error.
  • For event-driven automation, on a matching trigger issue properties to the action device as in Workflow step 5, and confirm the trigger→action mapping with the user before running it.

Limits

  • Control only basic property types (bool, enum, integer, string). Never write raw, bitmap, struct or array properties, or anything absent from the thing model.
  • No lock/unlock, live video streaming, firmware updates, pairing or device removal — say so and point to the Tuya app.
  • Device listing takes one scope at a time (all, home or room). Rate-limit batch writes with a short delay between commands.
  • Notifications triggered by device events must cool down at least 30 minutes — property events fire frequently.
  • These are the user's own account devices behind an end-user key; never attempt another user's devices.

Sources

© tuya, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in platforms/muse of tuya/tuya-openclaw-skills.

  • SKILL.md
  • README.md

Open the folder on GitHubat commit be95c3c

Compare with similar skills

Gadget Tuya Cloud Devices 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.

Gadget Tuya Cloud Devices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gadget Tuya Cloud Devices this skilltuya/tuya-openclaw-skills479—~2.3kAutomated safety check: PassMIT
Sandbox Benchvercel/next.js143k—~4.1kAutomated safety check: PassMIT
Statistical Analysisspacering-net/codeg3.9k3 repos~5kAutomated safety check: PassMIT
StatsmodelszLanqing/codex-claude-academic-skills4.7k15 repos~4.9kAutomated safety check: PassBSD-3-Clause
AI Daily DigestvigorX777/ai-daily-digest1.6k—~1.3kAutomated safety check: PassNone
Statistical Powerspacering-net/codeg3.9k1 repos~3.6kAutomated safety check: NotesMIT

Similar skills

  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Statistical Analysis

    spacering-net/codeg

    Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting.

    3.9k GitHub starsUsed in 3 repos~5k tokens
    Data & AnalyticsAuto-check passed
  • Statsmodels

    zLanqing/codex-claude-academic-skills

    Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 15 repos~4.9k tokens
    Data & AnalyticsAuto-check passed
  • AI Daily Digest

    vigorX777/ai-daily-digest

    Fetches RSS feeds from 90 top Hacker News blogs (curated by Karpathy), uses AI to score and filter articles, and generates a daily digest in Markdown with Chinese-translated titles, category…

    1.6k GitHub stars~1.3k tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Statistical Power

    spacering-net/codeg

    Sample-size and statistical power calculations for planning studies.

    3.9k GitHub starsUsed in 1 repo~3.6k tokens
    Data & AnalyticsAuto-check: notes
  • Agent Session Monitor

    higress-group/higress

    Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage.

    9.5k GitHub stars~3.3k tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed

More from tuya/tuya-openclaw-skills

  • Tuya Smart Control

    tuya/tuya-openclaw-skills

    Control Tuya smart home devices via natural language. An agent skill from tuya/tuya-openclaw-skills.

    479 GitHub stars~5.2k tokensUpdated 3 days ago
    Auto-check passed

Questions about Gadget Tuya Cloud Devices

What does Gadget Tuya Cloud Devices do?

Read status and control the user's Tuya app devices through Tuya's cloud end-user API with a user-supplied API key: homes and rooms, device detail, thing-model property control, rename, weather…. Gadget Tuya Cloud Devices is an agent skill from tuya/tuya-openclaw-skills. Read status and control the user's Tuya app devices through Tuya's cloud end-user API with a user-supplied API key: homes and rooms, device detail, thing-model property control, rename, weather, hourly statistics, self-send notifications, IPC cloud snapshots and real-time event subscription.

When should I use Gadget Tuya Cloud Devices?

Gadget Tuya Cloud Devices fits situations like: tasks that involve Statistics.

How do I install Gadget Tuya Cloud Devices in Claude Code?

Run `npx skills add tuya/tuya-openclaw-skills --skill gadget-tuya-cloud-devices -a claude-code`. Or copy the skill folder (platforms/muse in tuya/tuya-openclaw-skills) into .claude/skills/gadget-tuya-cloud-devices in your project. Claude Code loads it when a task matches its description.

How do I install Gadget Tuya Cloud Devices in Codex?

Run `npx skills add tuya/tuya-openclaw-skills --skill gadget-tuya-cloud-devices -a codex`. Or copy the skill folder (platforms/muse in tuya/tuya-openclaw-skills) into .agents/skills/gadget-tuya-cloud-devices in your project. Codex loads it when a task matches its description.

Can I use Gadget Tuya Cloud Devices 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 tuya/tuya-openclaw-skills --skill gadget-tuya-cloud-devices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gadget-tuya-cloud-devices, .gemini/skills/gadget-tuya-cloud-devices, .github/skills/gadget-tuya-cloud-devices and .opencode/skills/gadget-tuya-cloud-devices in your project.

What does Gadget Tuya Cloud Devices need to run?

SKILL.md names no scripts, command-line tools or credentials: Gadget Tuya Cloud Devices is instructions for the agent only. Our summary lists: Python 3.

Does Gadget Tuya Cloud Devices access the network?

SKILL.md names 7 domains. As links in the text: tuya.ai, openapi.tuyaus.com, openapi.tuyaeu.com, openapi.tuyain.com, openapi-ueaz.tuyaus.com, openapi-weaz.tuyaeu.com and openapi-sg.iotbing.com. This is read from the text; nothing was executed.

Is Gadget Tuya Cloud Devices 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 Gadget Tuya Cloud Devices use?

Gadget Tuya Cloud Devices is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gadget Tuya Cloud Devices use?

About 2.3k tokens (SKILL.md is roughly 9.3k 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 Gadget Tuya Cloud Devices?

Skills that share tags, products or a category with Gadget Tuya Cloud Devices: Sandbox Bench (vercel/next.js, 143k stars), Statistical Analysis (spacering-net/codeg, 3.9k stars), Statsmodels (zLanqing/codex-claude-academic-skills, 4.7k stars) and AI Daily Digest (vigorX777/ai-daily-digest, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gadget Tuya Cloud Devices?

tuya (a GitHub organization) maintains it in tuya/tuya-openclaw-skills, which has 479 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

Source: tuya/tuya-openclaw-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.