insentek-api-skill
通过自然语言查询 insentek(东方智感)物联网设备数据。 支持土壤墒情仪、气象站、见厘液位计等多种设备类型的实时数据、 历史数据、趋势分析、跨设备对比与数据导出。
Rank
62
Safety
84
Downloads
1.0k
Updated
Oct 11, 2026
Version
1.2.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.2.2release · observed May 26, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s1776e0bqhtsht8hhbrm0y6dvh874b9c:insentek-api-skill- Install using `clawhub skill install s1776e0bqhtsht8hhbrm0y6dvh874b9c:insentek-api-skill` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/xddcode/insentek-api-skill before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-xddcode-insentek-api-skill/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
153,343 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: insentek-openapi
version: 1.2.2
description: >
通过自然语言查询 insentek(东方智感)物联网设备数据。
支持土壤墒情仪、气象站、见厘液位计等多种设备类型的实时数据、
历史数据、趋势分析、跨设备对比与数据导出。
api_base_url: https://openapi.ecois.info
author: insentek-api-skills
guardrails:
raw_data_output: PROHIBITED
dry_run_preview_rows: 5
max_chat_rows: 200
max_export_rows: 50000
---
<!--
Note: `api_base_url` above is informational only; it is not consumed by
any script. To override at runtime, set the INSENTEK_API_BASE environment
variable before invoking scripts/insentek_cli.py.
-->
# Insentek OpenAPI Skill
> 轻量 Runtime Contract。完整交互规范见 `docs/interaction.md`,分析策略见 `docs/analysis.md`。
> 兼容平台:OpenClaw、Hermes-Agent、Claude Code、ChatGPT
---
## 1. Routing
用户意图 → 工具路由:
| L1 意图 | L2 输出 | 调用 |
|---------|---------|------|
| 查询数据 | 对话展示 | `query_device` → `query_data` → 按输出格式回复 |
| 查询数据 | 文件导出 | `query_device` → `export_*` → 返回文件路径 |
| 生成报告 | 文件导出 | `query_device` → `query_data` → 分析 → `write_html` |
| 对比设备 | 对话展示 | `query_device` (xN) → `query_data` (xN) → 对比表格 |
| 对比设备 | 文件导出 | `query_device` (xN) → `query_data` (xN) → `export_excel` |
**任何一层意图不明确时,MUST 向用户确认,不得假设。** 详见 `docs/interaction.md` Section 1。
---
## 2. Tools
**认证约束(MUST):** Agent **禁止**向用户索要 `appid` 或 `secret`,也 **禁止**在对话中接收、存储或回显这些凭据。凭据仅通过 CLI 在本地配置:
```bash
npx @insentek/openapi-skill login # 配置(加密保存)
npx @insentek/openapi-skill logout # 清除
npx @insentek/openapi-skill auth status # 查看连接状态
```
> npm 包名为 `@insentek/openapi-skill`(已发布到 npm registry)。`insentek-api-skill` 是它的可执行别名,**仅在该包已被安装时**可用。**所有 `npx` 调用都应使用 scoped 包名** `@insentek/openapi-skill`,否则未安装的用户机器会得到 "npm ERR! 404"。
### 命令分工(MUST)
| 用途 | 工具 | 示例 |
|------|------|------|
| 安装 / 更新 skill | `npx @insentek/openapi-skill` | `install -r openclaw -s workspace -y` |
| 配置 / 清除凭据 | `npx @insentek/openapi-skill login/logout` | `npx @insentek/openapi-skill login` |
| 查连接状态 | `npx @insentek/openapi-skill auth status` | — |
| 查安装路径 / 脚本位置 | `npx @insentek/openapi-skill info/status/doctor --json` | 见下方「脚本路径解析」 |
| **查询 API** | `python3 <SKILL_ROOT>/scripts/insentek_cli.py` | `python3 .../insentek_cli.py devices` |
### 脚本路径解析(MUST,API 调用前)
Agent 工作目录通常**不是** skill 安装目录。**禁止**使用相对路径 `python3 scripts/insentek_cli.py ...`。
**首次 API 调用前**,或脚本路径未知 / 返回「文件找不到」时,**必须先**查实际安装位置。`info --json` 会列出所有 runtime × scope 的解析结果及 `installed` 标记,无需提前知道用户是哪种安装:
```bash
npx @insentek/openapi-skill info --json
```
从输出中遍历 `runtimes[].scopes[]`,挑选第一个 `installed: true` 的条目,将其 `installDir` 作为 `${SKILL_ROOT}`,将 `scripts.cli` / `scripts.exportExcel` / `scripts.writeHtml` 作为脚本绝对路径,并将 `python.command`(如 `python3` / `py` / `python`)作为 `${PYTHON}`。解析后在**本会话内缓存**,后续 API 调用复用,**不要**重复猜测路径。
如果用户已经明确告诉过你 runtime / scope(例如刚刚 `install -r openclaw -s workspace -y`),也可以用 `status --json` 精确查询:
```bash
npx @insentek/openapi-skill status -r openclaw -s workspace --json
# 或 -r claude -s global / -s project,按用户场景选择
```
OpenClaw workspace 常见路径(仅供参考,**以 info/status 返回为准**):
`~/.openclaw/workspace/skillpackages/insentek-skill-cli/README.md
# @insentek/openapi-skill Bootstrap the **insentek-openapi** skill for **OpenClaw** and **Claude Code**. | 类型 | 名称 | |------|------| | npm package | `@insentek/openapi-skill` | | skill id | `insentek-openapi` | | 安装目录 | `insentek-openapi` | | CLI 命令 | `insentek-api-skill` | 安装路径由 CLI **按 runtime + scope 动态解析**。用 `info` / `doctor` 查看本机实际路径。 ## Quick Start ```bash npx @insentek/openapi-skill ``` ## OpenClaw 用户:ClawHub 安装(独立方式) OpenClaw 用户也可通过 ClawHub 单独安装,与本 CLI 无关: ```bash clawhub skill install insentek-api-skill clawhub skill remove insentek-api-skill ``` ## Commands | Command | Description | |---------|-------------| | `install` | 安装 skill(默认命令,可交互选择 runtime) | | `login` | 配置 Insentek API 凭据(加密本地保存) | | `logout` | 清除已保存的凭据 | | `auth status` | 查看凭据连接状态 | | `update` | 更新已安装 skill 到当前包版本 | | `uninstall` | 卸载 | | `status` | 查看安装状态 | | `doctor` | 诊断路径、manifest、脚本与环境 | | `info` | 查看 package / skill / 动态解析路径 | ## Options | Option | Description | |--------|-------------| | `-r, --runtime` | `claude`, `openclaw`, `all` | | `-s, --scope` | 见下方 Scope 说明 | | `-f, --force` | 覆盖已有安装 | | `-y, --yes` | 非交互(需配合 `-r`) | | `--json` | 输出 JSON(`install`/`update`/`uninstall` 需配合 `-y`) | ### Scope 说明 | Runtime | 支持的 scope | |---------|-------------| | Claude Code | `global`(默认), `project` | | OpenClaw | `global`, `project`, `workspace` | `workspace` 仅 OpenClaw 支持;Claude Code 没有 workspace 概念。OpenClaw `workspace` 安装路径为 `~/.openclaw/workspace/skills`(Windows: `%USERPROFILE%\.openclaw\workspace\skills`)。 ## Examples ```bash # 交互式安装 npx @insentek/openapi-skill # 安装到 Claude Code(global) npx @insentek/openapi-skill install -r claude -s global -y # 安装到 OpenClaw workspace npx @insentek/openapi-skill install -r openclaw -s workspace -y # 查安装路径与脚本位置(Agent 应用此解析 SKILL_ROOT) npx @insentek/openapi-skill status -r openclaw -s workspace --json # 凭据 / 诊断 npx @insentek/openapi-skill update -r claude -y npx @insentek/openapi-skill doctor npx @insentek/openapi-skill login npx @insentek/openapi-skill logout npx @insentek/openapi-skill auth status npx @insentek/openapi-skill info # 脚本 / CI 使用 JSON 输出 npx @insentek/openapi-skill status -r claude --json npx @insentek/openapi-skill install -r claude -s global -y --json npx @insentek/openapi-skill doctor --json ``` ## Development / 本地测试 包尚未发布到 npm 时,`npx @insentek/openapi-skill` 会失败。本地请用下面任一方式: ```powershell cd packages/insentek-skill-cli npm install npm run sync-assets npm test ``` **方式一:直接跑(最简单)** ```powershell node bin/insentek-api-skill.js info node bin/insentek-api-skill.js node bin/insentek-api-skill.js install -r claude -s global -y ``` **方式二:模拟 npx(在 CLI 目录下)** ```powershell npx . info npx . npx . install -r claude -s global -y ``` **方式三:全局 link 后按发布命令测** ```powershell npm link npx @insentek/openapi-skill info insentek-api-skill doctor ``` **方式四:模拟正式发布** ```powershell npm run sync-assets npm pack npm install -g .\insentek-openapi-skill-1.2.2.tgz insentek-api-skill info ``` 修改 `SKILL.md` / `scripts/` 后需
README.md
# Insentek OpenAPI Skill > 让终端用户用自然语言轻松查询 insentek(东方智感)物联网设备数据。 --- ## 简介 本项目基于 insentek OpenAPI v3,产出一份通用 `skill.md` 技能文件及配套文档与示例。终端用户可在 **OpenClaw、Hermes-Agent、Claude Code、ChatGPT** 等 Agent 平台上直接对话使用,通过自然语言调用 API 完成设备数据查询、报告生成与实时分析。 **支持的设备类型:** - 🌱 **Z** — 土壤墒情仪(土壤温度、水分、电导率) - 🌤️ **T** — 气象站(空气温度、湿度、风速、降雨量、PM2.5 等) - 📏 **J** — 见厘液位计(激光液位、电池电压) --- ## 快速开始 ### 前置依赖 | 依赖 | 版本 | 用途 | |------|------|------| | Node.js | ≥ 18 | 运行 `npx @insentek/openapi-skill` CLI | | Python | ≥ 3.10 | 运行 `scripts/insentek_cli.py` 等脚本(脚本使用了 PEP 604 联合类型语法) | | openpyxl(可选) | 任意 | 仅当需要 Excel 导出时 | > macOS / Linux 通常应使用 `python3` 命令调用脚本,不要使用裸 `python`(在新版 macOS 与 Ubuntu/Fedora 上不存在或指向 Python 2)。CLI 的 `info --json` 会输出 `python.command`,Agent 必须以该值作为脚本调用前缀。 ### 1. 获取认证信息 登录 [E 生态](https://cloud.ecois.info),在「应用管理」中创建应用,获取 `appid` 和 `secret`。 ### 2. 安装 Skill **一键安装(推荐):** ```bash npx @insentek/openapi-skill ``` | 类型 | 名称 | |------|------| | npm package | `@insentek/openapi-skill` | | skill id | `insentek-openapi` | | 安装目录 | `insentek-openapi` | CLI 会引导选择 **runtime**(OpenClaw / Claude Code),支持 **scope**(`global` / `project` / `workspace`),并动态解析本机安装路径。 ```bash npx @insentek/openapi-skill install -r claude -s global -y npx @insentek/openapi-skill update -r claude -y npx @insentek/openapi-skill doctor npx @insentek/openapi-skill info ``` OpenClaw 用户也可通过 ClawHub 单独安装(与本 CLI 无关): ```bash clawhub skill install insentek-api-skill ``` | 命令 | 说明 | |------|------| | `install` | 安装 skill | | `update` | 更新到当前包版本 | | `status` / `doctor` | 查看状态 / 诊断 | | `uninstall` | 卸载 | > CLI 源码见 [`packages/insentek-skill-cli/`](packages/insentek-skill-cli/)。路径因 runtime/scope/OS 而异,请用 `info` / `doctor` 查看本机实际位置。 ### 命名约定 仓库中涉及三套名字,用途不同,**不要混用**: | 维度 | 取值 | 用途 | |------|------|------| | Skill ID(`skill.json` / SKILL.md frontmatter) | `insentek-openapi` | 安装目录名、Agent 内部标识 | | ClawHub slug | `insentek-api-skill` | `clawhub skill install <slug>` 时使用 | | npm 包名 | `@insentek/openapi-skill` | **所有 `npx` 调用必须使用此名**(registry 上没有 `insentek-api-skill`) | | CLI 二进制名 | `insentek-api-skill` | 仅在 `@insentek/openapi-skill` 已安装时作为可执行别名 | ### 3. 开始对话 ``` User: 我的 appid 是 xxx,secret 是 yyy,查看所有设备 ``` 更多用法见 [`docs/getting-started.md`](docs/getting-started.md)。 --- ## 项目结构 ``` . ├── SKILL.md # 核心技能文件 (Runtime Contract) ├── skill.json # Skill manifest (id / version / runtime) ├── docs/ │ ├── getting-started.md # 快速开始指南 │ ├── platform-setup.md # 各平台配置指南 │ ├── interaction.md # 交互规范 (意图/时间/输出格式) │ └── analysis.md # 分析策略 (报告/告警/行业参数) ├── reference/ │ └── api-doc.md # 完整 API 文档 (OpenAPI v3.1.9) ├── examples/ │ ├── queries.md # 查询类对话示例 │ ├── reports.md # 报告生成示例 │ └── flows.md # 核心交互流程示例 ├── scripts/ # 参考实现脚本 │ ├── insentek_cli.py # 统一 CLI(认证/查询/实时/导出) │ ├── credential_store.py # 加密凭据读写 │ ├── export_excel.py
scripts/README.md
# Insentek OpenAPI Scripts
本目录包含 Insentek OpenAPI 的参考实现脚本。Agent 通过调用这些脚本完成 API 交互、数据导出和报告生成,而非直接使用 `curl` 命令。
## 设计原则
1. **统一入口**: `insentek_cli.py` 封装所有 API 调用,Agent 只需学习一套参数风格
2. **边界内置**: 脚本内部实现时间范围限制、数据量检查,Agent 无需重复实现
3. **结构化输出**: 所有脚本输出 JSON 到 stdout,便于 Agent 解析和决策
4. **零配置运行**: 仅依赖 Python 标准库(Excel 导出除外)
## 脚本列表
| 脚本 | 功能 | 依赖 |
|------|------|------|
| `insentek_cli.py` | 统一 CLI:设备查询、实时/历史数据查询、CSV/JSON 导出 | Python 3.10+ |
| `credential_store.py` | 凭据加密读写(与 CLI login 兼容) | Python 3.10+, cryptography(读取加密凭据时) |
| `write_html.py` | HTML 文件写入:将 AI 生成的 HTML 内容安全落盘 | Python 3.10+ |
| `export_excel.py` | Excel 导出(多 sheet:原始数据 + 统计摘要) | Python 3.10+, openpyxl |
> 脚本使用了 PEP 604 联合类型(`int | None`),需要 Python 3.10 及以上。
## 使用示例
### 环境检查(首次使用前必做)
> Agent 应使用 `python3`(macOS/Linux)或 `python` / `py`(Windows,以 `npx @insentek/openapi-skill info --json` 的 `python.command` 为准)调用脚本。下面示例统一写为 `python3`。
```bash
python3 insentek_cli.py check
```
输出示例:
```json
{
"success": true,
"all_checks_passed": true,
"checks": {
"python": {"ok": true, "version": "3.11.0", "executable": "/usr/bin/python3", "message": "Python 3.11.0 满足要求 (>=3.10)"},
"scripts_cli": {"ok": true, "path": "...", "message": "核心脚本 insentek_cli.py 已找到"},
"scripts_excel": {"ok": true, "path": "...", "message": "Excel 脚本 export_excel.py 已找到"},
"scripts_write_html": {"ok": true, "path": "...", "message": "HTML 写入脚本 write_html.py 已找到"},
"openpyxl": {"ok": true, "version": "3.1.2", "message": "openpyxl 3.1.2 已安装,Excel 导出可用"},
"curl": {"ok": true, "message": "curl 可用,可作为脚本不可用时的 fallback"},
"api_reachable": {"ok": true, "status": 400, "message": "API 服务可访问(HTTP 400,未提供认证参数)"}
},
"summary": {
"critical": "通过",
"optional": "全部通过",
"message": "环境检查通过,所有功能可用。"
}
}
```
### 认证
凭据通过 CLI 本地配置,**不要在对话中提供 secret**:
```bash
npx @insentek/openapi-skill login
npx @insentek/openapi-skill logout
npx @insentek/openapi-skill auth status
```
脚本会自动从 `~/.config/insentek/credentials.json` 读取加密凭据,`--token` 参数可选。
### 查询设备列表
```bash
python3 insentek_cli.py devices --page 1 --limit 20
```
### 查询数据(含边界检查)
```bash
python3 insentek_cli.py data --sn 00000000000000 --range 20250101,20250131
```
### 实时数据
```bash
python3 insentek_cli.py latest --sn 00000000000000
```
### 导出 CSV
```bash
python3 insentek_cli.py export --sn 00000000000000 --range 20250101,20250131 --format csv --output data.csv
```
### 导出 Excel
```bash
python3 export_excel.py --sn 00000000000000 --range 20250101,20250131 --output data.xlsx
```
### 写入 HTML 报告(AI 动态生成内容后落盘)
```bash
# 推荐:先把 HTML 写到临时文件,再传 --input-file,避免 shell 吞掉换行/引号
python3 write_html.py --input-file /tmp/report.html --output report.html
```
## 输出格式
所有脚本成功时输出:
```json
{
"success": true,
"total": 1000,
"file": "/path/to/file.csv",
"message": "成功导出 1000 条数据到 data.csv"
}
```
失败时输出:
```json
{
"success": false,
"error": "单次查询最多支持 1 年范围..."
}
```
## 边界限制
| 限制项 | 值 | 说明 |
|--------|-----|------|
| 单次最大跨度 | 365 天 | 超过则拒绝并提示拆分 |_meta.json
{
"ownerId": "kn7dcqpad4aeh2nt5shjf3aerd875anm",
"slug": "insentek-api-skill",
"version": "1.2.2",
"publishedAt": 1779788114742
}AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/xddcode/skills/insentek-api-skill",
"sourceUrl": "https://clawhub.ai/xddcode/skills/insentek-api-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T17:16:29.334Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-xddcode-insentek-api-skill/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-xddcode-insentek-api-skill/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T17:16:29.334Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1K downloads",
"href": "https://clawhub.ai/xddcode/insentek-api-skill",
"sourceUrl": "https://clawhub.ai/xddcode/insentek-api-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T17:16:29.334Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.2.2",
"href": "https://clawhub.ai/xddcode/insentek-api-skill",
"sourceUrl": "https://clawhub.ai/xddcode/insentek-api-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-26T09:35:14.742Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-xddcode-insentek-api-skill/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-xddcode-insentek-api-skill/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.2.2",
"description": "## v1.2.2 — Agent 调用规范与 HTTPS 修正 Agent 误用包名/命令、Python 路径不明确等问题;API 默认切换 HTTPS;新增 `latest` 子命令。 ### 变更 - 统一 `npx @insentek/openapi-skill` 调用,修正引导文案中的错误包名 - `${PYTHON}` 由 `info --json` 的 `python.command` 解析,不再硬编码 `python` - 默认 API 地址改为 `https://openapi.ecois.info` ### 新功能 - `insentek_cli.py latest --sn SN` — 查询设备最新数据 - 统一错误信封 `normalize_error`,WAF HTML 错误页自动截断 ### 修复 - Python 最低版本要求修正为 `>=3.10` - `doctor` 移除无关的 `git` 检测 - 文档结构与 OpenClaw 安装说明修正 ### 升级 ```bash npx @insentek/[email protected] install --force npx @insentek/openapi-skill update -y",
"href": "https://clawhub.ai/xddcode/insentek-api-skill",
"sourceUrl": "https://clawhub.ai/xddcode/insentek-api-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-26T09:35:14.742Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
