Shop Health Check

v1.0.0

跨境电商店铺健康度自动巡检 Skill。支持多店铺配置,定时检查站点可用性、响应时间、SSL证书健康度、关键页面404/内容缺失,异常时自动推送到飞书。

0· 111·1 current·1 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 zzhimin/shop-health-check.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Shop Health Check" (zzhimin/shop-health-check) from ClawHub.
Skill page: https://clawhub.ai/zzhimin/shop-health-check
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
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 shop-health-check

ClawHub CLI

Package manager switcher

npx clawhub@latest install shop-health-check
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (site availability, SSL, 404 checks, Feishu notifications) align with the included scripts (check_sites.py, check_ssl.py, check_404.py, report.py). The scripts implement the described checks and reporting behavior and only require the listed Python libraries.
Instruction Scope
SKILL.md instructs the agent to run the included Python scripts and to provide a config/shops.conf and (optionally) FEISHU_WEBHOOK. The scripts read only the skill-local config/shops.conf, perform network checks against the configured shop domains, and post to the configured Feishu webhook. They do not attempt to read unrelated system files, other credentials, or arbitrary environment variables.
Install Mechanism
This is instruction-only (no install spec), but the package contains runnable scripts. The user must install Python dependencies manually (pip3 install requests beautifulsoup4 urllib3 python-dateutil). No external download/extract steps or remote installers are present.
Credentials
No required environment variables are declared in the registry metadata, but the code optionally uses a FEISHU_WEBHOOK (env or config) to post alerts — this is appropriate for the feature. The webhook is optional and per-shop/default webhook URLs can be configured in config/shops.conf. No other credentials or secrets are requested.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system configs. It runs on demand/cron and can be invoked autonomously (platform default), which is reasonable for a monitoring task.
Assessment
This skill appears to do what it says: periodic availability, response-time, SSL expiry, and sample product-page checks, and to post reports to a Feishu webhook. Before installing: - Review and create config/shops.conf inside the skill folder with only the domains you control/monitor. The scripts will make outbound HTTP/S connections to those domains and open an SSL socket to their hostname:443. - Provide a Feishu webhook only if you want notifications; treat that webhook URL as a secret (it can post messages into your Feishu space). The webhook may be placed in config/shops.conf or set as FEISHU_WEBHOOK in the environment. - Install the Python deps in an isolated environment (virtualenv) to avoid impacting system Python packages. - If you will run this on a schedule, run it from an account/environment with limited privileges and only necessary network access. Audit cron or scheduler commands to ensure they run the scripts from the intended skill directory. - If you need tighter guarantees, inspect or run the scripts locally to verify behavior and modify timeouts/thresholds to suit your needs.

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

e-commercevk9781dbjwgxf6yq8rp1ydtyd3s83x556feishuvk9781dbjwgxf6yq8rp1ydtyd3s83x556latestvk9781dbjwgxf6yq8rp1ydtyd3s83x556monitoringvk9781dbjwgxf6yq8rp1ydtyd3s83x556
111downloads
0stars
1versions
Updated 4w ago
v1.0.0
MIT-0

店铺健康巡检 Skill

何时使用

  • 用户说:"检查店铺健康度"、"巡检店铺"、"帮我监控店铺是否宕机"、"店铺健康报告"
  • 作为定时任务(Cron / Heartbeat)定期执行,异常时推送到飞书

前置条件

  • Python 3.8+,需要 requestsbeautifulsoup4urllib3python-dateutil
  • 配置好多店铺信息(config/shops.conf
  • 飞书 Webhook 已配置(环境变量 FEISHU_WEBHOOK,或脚本内配置)

配置文件 config/shops.conf

[DEFAULT]
# 默认阈值(可被店铺级别覆盖)
response_timeout = 3      # 响应时间阈值(秒)
ssl_warning_days = 14     # SSL 剩余天数警告阈值
check_sample_size = 5     # 分类页抽检商品数量

[shop1]
name = 店铺1
domain = www.example.com
base_url = https://www.example.com
# 站点可用性检查的页面路径(逗号分隔,留空则用默认)
check_paths = /, /c/best-sellers, /cart, /checkout
# 要检查的分类页路径(用于抽检商品页)
category_paths = /c/best-sellers, /c/new-arrivals, /c/sale
# 可选:覆盖全局阈值
response_timeout = 5
ssl_warning_days = 30

[shop2]
name = 店铺2
domain = shop2.example.com
base_url = https://shop2.example.com
check_paths = /, /products, /collections/all
category_paths = /collections/all

使用提醒:首次使用前,请先配置 config/shops.conf,填入真实的店铺域名和路径。

工作流程

脚本按以下顺序执行:

  1. check_sites.py — 检查站点可用性和响应时间
  2. check_ssl.py — 检查 SSL 证书过期和状态
  3. check_404.py — 爬取分类页 → 抽检商品页 → 检测404和错误内容
  4. report.py — 汇总所有结果,判定告警,推送到飞书

命令示例

完整巡检

cd ~/.openclaw/skills/shop-health-check
python3 scripts/report.py

指定店铺巡检

python3 scripts/report.py --shop shop1

查看帮助

python3 scripts/report.py --help

输出示例(正常)

✅ 店铺健康巡检报告 | 2026-03-30 11:00

📦 shop1 (www.example.com)
✅ 站点可用性:全部正常(2/2 检查点)
   - / : 200 (1.2s)
   - /c/best-sellers : 200 (0.9s)
✅ SSL证书:正常(剩余 89 天)
🔍 商品页抽检:全部正常(5 个商品)

📦 shop2 (shop2.example.com)
✅ 站点可用性:全部正常(3/3 检查点)
✅ SSL证书:正常(剩余 45 天)
🔍 商品页抽检:全部正常(5 个商品)

🎉 所有店铺健康,无异常。

告警示例(有问题时)

🚨 店铺健康巡检告警 | 2026-03-30 11:00

📦 shop1 (www.example.com)
❌ 站点可用性:
   - /checkout : 超时(>3s)
⚠️  SSL证书:剩余 12 天,请尽快续期
❌ 商品页抽检:
   - /products/12345 : 404

📦 shop2 (shop2.example.com)
✅ 无异常

⚡ 共 3 个问题需要处理

告警规则

检查项告警条件
站点可用性HTTP状态码非200,或响应时间超过阈值
SSL证书剩余有效期 < 警告天数(默认14天),或证书无效/自签名
商品页404被抽检的商品页返回404
商品页内容页面包含"此商品已下架"、"Page Not Found"、"404"等错误文本

定时任务配置

openclaw cron add \
  --name "shop-health-check-hourly" \
  --cron "0 * * * *" \
  --session isolated \
  --message "运行店铺健康巡检:cd ~/.openclaw/skills/shop-health-check && python3 scripts/report.py" \
  --announce \
  --channel feishu

依赖安装

pip3 install requests beautifulsoup4 urllib3 python-dateutil

Comments

Loading comments...