油价智能提醒

v1.0.0

油价智能提醒技能。自动监控国家发改委油价公告,判断近期油价涨跌趋势,在调价窗口前提早提醒用户加油。(1)未来油价将上调 → 提醒近日安排加油;(2)未来油价将下调 → 提醒等调价后再去加油。支持自定义检查频率、城市配置、状态防重复提醒。触发条件:用户提到"油价提醒"、"什么时候加油"、"油价涨了吗"、"设置油价监...

0· 131·0 current·0 all-time
byCatPluZ@catplus-eric

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for catplus-eric/oil-price-reminder-china.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "油价智能提醒" (catplus-eric/oil-price-reminder-china) from ClawHub.
Skill page: https://clawhub.ai/catplus-eric/oil-price-reminder-china
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 oil-price-reminder-china

ClawHub CLI

Package manager switcher

npx clawhub@latest install oil-price-reminder-china
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the implementation: the script fetches ndrc.gov.cn, looks for '油价' announcements, derives 'up'/'down'/unknown and writes a local state file. Declared dependencies (Python, curl, cron, messaging) align with the described behavior and are proportionate to the stated purpose.
Instruction Scope
SKILL.md instructs the agent to create a cron job and a memory file and to push messages via a 'message tool'. The included script itself only fetches pages, computes a next-adjust date, writes /workspace/memory/oil_state.json and prints a message — it does not create cron jobs or call a messaging API. This is an implementation/coordination difference (orchestration vs script) rather than hidden behavior. Also note a functional inconsistency: the script uses a hard-coded base date (datetime(2026, 3, 23)) to compute the next adjustment window rather than deriving the last adjustment date from site content or stored state as the prose implies; this is a correctness/robustness issue but not an evidence of malicious intent.
Install Mechanism
No install spec (instruction-only with an included script) — low risk. The script calls the system curl via subprocess.run (no shell execution), does not download or execute arbitrary remote code, and writes only a local JSON state file. No remote install URLs or archive extraction are present.
Credentials
The skill requests no environment variables, no credentials, and no config paths beyond writing a state file under /workspace/memory — all proportional to a scheduling/monitoring reminder skill. External network access is limited to the official ndrc.gov.cn site (expected for this purpose).
Persistence & Privilege
The skill writes a persistent local state file in /workspace/memory/oil_state.json and SKILL.md expects the agent to create a cron job to schedule runs. Those are reasonable for a periodic reminder skill, but users should confirm that the agent's cron creation will be scoped to the agent's workspace and not modify unrelated system cron entries. always:false and no elevated privileges are requested.
Assessment
This skill appears coherent and performs only the expected actions (fetch the NDRC site, compute a trend, write a local JSON, and output a reminder). Before installing: (1) confirm you are comfortable with the agent creating a cron job and writing a state file at /workspace/memory/oil_state.json; (2) verify how the platform's 'message tool' will deliver reminders (the script itself only prints the message — the platform must handle pushing it to you); (3) be aware the script uses a hard-coded base date to estimate the next adjustment window (a correctness/robustness issue you may want fixed); and (4) avoid overly frequent checks to respect the source site (SKILL.md already recommends ≤1/day). If you want stronger guarantees, ask the author to (a) derive the last adjustment date from the site or stored state instead of a hard-coded date, and (b) have the script call the messaging API explicitly (or document exactly how the platform will route printed messages to you).

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

latestvk97f7fry2df9r70bnmcpvpb0f583pq1x
131downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

油价智能提醒技能

自动抓取发改委油价公告,判断涨跌,在最佳时机提醒加油


核心功能

  • 🌿 油价趋势分析:抓取发改委(ndrc.gov.cn)最新公告,判断涨跌
  • 智能时机提醒:油价涨前提醒加油,跌前提醒等一等再加油
  • 🔁 自定义频率:支持每 N 天/每天/每周检查(默认每3天)
  • 🗓️ 调价窗口追踪:自动估算下次调价日期(每10个工作日规律)
  • 📁 状态防重复:基于本地文件记录,防止同一天重复提醒

文件结构

oil-price-reminder/
├── SKILL.md                          ← 本文件
└── scripts/
    ├── oil_monitor.py                 ← 核心监控脚本(核心逻辑)
    └── oil_state.json                 ← 状态持久化(由脚本自动创建)

使用方式

用户配置

用户告诉 Nova 需要启用油价提醒后,Nova 会自动:

  1. 创建 memory/oil_state.json 状态文件
  2. 创建 cron job,每 3 天触发一次
  3. 记录下次调价窗口时间

cron 表达式参考

频率表达式(UTC)北京时间
每天 8:000 0 * * *8:00
每3天 8:000 8 */3 * *16:00
每周一 8:000 8 * * 116:00(周一)

提醒消息模板

涨前提醒:

🌿 【油价提醒】
预计 X 天后(YYYY-MM-DD 零点)油价将上调,建议近日安排加满油箱!

跌前提醒:

🌿 【油价提醒】
预计 X 天后(YYYY-MM-DD 零点)油价将下调,建议调价后再去加油,可节省费用!

趋势不明时:

🌿 【油价提醒】
下一轮油价调整窗口约在 YYYY-MM-DD(约X天后),届时油价可能有变动,如需加油请留意。

oil_monitor.py 核心逻辑

# 主要流程
1. curl https://www.ndrc.gov.cn/xwdt/xwfb/  获取最新公告
2. 正则匹配含"油价"链接,获取公告正文
3. 判断正文关键词:上调/上涨 → trend=up;下调/下降 → trend=down
4. 估算下次调价窗口(上次调价+10个工作日)
5. 判断距调价天数:
   - 1~10天内 + trend=up  → 发涨前提醒
   - 1~10天内 + trend=down → 发跌前提醒
   - 1~10天内 + trend=不明 → 发趋势不明提醒
   - >10天 → NO_REMINDER
6. 写入 oil_state.json 状态文件

状态文件格式

{
  "last_remind_date": "2026-03-27",
  "next_adjust_date": "2026-04-06",
  "trend": "up",
  "days_left": 9,
  "last_check": "2026-03-27"
}

依赖

  • Python 3
  • curl(系统自带)
  • cron(Gateway 内置)
  • message tool(推送至用户渠道)

注意事项

  • 数据来源为国家发改委官网,无需 API Key
  • 调价窗口为估算值,实际以发改委公告为准
  • 状态文件自动创建在 /workspace/memory/oil_state.json
  • 建议检查频率不要高于每天 1 次,避免对发改委服务器造成压力

Comments

Loading comments...