这个仓库集中维护面向运维与安全巡检场景的 Codex Skills。每个一级目录都是一个可独立安装、独立分发、独立运行的 skill。
当前包含两个 skill:
server-health-monitor/:服务器运行状态与认证安全巡检。website-health-inspector/:网站与管理平台健康巡检。SecurityAgent/
├─ server-health-monitor/
│ ├─ SKILL.md
│ ├─ agents/
│ ├─ assets/
│ ├─ references/
│ ├─ scripts/
│ └─ tests/
└─ website-health-inspector/
├─ SKILL.md
├─ agents/
├─ assets/
├─ docs/
├─ references/
├─ scripts/
└─ tests/
server-health-monitor 用于生成中文、可交付、可复核的服务器运行状态巡检报告。它面向服务器清单、运维资产表、doops 节点、zheyin/hdu 等内网环境巡检场景。
适用任务:
核心能力:
targets、info、workspace push -> exec -> read -> clean、传输模式、session、清理状态。安全边界:
--password-strength-audit 必须由用户明确授权后才读取本次运行凭证,并且只在内存中评分。常用命令示例:
# zheyin doops 节点自身健康巡检
$env:DOOPS_ALLOW_INSECURE_GATEWAY='1'
python server-health-monitor/scripts/collect_doops_inventory.py --environment zheyin --out reports/zheyin-self-node/inventory.json
python server-health-monitor/scripts/run_server_health_monitor.py --inventory reports/zheyin-self-node/inventory.json --out reports/zheyin-self-node
# Excel 清单批量探测并采集主机指标
python server-health-monitor/scripts/collect_doops_inventory.py --inventory path/to/servers.xlsx --probe-target zheyin --host-metrics --host-metrics-target zheyin --classify-inventory --out reports/server-run/inventory.json
python server-health-monitor/scripts/run_server_health_monitor.py --inventory reports/server-run/inventory.json --out reports/server-run --guide-mode ai-image
# 启用认证安全巡检
python server-health-monitor/scripts/collect_doops_inventory.py --inventory path/to/servers.xlsx --probe-target zheyin --host-metrics --host-metrics-target zheyin --auth-security --auth-log-window-days 7 --out reports/auth-security/inventory.json
python server-health-monitor/scripts/run_server_health_monitor.py --inventory reports/auth-security/inventory.json --out reports/auth-security
website-health-inspector 用于面向管理平台管理员生成网站健康巡检报告。它支持临时 URL 快速巡检、Excel 资源清单批量巡检,以及带管理员凭证的深度浏览器巡检。
适用任务:
核心能力:
安全边界:
常用命令示例:
# 临时 URL 快速巡检
python website-health-inspector/scripts/run_health_inspection.py --url https://example.com/admin --out reports/site-run
# 管理员深度巡检,密码通过环境变量传入
$env:WEBSITE_HEALTH_ADMIN_PASSWORD='replace-with-local-secret'
python website-health-inspector/scripts/run_health_inspection.py --url https://example.com/admin --username admin --password-env WEBSITE_HEALTH_ADMIN_PASSWORD --out reports/site-deep
# 多站点清单巡检
python website-health-inspector/scripts/run_multi_site_inspection.py --inventory path/to/sites.xlsx --out reports/site-batch
将需要使用的 skill 目录复制到 Codex skills 目录即可,例如:
Copy-Item -Recurse -Force server-health-monitor C:\Users\Administrator\.codex\skills\server-health-monitor
Copy-Item -Recurse -Force website-health-inspector C:\Users\Administrator\.codex\skills\website-health-inspector
安装后在 Codex 中可以通过 $server-health-monitor 或 $website-health-inspector 显式调用,也可以让 Codex 根据任务描述自动触发。
服务器巡检 skill:
python -m pytest server-health-monitor/tests/test_server_health_monitor.py -q
python server-health-monitor/scripts/check_text_integrity.py
网站巡检 skill:
python -m pytest website-health-inspector/tests -q
python website-health-inspector/scripts/check_runtime_dependencies.py --pdf
.env、.doops/、reports/、runs/、output/、浏览器截图、交付物目录、缓存目录或真实凭证。SKILL.md 为准。