← 返回 Skills 市场
🔌

度小满支付技能

作者 度小满 · GitHub ↗ · v1.0.9 · MIT-0
cross-platform ⚠ suspicious
238
总下载
0
收藏
1
当前安装
10
版本数
在 OpenClaw 中安装
/install dxm-claw-pay
功能描述
度小满支付钱包 Skill,处理 SP 服务余额不足/未购买场景:根据调用方传入的结构化商品数据生成支付链接和二维码。也处理 Skill 安装:当用户说"使用度小满安装skill"、"度小满下载skill"、"install skill"、"我要使用度小满安装某个skill"时触发 installSkill 流程。
使用说明 (SKILL.md)

度小满支付钱包 Skill (dxm-claw-pay)

本 Skill 负责处理所有 SP 服务的余额不足 / 未购买场景,统一完成二维码生成和引导话术。

脚本路径(支付二维码): scripts/qrcode.js 脚本路径(Skill 下载安装): scripts/clawpay-cli.js

运行时依赖:本 Skill 通过 shell 调用 node scripts/qrcode.js,需要宿主环境已安装 Node.js(建议 v18+)。若环境不支持 node 进程,需改为以模块方式集成 qrcode 逻辑。


触发条件

当任意 SP 服务调用返回以下情况时,由调用方 Skill 转交本 Skill 处理:

  • 返回 error: "FORBIDDEN"
  • 返回 detail 字段包含"未购买"

本 Skill 也可被用户直接触发:「查看充值套餐」「我要充值」「怎么付款」

用户直接触发安装 Skill 时:「安装skill」「下载skill」「install skill」「我要安装某个skill」→ 进入 installSkill 流程


installSkill 流程

第一步:获取 skill_id

若用户未提供 skill_id,询问用户:「请提供要安装的 Skill ID:」

第二步,确认配置文件

每次执行前必须先运行

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

第三步:执行下载

node scripts/clawpay-cli.js downloadSkill --skill-id \x3Cskill_id>

第四步:处理结果

成功(success: true

  • 告知用户:Skill 已下载并安装到对应目录
  • 提示用户重启 Claude Code 或刷新 Skill 列表以生效

未支付("ret":403,"msg":"用户尚未支付": 从返回的 content.data 字段中提取以下字段,直接构造结构化 JSON 调用本 Skill 的支付二维码流程:

download 返回字段 映射到输入参数
name productName
service_content productDesc
download_fee price
url payUrl
pay_channels pay_channels

其他错误:告知用户错误信息


输入参数

调用本 Skill 时,调用方需提供结构化 JSON 对象,字段如下:

参数 类型 必填 说明 示例
productName string 商品名称 "天气查询服务-月度套餐"
productDesc string 商品描述 "每月 1000 次调用额度"
price string 价格(含单位) "9.90元"
payUrl string 支付链接(必须为 https://www.dxmpay.com/ 开头) "https://www.dxmpay.com/..."
pay_channels string[] 支持的支付方式 ["wechat", "alipay"]

调用方职责:调用方 Skill 负责调用自身 CLI 脚本、提取以上字段,并以 JSON 对象形式传给本 Skill。本 Skill 不执行任何外部命令。


支付工作流程

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

每次执行前必须先运行

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

第二步:校验输入

收到调用方传入的 JSON 对象后,校验必填字段是否完整:

  • payUrl 必须以 https:// 开头,否则拒绝处理并提示调用方

第三步:生成支付二维码

使用 payUrl 字段生成二维码图片(写入系统临时目录):

node scripts/qrcode.js --short-url --out-dir /tmp "\x3CpayUrl>" 2>&1

安全约束

  • payUrl 必须以 https://www.dxmpay.com/ 开头,其他域名会被拒绝
  • --short-url必选项,生成的短链域名同样来自 www.dxmpay.com,确保支付链接全程在受信任域内流转
  • 启用 --short-url 会向 https://www.dxmpay.com/facilepaycenter/tinyurl/createurl 发起 POST 请求(外发流量),仅在信任该域时使用;若不需要短链可去掉该选项,脚本将直接使用传入的 payUrl
  • 临时目录下的二维码图片由系统负责清理(进程重启或系统清理后自动回收),如有更严格的清理策略请手动删除

第四步:展示商品信息并引导用户

  1. 展示商品名称、价格、描述、套餐内容
  2. 告知用户扫码支持的支付渠道
  3. 根据 pay_channels 组织提示文案(wechat:微信,alipay:支付宝)告知用户

***不要展示qr字段对应的二维码base64

调用示例(以 sp-service-weather 为例)

调用方(sp-service-weather)的职责

当 sp-service-weather 遇到 error: "FORBIDDEN"detail 包含"未购买"时,在自身 Skill 内完成以下步骤,再将结果转交本 Skill:

第一步:在 sp-service-weather 内执行 CLI 查询商品详情

node scripts/\x3Cxxx>-cli.js queryPurchaseDetail

第二步:从返回的 data 中提取字段,构造结构化 JSON

⚠️ 调用方须对以下字段做严格校验:payUrl 必须以 https://www.dxmpay.com/ 开头。

{
  "productName":  "\x3C商品名>",
  "productDesc":  "\x3C商品描述>",
  "price":        "\x3C价格>",
  "payUrl":       "\x3Chttps://www.dxmpay.com/...>",
  "pay_channels": ["wechat", "alipay"],
}

第三步:调用 dxm-claw-pay Skill,传入上述 JSON,由本 Skill 执行后续所有操作

  • 生成支付二维码
  • 展示商品信息与引导话术
  • 展示 "payUrl"
  • 展示pay_channels对应支持的支付渠道

sp-service-weather SKILL.md 中的写法参考

当返回 error: "FORBIDDEN" 或 detail 包含"未购买"时:
1. 执行: node scripts/\x3Cxxx>-cli.js queryPurchaseDetail
2. 从返回的 data 提取 productName / productDesc / price / payUrl / pay_channels
3. 调用 dxm-claw-pay Skill,传入结构化 JSON
   → 后续二维码生成、话术引导均由 dxm-claw-pay 完成

✅ 本 Skill 只处理经过调用方审计的结构化 JSON 数据,不执行任何传入的 shell 命令。


故障排查

现象 处理
二维码图片发送失败 检查 fp 路径是否有效;确认 qrcode.js 正常执行
payUrl 为空或非 https queryPurchaseDetail 返回异常,或 payUrl 未通过校验,告知用户联系客服
临时文件清理 二维码图片写入系统 tmpdir,进程重启或系统清理后自动回收
安全使用建议
This skill behaves like a legitimate dxmpay installer: it (1) generates and stores an EC keypair locally (private key saved to CLAUDE_SKILL_DIR/clawpay.json), (2) calls www.dxmpay.com endpoints to register and to download skill ZIPs, and (3) extracts/writes downloaded files into your skills directory. That is coherent with an 'installSkill' feature but has real risk: you must trust the remote server because downloaded archives will be written into and become part of your agent's skills. Before installing: ensure CLAUDE_SKILL_DIR is set to a safe location, review and audit any code downloaded from the BASE_URL, backup your agent/skill directory, and consider running the install flow in a sandboxed environment. If you do not trust www.dxmpay.com or cannot audit downloaded archives, do not enable the install flow.
功能分析
Type: OpenClaw Skill Name: dxm-claw-pay Version: 1.0.9 The skill functions as a secondary package manager that can download and install arbitrary code into the agent's environment. The script `scripts/clawpay-cli.js` contains logic to fetch ZIP files from a remote server (www.dxmpay.com), extract them, and use `fs.cpSync` to install them into the parent skills directory. While this is presented as a legitimate 'Skill installation' feature in `SKILL.md`, the ability to modify the agent's workspace by deploying remote artifacts is a high-risk capability that could be used for persistence or as a delivery mechanism for malicious code. Additionally, `scripts/qrcode.js` performs outbound network requests to the same domain to generate short URLs.
能力标签
cryptorequires-walletcan-make-purchasesrequires-sensitive-credentials
能力评估
Purpose & Capability
The files and SKILL.md implement exactly what the description says: QR code generation for dxmpay URLs and an installSkill flow that registers the client and downloads/extracts skill archives from a dxmpay service. The network, crypto, and ZIP-extraction capabilities are coherent with the installer functionality.
Instruction Scope
SKILL.md explicitly instructs calling node scripts that perform registration, download, QR generation and short-link POSTs to dxmpay. Those instructions stay within the described domain, but they require the agent to run node processes and to allow the CLI to perform network I/O and write files to the skill directories.
Install Mechanism
There is no separate install spec; this is an instruction-plus-scripts skill. All code is bundled locally (no external code download at install time). The only remote interaction is runtime HTTP(S) calls to the configured BASE_URL (www.dxmpay.com), which is expected for an installer and payment integration.
Credentials
The skill does not declare required env vars in metadata, but the scripts rely on process.env.CLAUDE_SKILL_DIR (and optionally SP_WEATHER_BASE). The CLI stores a generated privateKeyPem in ${CLAUDE_SKILL_DIR}/clawpay.json — this is sensitive local data. Requesting no declared credentials is consistent, but the absence of documented required env vars is a small mismatch the user should be aware of.
Persistence & Privilege
The CLI will create keys and write clawpay.json and will download and extract zip archives into the skills directory (SKILLS_DIR derived from CLAUDE_SKILL_DIR). Installing other skills (writing files into the agent's skill directory) is the point of the installer, but it is also a high-impact operation: code fetched from the configured remote server will be placed into your skill installation area and may later be executed by the agent. Treat that as a privilege the skill requires.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dxm-claw-pay
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dxm-claw-pay 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.9
- No user-facing or document changes in this release. - Version bump with no detected file modifications.
v1.0.8
- 新增 scripts/clawpay-cli.js,支持 Skill 在线下载安装及用户配置自动生成。 - SKILL.md 增加“installSkill流程”:支持用户通过自然语言请求安装/下载 skill。 - 所有支付及安装相关流程统一依赖 clawpay-cli.js 脚本,自动校验或生成密钥配置文件。 - installSkill 流程未支付时,自动进入支付二维码引导流程,字段映射规范明确。 - 原有支付购买工作流未变,但执行前需确认用户配置步骤。
v1.0.7
dxm-claw-pay 1.0.7 - 明确要求:“不要展示qr字段对应的二维码base64” - 其余功能、工作流及调用说明保持不变
v1.0.6
- 移除“安全说明”段落及执行命令相关的警告说明,简化文档结构。 - 精简提示信息,保留了输入校验和安全约束要点。 - 其余主要功能、参数和用法保持不变,未做行为性调整。
v1.0.5
dxm-claw-pay 1.0.5 changelog: - 移除了对 sender_id 的输入要求,并删除了飞书消息发送相关流程说明。 - 工作流程和调用示例调整为仅生成支付二维码和输出商品信息及引导话术,不再包含推送功能。 - 强化对运行环境的说明:需 Node.js 支持,并指明 --short-url 选项会发起外网请求,仅限信任域名使用。 - 简化了输入参数,调整文档结构,更聚焦二维码与商品信息的生成和展示。
v1.0.4
- Version update to 1.0.4 with no file changes detected. - No modifications in skill logic, workflow, or documentation. - All functionality and usage remain unchanged from the previous version.
v1.0.3
- Skill 更名为 dxm-claw-pay,并完善安全策略:本版本不再接受或执行任何 shell 命令,仅接收结构化 JSON 商品数据。 - 调用方需在自身 Skill 内完成商品查询和字段提取,并以 JSON 方式传参,包括支付链接、商品信息、支付渠道等。 - 增加严格校验:payUrl 仅限 https://www.dxmpay.com/ 开头,其它链接会被拒绝处理。 - 生成支付二维码时,强制使用短链功能,二维码文件存放于临时目录,进一步提升安全性。 - 所有二维码推送和用户引导话术均由本 Skill 统一输出,简化了调用和集成流程。
v1.0.2
Version 1.0.2 - Improved payment channel handling: now instructs users to scan the QR code using only the supported payment channels (WeChat, Alipay) based on returned values. - Updated QR code generation: extracts both fp and qr fields from script output. - Updated Feishu message sending to include the supported payment channels in the user-facing message. - Now outputs the QR code and payment channel message directly to the user during the guiding step. - Minor text adjustments and clarifications in workflow documentation.
v1.0.1
- 文档补充:商品信息查询返回内容新增 pay_channels 字段,说明支持的支付方式(微信/支付宝)。 - 增加说明:请根据 pay_channels 返回值,提示用户用支持的支付渠道扫码付款。 - 其余功能与说明未变化。
v1.0.0
- Initial release of dxm-agent-wallet Skill for handling insufficient balance or unpurchased service cases in SP services. - Supports fetching product details and payment link, generating a payment QR code, and sending it to users via Feishu. - Guides users with clear messaging for payment completion. - Provides examples for integration with other Skills and troubleshooting guidance.
元数据
Slug dxm-claw-pay
版本 1.0.9
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 10
常见问题

度小满支付技能 是什么?

度小满支付钱包 Skill,处理 SP 服务余额不足/未购买场景:根据调用方传入的结构化商品数据生成支付链接和二维码。也处理 Skill 安装:当用户说"使用度小满安装skill"、"度小满下载skill"、"install skill"、"我要使用度小满安装某个skill"时触发 installSkill 流程。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 238 次。

如何安装 度小满支付技能?

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

度小满支付技能 是免费的吗?

是的,度小满支付技能 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

度小满支付技能 支持哪些平台?

度小满支付技能 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 度小满支付技能?

由 度小满(@duxiaoman)开发并维护,当前版本 v1.0.9。

💬 留言讨论