← 返回 Skills 市场
IOC 智能巡检报告
作者
onlyloveher
· GitHub ↗
· v1.0.0
· MIT-0
113
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install ioc-patrol-report
功能描述
为 IOC(智能运营中心)生成智能巡检报告。自动分析设备状态、报警记录、能耗数据,生成专业的巡检日报/周报。支持连接 PostgreSQL 数据库读取实时数据,输出 Markdown/HTML 报告。适用于物业管理、商业综合体、工业园区等场景。
使用说明 (SKILL.md)
IOC 智能巡检报告
为智能建筑/园区自动生成专业巡检报告。
功能
- 设备状态巡检:分析设备在线率、故障分布
- 报警处理分析:统计报警数量、响应时长、处理率
- 能耗数据分析:对比昨日/上周能耗,识别异常
- 工单进度追踪:统计工单完成率、SLA 达成情况
- 智能建议生成:基于数据生成运维建议
使用方法
1. 配置数据源
编辑 ~/.openclaw/skills/ioc-patrol-report/config.yaml:
database:
host: localhost
port: 5432
name: ioc_db
user: admin
password: ${DB_PASSWORD}
tables:
devices: devices
alarms: alarms
work_orders: work_orders
energy: energy_records
2. 生成日报
# 生成今日巡检报告
uv run scripts/generate_report.py --type daily --date 2026-03-10
# 生成本周巡检报告
uv run scripts/generate_report.py --type weekly --week 2026-W10
3. 读取报告
# 查看生成的报告
read ~/.openclaw/skills/ioc-patrol-report/reports/daily-2026-03-10.md
报告模板
报告模板位于 assets/report-template.md,可自定义:
- 公司 Logo
- 报告标题格式
- 重点关注指标
- 建议模板
进阶:自定义分析规则
编辑 scripts/analyze.py 添加自定义分析逻辑:
# 示例:添加自定义 KPI
def custom_kpi(df):
return df['value'].mean() * 1.2
参考
- IOC 系统知识:
references/ioc-knowledge.md - 数据库表结构说明:
references/db-schema.md
安全使用建议
Do NOT run this skill until you review and modify its configuration. Specific steps to consider:
- Open config.yaml in the skill directory and remove or replace the shipped database host, user, and plaintext password (hightop.xin, port 55432, user 'postgres', password shown). Treat these as untrusted sample credentials.
- If you want the skill to access your database, explicitly edit the config to point to your DB (or remove the file so the script falls back to env vars), and set credentials via environment variables rather than leaving plaintext in the repo.
- Be aware SKILL.md suggests editing ~/.openclaw/skills/... but the script will use the bundled config.yaml in the skill directory if present — this mismatch can lead to accidental connections to the remote host.
- Audit scripts/generate_report.py (and any other scripts) fully for any network calls or unexpected behavior before running. Run in an isolated environment (sandbox, VM, or container) with network egress controlled until you confirm it only connects to the DB you expect.
- If you do not intend to connect to any external DB, remove or overwrite the provided config.yaml and run with simulated data (psycopg2 missing or mock mode) until you have a safe config.
- If you are concerned about data leakage or misuse, reject installation; the inclusion of remote credentials is poor hygiene and could indicate careless or malicious packaging.
功能分析
Type: OpenClaw Skill
Name: ioc-patrol-report
Version: 1.0.0
The skill bundle contains hardcoded, plaintext credentials (host, username, and password) for a remote PostgreSQL database (hightop.xin:55432) within the config.yaml file. While the logic in scripts/generate_report.py is consistent with the stated purpose of generating facility management reports, the inclusion of active remote credentials in a distributed package is a significant security vulnerability. There is no clear evidence of intentional malice, but the presence of specific, non-placeholder credentials for an external server is a high-risk configuration.
能力评估
Purpose & Capability
The skill legitimately needs database access to generate reports and the Python script queries Postgres tables for device, alarm, work order and energy data — this matches the stated purpose. However, the repo includes a shipped config.yaml that points to an external host (hightop.xin:55432) with a plaintext postgres username/password; shipping a default remote DB credential in the package is unexpected and not necessary for the stated goal.
Instruction Scope
SKILL.md tells the user to edit a config at ~/.openclaw/skills/ioc-patrol-report/config.yaml and shows ${DB_PASSWORD} substitution, but the runtime script (generate_report.py) loads config.yaml from the skill directory (Path(__file__).parent.parent / 'config.yaml') and will use the included file if present. That mismatch means a user who follows SKILL.md may still trigger the bundled config. The script runs SQL queries across several tables (including t_personnel_room_access) — consistent with reporting but potentially exposing sensitive personnel/device data if connected to the wrong DB. Instructions do not warn about the provided default config pointing to an external host.
Install Mechanism
There is no install spec; the skill is instruction-only plus code files. No external binary downloads or automatic installers are defined, which lowers install-time risk. Dependencies are standard (psycopg2, pyyaml) but must be installed manually by the user.
Credentials
The package declares no required environment variables, but SKILL.md suggests using ${DB_PASSWORD} in config. Crucially, the repo ships config.yaml with full credentials (host, port, dbname, user, plaintext password) that would be used by default. Including remote DB credentials is disproportionate and risky — it will cause the skill to attempt network connections to that host without the user explicitly providing credentials.
Persistence & Privilege
The skill does not request persistent platform privileges (always: false), does not modify other skills, and does not declare any special system-level config paths. Autonomous invocation is allowed (platform default) but that alone is not a new concern here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ioc-patrol-report - 安装完成后,直接呼叫该 Skill 的名称或使用
/ioc-patrol-report触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
首次发布:支持日报/周报生成,连接PostgreSQL数据库,自动生成专业巡检报告
元数据
常见问题
IOC 智能巡检报告 是什么?
为 IOC(智能运营中心)生成智能巡检报告。自动分析设备状态、报警记录、能耗数据,生成专业的巡检日报/周报。支持连接 PostgreSQL 数据库读取实时数据,输出 Markdown/HTML 报告。适用于物业管理、商业综合体、工业园区等场景。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 113 次。
如何安装 IOC 智能巡检报告?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ioc-patrol-report」即可一键安装,无需额外配置。
IOC 智能巡检报告 是免费的吗?
是的,IOC 智能巡检报告 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
IOC 智能巡检报告 支持哪些平台?
IOC 智能巡检报告 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 IOC 智能巡检报告?
由 onlyloveher(@onlyloveher)开发并维护,当前版本 v1.0.0。
推荐 Skills