← 返回 Skills 市场
xiehuapeng

BOC Forex Monitor

作者 xiehuapeng · GitHub ↗ · v1.1.1 · MIT-0
cross-platform ✓ 安全检测通过
120
总下载
1
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install boc-forex-monitor
功能描述
Configurable Bank of China forex monitor with per-currency thresholds, price columns, and optional OpenClaw notifications. Use when you want to set up, confi...
使用说明 (SKILL.md)

BOC Forex Monitor

Set up a configurable Bank of China foreign-exchange monitor with per-currency thresholds and price columns.

What this skill provides

  • Fetch BOC forex data from https://www.boc.cn/sourcedb/whpj/
  • Track any configured currency using any price column (现汇买入价/现钞买入价/现汇卖出价/现钞卖出价/中行折算价)
  • Compare current values against a rolling baseline
  • Skip monitoring during quiet hours (default 23:00-09:00 Asia/Shanghai)
  • Trigger on per-currency configurable thresholds:
    • Rise, drop, or both directions
    • Configurable threshold values (default 0.5)
  • Deduplicate notifications using local state files
  • Support optional OpenClaw message delivery (for example Feishu)

Files in this skill

  • scripts/boc_forex_check.py: fetch + parse + compare + trigger generation
  • scripts/boc_forex_cron_runner.py: stable cron entrypoint; runs the checker, formats output, deduplicates, and optionally sends a notification
  • references/configuration.md: configuration knobs and install patterns

Setup workflow

  1. Read references/configuration.md.
  2. Create .openclaw-state/boc-forex-monitor-config.json in your workspace with your desired monitoring targets.
  3. Copy both scripts into \x3Cworkspace>/scripts/.
  4. Make both scripts executable.
  5. Create or update a cron job with the OpenClaw cron tool.
  6. Prefer a short agentTurn payload that only executes the runner script and returns stdout verbatim.
  7. Verify with a manual script run before claiming success.

Cron payload pattern

Use an isolated agentTurn job. Keep the prompt minimal.

Recommended payload message:

Workdir is \x3Cworkspace>. Execute:
python3 scripts/boc_forex_cron_runner.py [--notify-channel \x3Cchannel>] [--notify-target \x3Ctarget>] [--notify-account-id \x3Cid>]

Requirements:
1) Reply with stdout only.
2) Do not add explanation.
3) If stdout is empty, reply: ❌ 汇率检查执行失败

Recommended schedule

Use this cron schedule for every 5 minutes during local daytime trading-watch hours:

{ "kind": "cron", "expr": "*/5 9-22 * * *", "tz": "Asia/Shanghai" }

Validation

Before finishing:

  1. Run python3 scripts/boc_forex_cron_runner.py from the target workspace.
  2. Confirm it returns one of:
    • ✅ 汇率检查完成
    • ⏭️ 汇率检查跳过
    • 🔔 已触发阈值并发送...
  3. If notifications are enabled, verify dedupe state is written to .openclaw-state/boc-forex-alert-notify-state.json.

Safety

  • Never publish private recipient ids inside the skill bundle.
  • Keep notification destinations as runtime parameters or environment variables.
  • Do not send routine success messages to chat channels unless the user explicitly wants them.
安全使用建议
This looks reasonable for a scheduled forex alert tool. Before installing, review the cron schedule, run it manually once, confirm the notification target/account, and keep the `.openclaw-state` directory private.
功能分析
Type: OpenClaw Skill Name: boc-forex-monitor Version: 1.1.1 The skill is a functional Bank of China (BOC) foreign exchange monitor designed to track currency fluctuations and send alerts. It fetches data from the official BOC website (boc.cn), parses it using regular expressions, and manages state locally in a `.openclaw-state` directory. The implementation uses standard Python libraries (urllib, subprocess) and follows OpenClaw patterns for notifications and cron execution. There are no signs of data exfiltration, malicious execution, or prompt injection; the subprocess calls are handled safely using argument lists to prevent shell injection.
能力评估
Purpose & Capability
The visible artifacts are coherent with the stated purpose: they fetch BOC forex data, compare configured thresholds, keep local baseline/dedupe state, and optionally send alerts.
Instruction Scope
The instructions ask the user to create a scoped cron agentTurn that runs one local Python runner and returns stdout only. This is purpose-aligned, but users should confirm the schedule and command before enabling it.
Install Mechanism
There is no package install spec; setup is manual copying/chmod of bundled scripts. One provided source listing for boc_forex_check.py is truncated in the supplied review view, so confidence is limited to the visible source plus clean static scan.
Credentials
The skill reads/writes only under the workspace .openclaw-state directory, fetches the declared BOC URL, and uses optional OpenClaw messaging settings. This is proportionate for a forex monitor.
Persistence & Privilege
The skill is designed to be scheduled as a recurring cron job and may use an existing OpenClaw messaging account to send alerts. This is disclosed and central to the monitor, but it is persistent behavior.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install boc-forex-monitor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /boc-forex-monitor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.1
v1.1.1 hotfix: remove hardcoded workspace paths and hardcoded Feishu target. Use current workspace plus runtime/env notification parameters for portable installs.
v1.1.0
v1.1.0: Add config-driven monitoring with per-currency thresholds, price columns, and direction options. GBP disabled by default. Add boc-forex-monitor-config.json support.
v1.0.0
Initial public release: Bank of China forex monitor with quiet hours, baseline comparison, deduplicated alerts, and optional OpenClaw messaging delivery.
元数据
Slug boc-forex-monitor
版本 1.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

BOC Forex Monitor 是什么?

Configurable Bank of China forex monitor with per-currency thresholds, price columns, and optional OpenClaw notifications. Use when you want to set up, confi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 120 次。

如何安装 BOC Forex Monitor?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install boc-forex-monitor」即可一键安装,无需额外配置。

BOC Forex Monitor 是免费的吗?

是的,BOC Forex Monitor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

BOC Forex Monitor 支持哪些平台?

BOC Forex Monitor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 BOC Forex Monitor?

由 xiehuapeng(@xiehuapeng)开发并维护,当前版本 v1.1.1。

💬 留言讨论