← Back to Skills Marketplace
🔌

度小满天气商户

by 度小满 · GitHub ↗ · v1.0.10 · MIT-0
cross-platform ✓ Security Clean
249
Downloads
0
Stars
0
Active Installs
12
Versions
Install in OpenClaw
/install dxm-sp-weather
Description
用户询问天气(今天天气怎么样、天气怎么样、某城市/某日期天气)、或查询天气服务订单/额度/调用明细时触发
README (SKILL.md)

⚠️ 安装前须知

  1. 服务后端:所有 API 调用(天气查询、用户注册、短链生成)均通过 https://www.dxmpay.com。如果您不信任该域名,请勿安装。
  2. 域名范围说明:本 Skill 的所有网络请求均限定在 www.dxmpay.com 域名下,包括天气查询、支付、短链生成接口。短链服务仅对 https://www.dxmpay.com/ 开头的 URL 生成短链,其他域名的 URL 会被拒绝,不存在将任意外部链接发送至短链服务的风险。
  3. 密钥对存储:本 Skill 会在首次运行时生成 EC 密钥对,加密后保存至 ${CLAUDE_SKILL_DIR}/sp-weather-config.json。密码通过对话获取,不写入任何文件。
  4. 二维码文件写入:生成的 PNG 文件默认写入当前工作目录,请注意文件残留,必要时手动清理。

天气服务 Skill (sp-service-weather)

本 Skill 通过天气服务 (https://www.dxmpay.com) 查询天气,并支持用户认证初始化、订单查询、额度查询等功能。

脚本路径: scripts/sp-weather-cli.js(相对于 skill 目录) 运行方式: node scripts/sp-weather-cli.js \x3Ccommand> [options]


触发条件

以下任意情况触发本 Skill:

  • 用户询问天气:「今天天气怎么样」「北京天气」「明天上海天气」「天气怎么样」
  • 用户查询订单:「查询天气服务订单」「查充值记录」
  • 用户查询额度:「查询天气服务余额」「还有多少额度」
  • 用户查询调用明细:「查看API调用记录」「查用量」

工作流程

第一步:确保私钥密码已就绪

每次执行前必须先通过对话询问用户密码

"执行天气查询需要您的私钥保护密码,请告知(密码不会被记录到任何文件):"

获取到密码后,后续所有 node scripts/sp-weather-cli.js 调用均需在命令前拼接环境变量:

export SP_WEATHER_PASSWORD=\x3C用户输入的密码> && node scripts/sp-weather-cli.js \x3Ccommand>

注意:密码仅在命令行内联使用,不写入任何文件,不输出到日志。

第二步:确保用户配置存在

每次执行前必须先运行

node scripts/sp-weather-cli.js userConfig
  • 返回 "action": "exists" → 配置已存在,直接进入第三步
  • 返回 "action": "created" → 已自动生成 EC/secp256r1 密钥并保存到 ${SKILL_DIR}/sp-weather-config.json,继续第三步
  • 返回失败 → 告知用户错误信息,禁止把其他json配置文件拷贝过来重命名使用

第三步:根据用户意图执行对应命令


命令说明

1. 天气查询 queryWeather

触发:用户询问任何天气相关问题

参数提取

  • 从用户输入中提取日期,若无日期则使用当天日期(通过 new Date().toISOString().split('T')[0] 获取)
  • 从用户输入中提取城市名;若用户未提供城市,必须主动询问用户直到获得城市名,不可使用默认值

执行

node scripts/sp-weather-cli.js queryWeather --city \x3C城市> --date \x3C日期>

示例:

node scripts/sp-weather-cli.js queryWeather --city 北京 --date 2026-03-20
node scripts/sp-weather-cli.js queryWeather --city 上海

处理结果

  • success: true → 将 data 中的天气信息整理后展示给用户
  • 当返回 error: "FORBIDDEN"detail 包含"未购买"时
    1. 在本 Skill 内执行:
      node scripts/sp-weather-cli.js queryPurchaseDetail
      
    2. 从返回的 data 中提取字段,构造结构化 JSON:
      {
        "productName":  "\x3Cdata.productName>",
        "productDesc":  "\x3Cdata.productDesc>",
        "price":        "\x3Cdata.price>",
        "payUrl":       "\x3Cdata.payUrl(必须为 https://www.dxmpay.com/ 开头)>",
        "pay_channels": "\x3Cdata.pay_channels>",
      }
      
    3. 调用 dxm-claw-pay Skill,传入上述 JSON → 后续二维码生成(含 --short-url 短链)、话术引导均由 dxm-claw-pay 完成
  • needCity: true → 询问用户城市名后重新执行

2. 查询充值订单列表 queryOrders

触发:用户查询充值记录、订单列表

node scripts/sp-weather-cli.js queryOrders
# 分页(可选)
node scripts/sp-weather-cli.js queryOrders --page 1 --page-size 20

接口GET /api/skill/orders?uid=\x3CuserId>&page=1&page_size=20


3. 查询指定订单 queryOrder

触发:用户提供了具体订单号

node scripts/sp-weather-cli.js queryOrder --orderId SP202603192029449B6A4893

接口GET /api/skill/orders/\x3CorderId>?uid=\x3CuserId>


4. 查询天气服务额度 queryQuota

触发:用户询问余额、额度、还能用多少次

node scripts/sp-weather-cli.js queryQuota

接口GET /api/skill/quota?uid=\x3CuserId>&skill_id=skill_001


5. 查询 API 调用明细 queryCallLogs

触发:用户查询调用记录、用量明细

node scripts/sp-weather-cli.js queryCallLogs
# 分页(可选)
node scripts/sp-weather-cli.js queryCallLogs --page 1 --page-size 20

接口GET /api/skill/call-logs?uid=\x3CuserId>&skill_id=skill_001&page=1&page_size=20

6. 查询商品信息 queryPurchaseDetail

触发:余额不足时自动调用;或用户询问充值套餐、商品价格

node scripts/sp-weather-cli.js queryPurchaseDetail

接口GET /api/skill/purchase/detail?uid=\x3CuserId>&skill_id=skill_001

处理结果:从返回的 data 中提取商品字段,构造结构化 JSON,调用 dxm-claw-pay Skill 完成二维码生成(dxm-claw-pay 内部使用 --short-url 生成短链)



配置文件说明

脚本自动将用户配置保存在 ${CLAUDE_SKILL_DIR}/sp-weather-config.json,内容包括:

{
  "userId": "userid",
  "publicKey": "-----BEGIN PUBLIC KEY-----\
...",
  "privateKey": "加密格式..."
}

密钥算法:EC / secp256r1(prime256v1),签名算法:SHA256withECDSA。


环境变量

变量 说明 默认值
SP_WEATHER_BASE 天气服务 base URL https://www.dxmpay.com(天气查询与支付均通过此域名)
SP_WEATHER_PASSWORD 私钥保护密码,未设置时 Skill 会通过对话向用户询问

故障排查

现象 处理
连接天气服务失败 确认服务 https://www.dxmpay.com 是否可达
余额不足 / payRequired: true 扫码充值后重试
二维码不显示 手动打开 payUrl 完成支付;可安装 brew install qrencode 改善体验
用户配置不存在 先执行 userConfig 命令初始化
未知命令 检查命令名拼写,可用命令:userConfig / queryWeather / queryOrders / queryOrder / queryQuota / queryPurchaseDetail / queryCallLogs

版本历史

  • v1.0.0:初始版本,支持用户认证、天气查询、订单/额度/调用明细查询、二维码支付引导
Usage Guidance
This skill appears internally consistent with a weather+payment integration that only talks to https://www.dxmpay.com. Before installing: 1) only install if you trust www.dxmpay.com (all network I/O targets that domain); 2) be prepared to enter a private-key password in chat (or set SP_WEATHER_PASSWORD) — the skill stores an encrypted private key under the skill directory; 3) it writes PNG QR files to the current working directory (clean them up if needed); 4) note the code sets a compatibility TLS option (SSL_OP_LEGACY_SERVER_CONNECT) to connect to older servers — this weakens TLS in some environments; 5) the skill will call another skill (dxm-claw-pay) for payment flows — review that skill separately. If any of those behaviors are unacceptable, do not install. If you want higher assurance, ask the author for: (a) the canonical HTTPS host(s) and proof of ownership, (b) an explanation for the TLS legacy option, and (c) a module export contract (the CLI references local QR code modules which appear bundled but have minor API inconsistencies).
Capability Analysis
Type: OpenClaw Skill Name: dxm-sp-weather Version: 1.0.10 The skill bundle implements a weather service client for the domain 'www.dxmpay.com'. It features a robust security model for local data, using PBKDF2 and AES-256-GCM to encrypt the user's private key with a password provided at runtime. All network communications are directed to the declared backend, and the scripts (sp-weather-cli.js and qrcode.js) perform standard API interactions, including request signing and QR code generation. While there is a minor code inconsistency (a call to an undefined function 'showQRCode' in sp-weather-cli.js), there is no evidence of malicious intent, data exfiltration, or unauthorized execution.
Capability Tags
cryptorequires-walletcan-make-purchasesrequires-sensitive-credentials
Capability Assessment
Purpose & Capability
Name/description (weather + merchant flows) align with the code and SKILL.md: network calls, payment/short-link usage, order/quota/call-log endpoints and QR code generation are all directed to www.dxmpay.com as described.
Instruction Scope
Runtime instructions require asking the user for a password (or using SP_WEATHER_PASSWORD), running userConfig and CLI commands; the skill reads/writes only the declared config path and writes PNG files to the current working directory. This is within scope but requires the agent to prompt for sensitive input and will leave files on disk unless cleaned up.
Install Mechanism
No install spec (instruction-only) but code files are bundled. No external downloads or installers are used; included qrcode library is local. No high-risk remote install activity detected.
Credentials
The only environment variables used are CLAUDE_SKILL_DIR (injected), SP_WEATHER_BASE (optional base URL), and SP_WEATHER_PASSWORD (optional password override) — all justified by the skill's behavior. The skill generates and stores an encrypted private key (config file) which is proportionate to signing API requests.
Persistence & Privilege
The skill writes an encrypted config file (${CLAUDE_SKILL_DIR}/sp-weather-config.json) and generates PNG files in the working directory. It does not request always:true or system-wide privileges. Users should be aware of file residuals and that the agent can execute bundled node scripts.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install dxm-sp-weather
  3. After installation, invoke the skill by name or use /dxm-sp-weather
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.12
sp-service-weather v1.0.12 - 补充说明二维码文件生成后请注意残留,必要时需手动清理 - 明确密钥算法为 EC/secp256r1(prime256v1) - 在故障排查部分增加安装 `qrencode` 的建议以改善二维码体验 - 移除了二维码“展示完成后提示清理”的强制说明,改为告知用户注意文件残留
v1.0.11
v1.0.11 - 明确要求二维码生成后需手动清理残留文件 qrcode.png,并在相关说明、命令与故障排查中补充清理指引 - 新增“脚本注意事项与清理”章节,强调 Skill 仅调用指定脚本,并说明所有产生的本地持久/临时文件及对应清理方法 - 对密钥算法说明做小幅修正(prime256v1) - 规范二维码相关操作流程和话术,提升使用及卸载时的安全提示和可操作性
v1.0.10
sp-service-weather v1.0.10 - 新增环境变量说明:增加 CLAUDE_SKILL_DIR 用于指定配置文件存放目录。 - 优化 metadata 环节说明,注明 CLAUDE_SKILL_DIR 由 Agent 自动注入。 - 明确配置文件保存路径为 `${CLAUDE_SKILL_DIR}/sp-weather-config.json`。 - 说明 SP_WEATHER_BASE 和 SP_WEATHER_PASSWORD 环境变量均为可选项。 - 其余功能和使用方式保持不变。
v1.0.9
- 增加了“域名范围说明”,明确所有网络请求仅限于 www.dxmpay.com 域名,包括短链生成服务,提升了用户对数据流向的可控性与安全性说明 - 删除了关于 qrcode 相关模块实现的细节描述,说明更简洁 - 其他说明性内容微调,文档行文更加精炼
v1.0.8
No functional changes detected in this version. - Documentation updated; several warnings and a note about TLS downgrade have been removed from the SKILL.md file - No code or feature changes
v1.0.7
sp-service-weather v1.0.7 - 文档完善,调整了关于 qrcode 依赖、环境隔离和 TLS 降级行为的说明 - 明确指出 qrcode 模块为独立实现,不再依赖 dxm-claw-pay 的 qrcode.js - 增加二维码文件写入和安全注意事项的文档说明 - 优化 metadata 字段格式,更清晰标注环境变量说明 - 其他风险和使用指引文档细节补充
v1.0.6
**Added clearer service domain and security notes for users.** - 明确声明所有天气数据与支付流量均通过 https://www.dxmpay.com 域名进行,对用户数据授权与后端信任提出提示。 - 新增「安装前须知」说明密钥生成与存储方式、依赖模块、二维码兼容性与安全建议。 - 在环境变量与故障排查表格中,将 SP_WEATHER_BASE 默认值指定为 https://www.dxmpay.com,并优化描述更准确。 - 不涉及功能变更,仅文档补充与风险提示增强。
v1.0.5
**This update enhances security and payment handling for the weather service skill.** - Requires users to input a private key protection password before any operation; the password is only used in-memory and never written to files. - All command executions now use the SP_WEATHER_PASSWORD environment variable set from user input. - Payment QR code generation and user guidance are delegated to the dxm-claw-pay skill; product info is passed in structured JSON for this process. - Private key in the configuration file is stored in encrypted format. - Added documentation and environment variable details for the new password flow.
v1.0.4
- Removed the file scripts/sp-weather-config.json from the skill. - No changes to usage, commands, or documentation.
v1.0.3
- 新增配置文件 scripts/sp-weather-config.json,用于用户配置存储和管理。 - 其他功能和说明未变,保持与前一版本一致。
v1.0.2
- Added QR code generation scripts (`scripts/qrcode.js`, `scripts/qrcode.min.js`) to the project. - Enables in-app generation and display of recharge/payment QR codes for improved user experience.
v1.0.1
sp-service-weather v1.0.1 - Updated skill name and improved documentation for end-user clarity. - Clarified user prompt and parameter extraction logic for weather queries: always require city, ask user if not provided. - Expanded command and error handling instructions, including detailed workflows for all query types. - Enhanced troubleshooting section for easier support. - Added explicit instructions for configuration and initialization steps.
Metadata
Slug dxm-sp-weather
Version 1.0.10
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 12
Frequently Asked Questions

What is 度小满天气商户?

用户询问天气(今天天气怎么样、天气怎么样、某城市/某日期天气)、或查询天气服务订单/额度/调用明细时触发. It is an AI Agent Skill for Claude Code / OpenClaw, with 249 downloads so far.

How do I install 度小满天气商户?

Run "/install dxm-sp-weather" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 度小满天气商户 free?

Yes, 度小满天气商户 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 度小满天气商户 support?

度小满天气商户 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 度小满天气商户?

It is built and maintained by 度小满 (@duxiaoman); the current version is v1.0.10.

💬 Comments