油价预警:利用 Openclaw Skills 自动节省燃油费用

作者:互联网

2026-03-26

AI教程

什么是 油价预警?

油价预警是一款专门的自动化工具,旨在帮助用户识别其所在位置指定半径范围内最实惠的燃油选项。通过利用 Openclaw Skills,该工具扫描 OpenStreetMap 和特定品牌数据库,提供当地油价的全面概览。它对于想要追踪 Costco 和其他折扣加油站的用户特别有效,确保他们不再为燃油支付过高费用。

该技能将地理数据与价格模式相结合,提供可操作的情报。无论您是计划长途旅行还是仅仅管理每周的通勤,通过 Openclaw Skills 将此功能集成到您的工作流程中,都可以实现无缝、数据驱动的燃油购买决策。

下载入口:https://github.com/openclaw/skills/tree/main/skills/gustavoziaugra/gas-price-alert

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install gas-price-alert

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 gas-price-alert。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

油价预警 应用场景

  • 在特定的邮政编码或坐标半径内寻找最便宜的加油站。
  • 坚控通常远低于市场平均水平的 Costco 油价。
  • 接收自动化的每日早晨通知,以便在通勤前规划加油站。
  • 追踪 87、89、91 号汽油和柴油的供应情况及估算价格。
  • 在旅行期间自动比较不同社区或城市的油价。
油价预警 工作原理
  1. 该技能利用 Overpass API 查询 OpenStreetMap,获取用户定义半径内的所有加油站。
  2. 它将结果与已知的 Costco 位置数据库进行交叉引用,以优先考虑高折扣站。
  3. 系统使用 geopy 库计算从用户位置出发的准确测地线距离。
  4. 它根据市场趋势和特定品牌的折扣模式生成价格估算。
  5. 最终数据被格式化为易于阅读的摘要或 JSON 负载,以便通过 Openclaw Skills 进行进一步自动化。

油价预警 配置指南

要开始使用此技能,请确保您已安装 Python 并按照以下步骤操作:

  1. 安装必要的 Python 依赖项:
pip install requests geopy
  1. (可选)如果使用高级脚本进行基于 Playwright 的实时抓取:
pip install playwright
playwright install
  1. 运行手动搜索以验证您的位置和半径设置:
python3 scripts/gas_alternative.py --zip 43215 --radius 20 --fuel 87 --summary

油价预警 数据架构与分类体系

该技能为找到的每个加油站输出一个结构化的 JSON 对象,使其易于与其他 Openclaw Skills 集成。

描述
name 加油站的显示名称(例如,Costco Gas)
brand 用于过滤的燃油品牌标识符
distance 从起点计算的测地线距离(英里)
price 每加仑的估计或抓取价格
is_costco 标识高价值 Costco 地点的布尔标志
scraped_at 数据检索的时间戳,用于新鲜度追踪
name: gas-price-alert
description: Find and monitor gas prices with daily notifications. Use when searching for the cheapest gas in a specific area, tracking Costco and other discount fuel stations, or setting up daily gas price alerts. Supports any US location with configurable radius and fuel type.

Gas Price Alert

Overview

Automatically search for the cheapest gas prices in your area, with a focus on Costco and other discount stations. Get daily notifications with the best options within a specified radius.

Quick Start

  1. Configure location - Set your city/coordinates and search radius
  2. Run search - Find gas stations and estimated prices
  3. Schedule daily alerts - Get morning notifications with cheapest options
  4. Focus on Costco - Costco typically has gas $0.15-0.25 below market average

Workflow

Step 1: Configure Your Location

Option A: Use ZIP code (recommended)

# Search by ZIP code
python3 scripts/gas_alternative.py --zip 43215 --radius 20 --fuel 87 --summary

Option B: Use coordinates

Default locations are pre-configured for Columbus, Ohio:

# Columbus, OH (downtown)
lat: 39.9612
lon: -82.9988
radius: 20 miles

To use a different location:

python3 scripts/gas_alternative.py --lat  --lon  --radius 

Common US cities:

  • Columbus, OH: 39.9612, -82.9988
  • Chicago, IL: 41.8781, -87.6298
  • New York, NY: 40.7128, -74.0060
  • Los Angeles, CA: 34.0522, -118.2437
  • Miami, FL: 25.7617, -80.1918

Step 2: Search for Gas Stations

# Search with summary output
python3 scripts/gas_alternative.py --lat 39.9612 --lon -82.9988 --radius 20 --fuel 87 --summary

# Save to file
python3 scripts/gas_alternative.py --lat 39.9612 --lon -82.9988 --radius 20 --fuel 87 --output gas_prices.json

Parameters:

  • --zip: ZIP code (overrides lat/lon, e.g., --zip 43215)
  • --lat: Latitude (default: 39.9612 - Columbus, OH)
  • --lon: Longitude (default: -82.9988 - Columbus, OH)
  • --radius: Search radius in miles (default: 20)
  • --fuel: Fuel type - 87, 89, 91, diesel (default: 87)
  • --base-price: Base price for estimation (default: 2.89)
  • --output: Output file (default: gas_prices.json)
  • --summary: Print human-readable summary to stdout

Step 3: Set Up Daily Alerts

Use OpenClaw cron to receive daily morning notifications:

{
  "name": "Gas price alert",
  "schedule": {
    "kind": "cron",
    "expr": "0 8 * * *",
    "tz": "America/New_York"
  },
  "payload": {
    "kind": "agentTurn",
    "message": "Get me gas prices for Columbus, OH this morning. Focus on Costco and show the cheapest 87 octane within 20 miles of downtown."
  },
  "sessionTarget": "main"
}

This runs every day at 8 AM Eastern Time.

Step 4: Receive Notifications

The agent will:

  1. Search for gas stations in your area
  2. Identify Costco and discount stations
  3. Generate a summary with the cheapest options
  4. Send the summary via T@elegrimm

Example notification:

? Gas Prices (87 Octane) - Columbus, OH

?? Costco (Typically Cheapest)
? Costco Gas
  ?? $2.69 (est.)
  ?? 5000 Morse Rd, Columbus, OH 43213 (7.9 miles from downtown)

?? Tip: Costco typically has gas $0.15-0.25 below market average.

Output Format

Each station includes:

{
  "source": "osm",
  "name": "Costco Gas",
  "brand": "Costco",
  "address": "5000 Morse Rd, Columbus, OH 43213",
  "lat": 39.9667,
  "lon": -82.8500,
  "distance": 7.9,
  "fuel_type": "87",
  "price": 2.69,
  "price_text": "$2.69 (est.)",
  "is_costco": true,
  "scraped_at": "2026-02-10T21:00:00.000Z"
}

How It Works

  1. OpenStreetMap/Overpass API - Finds all gas stations in the area
  2. Costco database - Known Costco locations are matched and prioritized
  3. Price estimation - Costco prices estimated $0.15-0.25 below market average
  4. Distance calculation - Uses geodesic distance for accurate mileage
  5. Smart filtering - Removes duplicates and sorts by relevance

Limitations

  • Real-time prices: Currently uses estimated prices for Costco. For exact prices, check GasBuddy.com or station apps.
  • Coverage: Relies on OpenStreetMap data completeness
  • Estimation accuracy: Costco prices estimated based on typical discount patterns

For Real-Time Prices

To get actual real-time prices:

  1. GasBuddy.com - Check manually or use their commercial API
  2. Station apps - Costco, Kroger, Shell, etc., have apps with current prices
  3. AAA - Provides average prices by region
  4. Waze - Community-sourced price updates

Troubleshooting

No stations found

  • Increase the --radius parameter
  • Verify coordinates are correct
  • Check if the area has good OpenStreetMap coverage

Incorrect prices

  • Prices for non-Costco stations are estimated as "N/A"
  • Costco prices are estimates based on typical discount patterns
  • For exact prices, use GasBuddy or the station's app

Geopy not installed

pip install geopy

Resources

scripts/gas_alternative.py

Main script for searching gas stations using OpenStreetMap and Overpass API.

Features:

  • Finds all gas stations within radius
  • Identifies Costco locations
  • Estimates Costco prices
  • Calculates distances
  • Generates human-readable summaries

scripts/gasbuddy_search.py

Alternative script for GasBuddy integration (requires Playwright or API key).

Use when:

  • You have a GasBuddy API key
  • You need real-time prices
  • You're willing to use Playwright for JavaScript rendering

references/locations.md

Coordinates and configurations for common US cities.

Dependencies

Install required packages:

pip install requests geopy

For Playwright-based GasBuddy scraping (optional):

pip install playwright
playwright install