tuyaopen-embedded-code-check
Check C/C++ code formatting, detect Chinese characters, and validate file headers using clang-format and check_format.py.
Skill by tuya
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/tuya-tuyaopen-embedded-code-check
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/tuyaopen-embedded-code-check
What's inside
- Skill name
tuyaopen-embedded-code-check- Description
- Check C/C++ code formatting, detect Chinese characters, and validate file headers using clang-format and check_format.py. No `tuyaopen-cli` CLI group covers this — it is this skill's own bundled scripts only. Use when the user mentions code format, lint, clang-format, style check, PR check, or after editing C/C++ files. 代码格式、格式检查、代码风格、PR检查、代码规范 —— 无对应 tuyaopen CLI 命令组, 仅靠本 skill 自带脚本。
- License
- Apache-2.0
- Compatibility
- clang-format installed (Linux: `apt install clang-format`; macOS: `brew install clang-format`; Windows: `choco install llvm` or an LLVM release); Python 3 (venv active)
- Metadata
- owner: embedded-team · version: 1.0.4 · deprecated: false · min-cli-version: 0.1.0-beta.17
- Instructions
- 152 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- files: referenced but missing: references/ROUTING.md
Files (2)
- SKILL.md
- check_files.py · scripts/
SKILL.md (first lines)
# TuyaOpen Code Format Check ## No `tuyaopen-cli` CLI coverage Verified against `tuyaopen-cli schema list --json` (18 groups: boards, config, credential, demos, dependency, devplat, diag, dp, firmware, hardware, license, manifests, miniapp, product, project, schema, sdk, skills — none named `check`/`format`/`lint`/`code`). C/C++ formatting, Chinese-character detection, and file-header validation have no `tuyaopen-cli` CLI wrapper; everything in this skill is `tools/check_format.py` (an SDK script) plus this skill's own `scripts/check_files.py` wrapper. There is nothing to route to `tuyaopen-cli --help` for here. > **SDK root:** All `$OPEN_SDK_PYTHON tools/check_format.py` commands must be run from the TuyaOpen SDK root (`$OPEN_SDK_ROOT`). The bundled `check_files.py` script resolves the SDK root automatically via `$OPEN_SDK_ROOT` or by walking upward for `.clang-format`. See the `tuyaopen-start` routing table if not yet activated. ## Overview `tools/check_format.py` validates C/C++ files (`.c`, `.cpp`, `.h`, `.hpp`, `.cc`, `.cxx`) against three rules: 1. **clang-format compliance** — governed by `.clang-format` at the repo root (LLVM-based style with 4-space indent). 2. **No Chinese characters** — checks **all** content including comments and strings. Only English text is allowed in source code. 3. **Proper file headers** — Doxygen-style with `@file`, `@brief`, and `@copyright` (must include current year + "All Rights Reserved"). Paths listed in `.clang-format-ignore` are excluded (third-party libraries: cJSON, FlashDB, lwip, coreMQTT, etc.). ### Prerequisites `clang-format` must be installed. It is included in the system dependencies (`sudo apt-get install clang-format`). If missing, the format check will be skipped with a warning. ## Usage All commands must be run from the **SDK root** (`$OPEN_SDK_ROOT`, where `.clang-format` lives). ### Check specific files (recommended for Agent use) ```bash $OPEN_SDK_PYTHON tools/check_format.py --debug --files path/to/file.c path/to/file.h ``` Supports glob patterns: `--files "src/tal_system/**/*.c"` ### Check a directory recursively ```bash $OPEN_SDK_PYTHON tools/check_format.py --debug --dir src/tal_system/ ``` ### Check all files in current directory (debug mode fallback) ```bash $OPEN_SDK_PYTHON tools/check_format.py --debug ``` When `--debug` is used without `--files` or `--dir`, it scans the current working directory recursively for all C/C++ files. ### PR mode (CI / pre-merge) Checks files modified relative to a base branch (uses `git diff`): ```bash $OPEN_SDK_PYTHON tools/check_format.py # default: --base master $OPEN_SDK_PYTHON tools/check_format.py --base main # custom base branch ``` ### Verbose output Add `-v` to any mode for detailed information: ```bash $OPEN_SDK_PYTHON tools/check_format.py --debug --files foo.c -v ``` ## Important Notes - `--files` and `--dir` **require** `--debug` flag — they are ignored in PR mode. - The script locates the SDK root by searching upward for `.clang-format`. - Exit code: `0` = all checks pass, `1` = errors found. - Header **warnings** (suggestions) do not cause failure; only **errors** do. ## Agent Workflow When editing C/C++ files in this repo: 1. Make your changes. 2. **Check for sensitive information** before committing (see below). 3. Run the bundled wrapper: `$OPEN_SDK_PYTHON .agents/skills/tuyaopen-embedded-code-check/scripts/check_files.py <changed_files>` Or directly: `$OPEN_SDK_PYTHON tools/check_format.py --debug --files <changed_files>` 4. If **format errors**: run `clang-format -style=file -i <file>` to auto-fix, then re-check. 5. If **Chinese character errors**: replace Chinese text with English — this applies to comments and strings too, not just identifiers. 6. If **header errors**: ensure the file starts with a proper Doxygen header (see template below). Pay attention to the copyright year. ## Sensitive Information Check Before committing or pushing code, verify that **no sensitive information** is included: - **Device credentials**: `UUID`, `AuthKey`, `TUYA_OPENSDK_UUID`, `TUYA_OPENSDK_AUTHKEY` — must use placeholder values (e.g. `"your_uuid_here"`), never real credentials. - **Product IDs**: `TUYA_PRODUCT_ID` — use a placeholder or a development-only PID. - **API keys / tokens**: any hardcoded cloud API keys, access tokens, or passwords. - **Private keys / certificates**: TLS private keys, certificate files, or PEM content embedded in source. - **Network credentials**: Wi-Fi SSID/password, server URLs with credentials. ### Agent strategy When generating or modifying code that involves `tuya_config.h` or similar credential files: 1. Always use placeholder values: `"your_uuid_here"`, `"your_authkey_here"`. 2. Warn the user if real credentials appear to be present (non-placeholder UUIDs/keys that look like actual hex or alphanumeric strings of expected length). 3. Never log, print, or include credentials in debug output, comments, or commit messages. ## File Header Template Every `.c` and `.h` file **must** start with a `/**` comment block containing `@file`, `@brief`, `@version`, `@date`, and `@copyright`: ```c /** * @file filename.c * @brief Brief description in English * @version 1.0 * @date YYYY-MM-DD * @copyright Copyright (c) 2025 Tuya Inc. All Rights Reserved.
From tuya/tuyaopen-ide-manifests, Apache-2.0.
More from tuya/tuyaopen-ide-manifests
- 0.603score
tuyaopen-miniapp-performance-ux-guard
tuya
Reviews and improves Tuya 小程序/miniapp/Ray quality in one package: build guardrails, launch/first-screen performance, release review gates, and…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-start
tuya
Foundation conventions shared by every other TuyaOpen skill: how to find and identify the `tuyaopen-cli` CLI, the `--json` envelope contract, the exit-code…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-embedded-cli-debug
tuya
Debug a running TuyaOpen device: register firmware features as device CLI commands and drive them over the serial shell (`tal_cli`), capture serial logs in…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-embedded-flash
tuya
Flash firmware, monitor serial output, and pick the right serial port for a TuyaOpen device via the `tuyaopen-cli` CLI (`firmware flash`, `firmware monitor`…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-embedded-project
tuya
Read and mutate the `.tuyaopen/` project descriptor via the `tuyaopen-cli` CLI (`project info/create/set-platform/set-board/set-status/set-intent/…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-miniapp-charts-library
tuya
帮助 Agent 在 Ray 小程序中正确集成 `@ray/charts-library`,包括场景卡片(EleChartCard、TempAndHumChartCard、IlluminanceChartCard)、DataSourceProvider…
SkillAFreshness: A★ 2Claude Code +9 - 0.600score
miniapp-development-workflow
tuya
Shared MiniApp 小程序 and 面板 development and release workflow for TuyaOpen and TuyaOS, including Ray and 需求 hand-offs, using IDE Agent Tools and Capability Broker.
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
tuyaopen-embedded-device-auth
tuya
Configure device authorization credentials (UUID, AuthKey, PID) and network provisioning for TuyaOpen devices via `tuyaopen-cli license list/add/import/…
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
tuyaopen-embedded-build
tuya
Build and compile TuyaOpen projects via the `tuyaopen-cli firmware build/clean` CLI (IDE-scaffolded projects) or `tos.py build`/`tos.py clean` (raw SDK…
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
tuyaopen-embedded-hardware
tuya
Hardware-aware code generation for TuyaOpen embedded projects.
SkillAFreshness: A★ 2Claude Code +9 - 0.599score
tuyaopen-embedded-add-board
tuya
Add new board (BSP) support to TuyaOpen, including board directory structure, Kconfig, drivers, and config files.
SkillAFreshness: A★ 2Claude Code +9 - 0.598score
tuyaopen-skill-maker
tuya
How to author or edit a skill in this catalogue: frontmatter contract, id naming rules (tuyaopen- prefix, no slashes), where the payload goes, the…
SkillAFreshness: A★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 7
- Open issues
- 0
- Last commit (this folder)
- Sep 16, 2026 (1 month ago)
- Last release
- Oct 20, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.4
- License
- Apache-2.0
- Repository
- github.com/tuya/tuyaopen-ide-manifests
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from tuya
- 0.603score
tuyaopen-embedded-flash
tuya
Flash firmware, monitor serial output, and pick the right serial port for a TuyaOpen device via the `tuyaopen-cli` CLI (`firmware flash`, `firmware monitor`…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-miniapp-charts-library
tuya
帮助 Agent 在 Ray 小程序中正确集成 `@ray/charts-library`,包括场景卡片(EleChartCard、TempAndHumChartCard、IlluminanceChartCard)、DataSourceProvider…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-start
tuya
Foundation conventions shared by every other TuyaOpen skill: how to find and identify the `tuyaopen-cli` CLI, the `--json` envelope contract, the exit-code…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-embedded-cli-debug
tuya
Debug a running TuyaOpen device: register firmware features as device CLI commands and drive them over the serial shell (`tal_cli`), capture serial logs in…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-embedded-project
tuya
Read and mutate the `.tuyaopen/` project descriptor via the `tuyaopen-cli` CLI (`project info/create/set-platform/set-board/set-status/set-intent/…
SkillAFreshness: A★ 2Claude Code +9 - 0.603score
tuyaopen-miniapp-performance-ux-guard
tuya
Reviews and improves Tuya 小程序/miniapp/Ray quality in one package: build guardrails, launch/first-screen performance, release review gates, and…
SkillAFreshness: A★ 2Claude Code +9
Cite this page
tuyaopen-embedded-code-check skill. Agent Mart. https://agentmart.dev/skills/tuya-tuyaopen-embedded-code-check (last updated 2026-10-24)