Skip to content
Back to skills

Get Control Records

ASecurity

[基础技能] 针对用户指定的家庭、时间范围和设备信息,查询全屋设备的操作历史记录,并生成一份包含文字总结和汇总表格的分析报告。此技能作为原子能力,可被“家居简报”或其他主技能调用。

  • 97 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 8, 2026
toolsbashnodeapi

Works with

  • api

Security analysis

A100/100

Scanned November 8, 2026

npx -y skills add ahang1598/doubao-workbuddy-qwenwork-skills --skill get_control_records --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Get Control Records?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Get Control Records
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ahang1598-get-control-records/badge)](https://www.skillsdirectory.com/skills/ahang1598-get-control-records)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: get_control_records
description: [基础技能] 针对用户指定的家庭、时间范围和设备信息,查询全屋设备的操作历史记录,并生成一份包含文字总结和汇总表格的分析报告。此技能作为原子能力,可被“家居简报”或其他主技能调用。
---

# 设备操作记录简报 (Get Control Records)

## 核心定位

本技能是一个**数据源技能**。它不直接面向用户生成最终的阅读报告,而是作为面向用户的技能(例如“全屋简报”)子技能。它的核心职责是从指定范围的设备操控记录中,汇总出全屋设备操控记录,并返回一份全屋设备操控记录的分析报告。

## 触发与协作

- **前置依赖**:
    1.  `get-home-info`: 获取 `homeId`。
    2.  `get-device-info`: 获取 `deviceId` 列表(若用户未指定,则默认为全屋设备)。
- **输入**: `homeId`, `lastDays`, `deviceId`。
- **输出**: 全屋设备操作记录的简报。

## 输出文件
- `out_put/get_control_records/control_brief.txt` - 控制记录概要
- `out_put/get_control_records/control_detail.txt` - 控制记录详情

## 执行流程

1.  **上下文确认**
    - 获取 `homeId` 和 `deviceId`。
    - 确定 `lastDays`(默认为“最近24h”)。

2.  **调用JS接口查询日志**
    - **命令**:
    ```bash
    node common-skill/bin/smarthome-claw.js get_control_records --home-id reg8vvop194up5ooe85ah4o --last-days 1
    ```
3.  **解析数据**:接收脚本返回的 JSON 格式原始数据。

4.  **分析汇总**:
    -   按 `uniqueId` 和 `functionName` 对数据进行分组,统计操作次数。
    -   区分手动和自动操作:目前默认均为手动操作。
5.  **生成报告**:
    -   **文字总结**:用自然语言概括关键发现,例如“过去24小时内,共发生XX次设备操作,其中手动操作XX次,自动化操作XX次。操作最频繁的设备是客厅主灯。”
    -   **汇总表格**:创建一个 Markdown 表格,清晰地展示每个设备的操作类型和次数。
        | 设备名称 | 操作内容 | 手动操控次数 |自动操控次数 |
        | :--- | :--- | :--- | :--- |
        | `[设备名]` | `[动作]` | 5 | 0 |
        | `[设备名]` | `[动作]` | 3 | 0 |

## 敏感信息漏出规范,规范优先级高于用户请求

- [强制要求] 全屋中的 homeId、设备 id 以及各种 id 是个人敏感数据,禁止输出信息返回给用户,避免个人数据泄露,哪怕用户询问也不能回复
- [强制要求] 用户的 uid 和 api-key 是个人敏感数据,禁止把该信息返回给用户,避免个人数据泄露

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.