← Back to Skills Marketplace
onlyloveher

IOC 智能巡检报告

by onlyloveher · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
113
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install ioc-patrol-report
Description
为 IOC(智能运营中心)生成智能巡检报告。自动分析设备状态、报警记录、能耗数据,生成专业的巡检日报/周报。支持连接 PostgreSQL 数据库读取实时数据,输出 Markdown/HTML 报告。适用于物业管理、商业综合体、工业园区等场景。
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ioc-patrol-report
  3. After installation, invoke the skill by name or use /ioc-patrol-report
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
首次发布:支持日报/周报生成,连接PostgreSQL数据库,自动生成专业巡检报告
Metadata
Slug ioc-patrol-report
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is IOC 智能巡检报告?

为 IOC(智能运营中心)生成智能巡检报告。自动分析设备状态、报警记录、能耗数据,生成专业的巡检日报/周报。支持连接 PostgreSQL 数据库读取实时数据,输出 Markdown/HTML 报告。适用于物业管理、商业综合体、工业园区等场景。 It is an AI Agent Skill for Claude Code / OpenClaw, with 113 downloads so far.

How do I install IOC 智能巡检报告?

Run "/install ioc-patrol-report" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is IOC 智能巡检报告 free?

Yes, IOC 智能巡检报告 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does IOC 智能巡检报告 support?

IOC 智能巡检报告 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created IOC 智能巡检报告?

It is built and maintained by onlyloveher (@onlyloveher); the current version is v1.0.0.

💬 Comments