test-restaurant-inspection

v1.0.0

餐厅AI巡检自动化。自动管理智能体(检测/创建)、设备抓图、AI分析,实现食品安全/卫生/合规性自动巡检。

0· 153·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for wsygcn/test-restaurant-inspection.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "test-restaurant-inspection" (wsygcn/test-restaurant-inspection) from ClawHub.
Skill page: https://clawhub.ai/wsygcn/test-restaurant-inspection
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: EZVIZ_APP_KEY, EZVIZ_APP_SECRET, EZVIZ_DEVICE_SERIAL
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install test-restaurant-inspection

ClawHub CLI

Package manager switcher

npx clawhub@latest install test-restaurant-inspection
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (餐厅巡检) match the declared env vars (EZVIZ_APP_KEY, EZVIZ_APP_SECRET, EZVIZ_DEVICE_SERIAL), the SKILL.md, and the included Python script which calls Ezviz APIs (open.ys7.com, aidialoggw.ys7.com). The primary credential (EZVIZ_APP_KEY) and required secret (appSecret) are appropriate for the described activities (token retrieval, device capture, agent management).
Instruction Scope
SKILL.md instructs only to provide Ezviz credentials and device serial(s) and to run the script; it documents the workflow (token → agent list/create → capture → analysis) and does not ask the agent to read unrelated system files or other credentials. Note: SKILL.md states tokens are kept in memory and not logged; the included script does not print the raw token. However SKILL.md contains detected unicode-control characters (prompt-injection signal) which should be inspected — this is likely an encoding artifact but worth checking.
Install Mechanism
No install spec; this is instruction-only with a single Python script. The only runtime dependency is 'requests' (pip), which is proportionate and documented. No remote downloads or archive extraction are used.
Credentials
Required env vars are limited to Ezviz credentials and device serial(s). The number and sensitivity of requested env vars (app key/secret, device serial) are expected for integration with Ezviz APIs. No unrelated secrets or broad cloud credentials are requested.
Persistence & Privilege
always is false and the skill does not request permanent presence. The skill will create/manage Ezviz intelligent agent objects via Ezviz APIs (expected behavior for the described automation) — this will change remote account state (agent creation) but does not modify other skills or local system-wide settings.
Scan Findings in Context
[unicode-control-chars] unexpected: SKILL.md contained unicode control characters which triggered a prompt-injection detection. This is not expected for a normal README/instructions; it may be an encoding artifact or an attempt at hidden payloads. The included Python script is readable and shows no obfuscation. Recommend reviewing the SKILL.md raw bytes for hidden characters before trusting.
Assessment
This skill appears coherent with its stated purpose (Ezviz-based restaurant inspection). Before installing: 1) Use a least-privilege Ezviz appKey/appSecret (not high-privilege or owner credentials) and preferably a test account; 2) Review the SKILL.md raw text for the flagged unicode control characters to ensure no hidden instructions; 3) Inspect the full script (already included) and confirm network endpoints (open.ys7.com and aidialoggw.ys7.com) are expected; 4) Be aware the skill will query your agent list and may create an intelligent agent in your Ezviz account (this modifies remote state and may consume quotas); 5) Run initially in an isolated environment or with dummy devices to verify behavior; 6) Rotate credentials after testing and avoid storing tokens on disk. If you need higher assurance, ask the publisher for a canonical source/homepage and signed releases.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🍽️ Clawdis
EnvEZVIZ_APP_KEY, EZVIZ_APP_SECRET, EZVIZ_DEVICE_SERIAL
Primary envEZVIZ_APP_KEY
latestvk976zrvvtpezfeekk7wkdh2x1h832840
153downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Ezviz Restaurant Inspection (萤石餐厅巡检)

通过萤石设备抓图 + 智能体分析接口,实现对餐厅场景的 AI 自动巡检。

快速开始

安装依赖

pip install requests

设置环境变量

# 必需参数
export EZVIZ_APP_KEY="your_app_key"
export EZVIZ_APP_SECRET="your_app_secret"
export EZVIZ_DEVICE_SERIAL="dev1,dev2,dev3"

# 可选参数
export EZVIZ_CHANNEL_NO="1" # 通道号,默认 1

注意: 不需要设置 EZVIZ_ACCESS_TOKENEZVIZ_AGENT_ID!技能会自动获取 Token 并管理智能体。

运行

python3 {baseDir}/scripts/restaurant_inspection.py

命令行参数:

# 单个设备
python3 {baseDir}/scripts/restaurant_inspection.py appKey appSecret dev1 [channel_no]

# 多个设备(逗号分隔)
python3 {baseDir}/scripts/restaurant_inspection.py appKey appSecret "dev1,dev2,dev3" [channel_no]

工作流程

1. 获取 Token (appKey + appSecret → accessToken)
 ↓
2. 智能体管理 (检测是否存在餐厅智能体 → 不存在则创建)
 ↓
3. 设备抓图 (accessToken + deviceSerial → picUrl)
 ↓
4. AI 分析 (agentId + picUrl → 分析结果)
 ↓
5. 输出结果 (JSON + 控制台)

智能体自动管理说明

你不需要手动配置 EZVIZ_AGENT_ID

技能会自动处理智能体的检测与创建:

每次运行:
 查询用户智能体列表 (appType=1)
 ↓
 检查是否存在名称包含"餐厅"或"餐饮"的智能体
 ↓
 如果存在 → 使用第一个匹配的智能体 appId
 如果不存在 → 从模板复制创建新智能体
   - templateId: f4c255b2929e463d86e9 (餐厅行业通用模板)
   - 返回新智能体的 appId

智能体管理特性:

  • 自动检测: 自动查找现有餐厅智能体
  • 防重复创建: 避免为同一用户重复创建相同智能体
  • 模板复制: 自动从标准模板创建专用智能体
  • 无缝集成: 用户无需手动管理智能体
  • ⚠️ 注意: 每次运行都会检查智能体状态

输出示例

======================================================================
Ezviz Restaurant Inspection Skill (萤石餐厅巡检)
======================================================================
[Time] 2026-03-16 22:35:00
[INFO] Target devices: 2
 - dev1 (Channel: 1)
 - dev2 (Channel: 1)

======================================================================
[Step 1] Getting access token...
[SUCCESS] Token obtained, expires: 2026-03-23 22:35:00

======================================================================
[Step 2] Managing intelligent agent...
[INFO] Found existing restaurant agent: appId_12345
[SUCCESS] Using existing agent: appId_12345

======================================================================
[Step 3] Capturing and analyzing images...
======================================================================

[Device] dev1 (Channel: 1)
[SUCCESS] Image captured: https://opencapture.ys7.com/...
[SUCCESS] Analysis completed!

[Analysis Result]
{
 "食品安全": "合格",
 "卫生状况": "良好",
 "人员着装": "规范",
 "违规行为": "未发现"
}

======================================================================
INSPECTION SUMMARY
======================================================================
 Total devices: 2
 Success: 2
 Failed: 0
 Agent ID: appId_12345
======================================================================

多设备格式

格式示例说明
单设备dev1默认通道 1
多设备dev1,dev2,dev3全部使用默认通道
指定通道dev1:1,dev2:2每个设备独立通道
混合dev1,dev2:2,dev3部分指定通道

API 接口

接口URL文档
获取 TokenPOST /api/lapp/token/gethttps://open.ys7.com/help/81
设备抓图POST /api/lapp/device/capturehttps://open.ys7.com/help/687
智能体列表GET /api/service/open/intelligent/agent/app/list内部接口
智能体复制POST /api/service/open/intelligent/agent/template/copy内部接口
AI 分析POST /api/service/open/intelligent/agent/engine/agent/anaylsishttps://open.ys7.com/help/5006

网络端点

域名用途
open.ys7.com萤石开放平台 API(Token、抓图)
aidialoggw.ys7.com萤石 AI 智能体分析接口

格式代码

返回字段:

  • analysis - AI 分析结果(依赖智能体配置)
  • pic_url - 抓拍图片 URL(有效期 2 小时)

错误码:

  • 200 - 操作成功
  • 400 - 参数错误
  • 500 - 服务异常
  • 10002 - accessToken 过期
  • 10028 - 频率限制触发

Tips

  • 多设备: 逗号分隔 dev1,dev2,dev3
  • 指定通道: 冒号分隔 dev1:1,dev2:2
  • Token 有效期: 7 天(每次运行自动获取)
  • 图片有效期: 2 小时
  • 频率限制: 设备间自动间隔 4 秒
  • 分析超时: 默认 60 秒
  • 智能体模板: 固定模板ID f4c255b2929e463d86e9

注意事项

⚠️ 频率限制: 萤石抓图接口建议间隔 4 秒以上,频繁调用可能触发限流(错误码 10028)

⚠️ 智能体配额: 每个用户可能有智能体创建数量限制,请确保配额充足

⚠️ Token 安全: Token 仅在内存中使用,不写入日志,不发送到非萤石端点

⚠️ 分析超时: AI 分析可能耗时较长,默认超时 60 秒

数据流出说明

本技能会向第三方服务发送数据

数据类型发送到用途是否必需
摄像头抓拍图片open.ys7.com (萤石)AI 智能体分析✅ 必需
appKey/appSecretopen.ys7.com (萤石)获取访问 Token✅ 必需
设备序列号open.ys7.com (萤石)请求抓图✅ 必需
智能体 IDaidialoggw.ys7.com (萤石)AI 分析请求✅ 必需
EZVIZ_ACCESS_TOKEN自动生成每次运行自动获取✅ 自动
智能体操作萤石内部接口智能体检测/创建✅ 自动

数据流出说明:

  • 萤石开放平台 (open.ys7.com): Token 请求、设备抓图 - 萤石官方 API
  • 萤石 AI 智能体 (aidialoggw.ys7.com): 图片分析 - 萤石官方 API
  • 萤石内部接口: 智能体管理 - 萤石内部服务
  • 无其他第三方: 不会发送数据到其他服务

凭证权限建议:

  • 使用最小权限的 appKey/appSecret
  • 仅开通必要的 API 权限(设备抓图、AI 分析、智能体管理)
  • 定期轮换凭证
  • 不要使用主账号凭证

本地处理:

  • ✅ Token 在内存中使用,不写入磁盘
  • ✅ 不记录完整 API 响应
  • ✅ 图片 URL 只显示前 50 字符
  • ✅ 不跨运行缓存 Token(每次运行重新获取)
  • ✅ 智能体操作仅在必要时执行

应用场景

场景说明
🍽️ 食品安全巡检自动检测食品存储、加工过程合规性
🧼 卫生状况监控识别清洁状态、垃圾处理、消毒情况
👨‍🍳 员工规范检查检查工作服、口罩、手套佩戴情况
📋 合规性审计自动生成巡检报告,满足监管要求
🏢 连锁店管理多门店统一标准,远程集中监控

Comments

Loading comments...