Install
openclaw skills install @jeromeex/gold-trackerA zero-dependency gold price tracking skill for AI agents. Fetches live gold prices and USD/CNY rates, validates data, detects price breakouts with dynamic volatility-based thresholds (0.5%-3%), archives logs daily with auto-cleanup, and generates briefings.
openclaw skills install @jeromeex/gold-tracker零第三方依赖的黄金价格追踪与分析技能。本文档是唯一操作真相源;违反「铁律」或「输出格式」的分析会被 analyze_check.py 以非零退出码拒绝。
no_data,绝不编造、不补全。cp config.example.yaml config.yaml
python3 scripts/verify.py init && python3 scripts/verify.py check # 出现 [✗] 先修复
sh examples/run_cycle.sh # 抓取 → 检测提醒 → 通知,建议每 30 分钟一次
examples/crontab.example、gold-tracker.service/.timer。python3 scripts/fetch.py — 抓金价/汇率(自动校验/缓存/降级)sh examples/analyze_prep.sh — 采集可信新闻 + 生成分析骨架(脚本接管,省 token)cache/news_snippets.json,在 logs/YYYY-MM-DD.yaml 骨架里填 key_factors(reasoning/impact/sources)python3 scripts/analyze_check.py — 硬校验,必须 exit 0sh examples/analyze_finish.sh — 校验 + 简报 + 通知骨架由 analyze_scaffold.py 自动生成。硬约束(违反则 analyze_check.py 拒绝):
run_id / timestamp / price_data / summary.focus / key_factors / sources 齐全。key_factors 2–6 条,每条含 factor / impact / reasoning / sources,impact ∈ {利多, 利空, 偏多, 偏空, 中性, 多空交织}。sources ≥2 条且覆盖 ≥2 独立网站,每条都必须是真实抓取过的(web_fetch 后 python3 scripts/log_fetch.py <url> "<标题>")。reasoning/summary.focus 不含禁词(见 config output.constraints.forbidden_phrases);无数据写 no_data。python3 scripts/alert_manager.py detect|list|pending|status|auto_resolve|cleanup|threshold
python3 scripts/notify.py send alerts|summary|retry|status|test [--dry-run]
python3 scripts/archive.py archive|find|history|cleanup|rebuild|summary|normalize
| 症状 | 处理 |
|---|---|
| fetch 失败 | 自动降级缓存/上次状态 |
| check 报 source 未在 fetch_log | log_fetch.py 补记,或从 sources 删除 |
| check 报网站不足/禁用措辞 | 补抓不同网站 / 改写为因果链 |
| verify 报「提醒检测未运行」 | 按 examples/ 配置定时调度 |
| 归档/状态损坏 | archive.py rebuild / verify.py init |