← Back to Skills Marketplace
xiehuapeng

BOC Forex Monitor

by xiehuapeng · GitHub ↗ · v1.1.1 · MIT-0
cross-platform ✓ Security Clean
120
Downloads
1
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install boc-forex-monitor
Description
Configurable Bank of China forex monitor with per-currency thresholds, price columns, and optional OpenClaw notifications. Use when you want to set up, confi...
README (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.
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install boc-forex-monitor
  3. After installation, invoke the skill by name or use /boc-forex-monitor
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug boc-forex-monitor
Version 1.1.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 120 downloads so far.

How do I install BOC Forex Monitor?

Run "/install boc-forex-monitor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is BOC Forex Monitor free?

Yes, BOC Forex Monitor is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does BOC Forex Monitor support?

BOC Forex Monitor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created BOC Forex Monitor?

It is built and maintained by xiehuapeng (@xiehuapeng); the current version is v1.1.1.

💬 Comments