MoltsPay Client Skill
Pay for AI services using USDC on Base chain. No gas needed.
When to Use
- - User asks to generate a video, image, or use any paid AI service
- User asks about wallet balance or payment history
- User wants to discover available services
- User mentions "pay", "buy", "purchase" + AI service
Available Commands
The moltspay CLI provides these commands:
| Command | Description |
|---|
| INLINECODE1 | Create wallet (first time only) |
| INLINECODE2 |
Check balance and limits |
|
moltspay config | Modify spending limits |
|
moltspay pay <url> <service> | Pay for a service |
Wallet Setup
On first use, initialize the wallet with sensible defaults:
- - Chain: Base (mainnet)
- Max per transaction: $2 USDC
- Daily limit: $10 USDC
After setup, tell user their wallet address and that they need to fund it with USDC on Base.
Discover Services
MoltsPay API
Query available services:
- - Search: INLINECODE5
- List all: INLINECODE6
Provider Discovery
Providers publish services at INLINECODE7
Example: INLINECODE8
Present results as a table to users:
| Service | Price | Description |
|---|
| text-to-video | $0.99 | Generate video from text prompt |
| image-to-video |
$1.49 | Animate an image |
Never show raw JSON to users - always format nicely.
Paying for Services
Use the moltspay pay command with the provider URL and service ID.
Parameters vary by service:
- -
--prompt for text-based services - INLINECODE11 for image-based services
- INLINECODE12 for video length
Example: Zen7 video generation at INLINECODE13
Spending Limits
Users can configure:
- - max-per-tx: Maximum per transaction (default $2)
- max-per-day: Daily spending limit (default $10)
Use moltspay config to modify limits.
Common User Requests
"Generate a video of X"
- 1. Check wallet status
- If not initialized → init first
- If balance is 0 → tell user to fund wallet
- If funded → pay for text-to-video service
- Return video URL to user
"What's my balance?"
Run status check and report balance, limits, and today's usage.
"What services are available?"
Query the MoltsPay API, format results as a clean list with prices.
Error Handling
| Error | Solution |
|---|
| Insufficient balance | Tell user to fund wallet with USDC on Base |
| Exceeds daily limit |
Wait until tomorrow, or increase limit |
| Exceeds per-tx limit | Increase limit with config command |
| Service not found | Verify service URL and ID |
Funding Instructions
Tell users:
- 1. Get wallet address from status command
- Send USDC on Base chain to that address
- Use Coinbase, MetaMask, or any Base-compatible wallet
- No ETH needed (gasless transactions)
Links
- - Docs: https://moltspay.com/docs
- Services: https://moltspay.com/services
- GitHub: https://github.com/Yaqing2023/moltspay
技能名称: moltspay_skill
详细描述:
MoltsPay 客户端技能
使用 Base 链上的 USDC 支付 AI 服务费用,无需 Gas 费。
使用时机
- - 用户要求生成视频、图片或使用任何付费 AI 服务
- 用户询问钱包余额或支付历史
- 用户想要发现可用服务
- 用户提及支付、购买、采购 + AI 服务
可用命令
moltspay CLI 提供以下命令:
| 命令 | 描述 |
|---|
| moltspay init --chain base | 创建钱包(仅首次使用) |
| moltspay status |
检查余额和限额 |
| moltspay config | 修改消费限额 |
| moltspay pay
| 支付服务费用 |
钱包设置
首次使用时,使用合理的默认值初始化钱包:
- - 链:Base(主网)
- 每笔交易上限:2 美元 USDC
- 每日限额:10 美元 USDC
设置完成后,告知用户其钱包地址,并提示需要在 Base 链上向该地址充值 USDC。
发现服务
MoltsPay API
查询可用服务:
- - 搜索:GET https://moltspay.com/api/search?q=<关键词>
- 列出全部:GET https://moltspay.com/api/services
服务商发现
服务商在 /.well-known/agent-services.json 发布服务
示例:https://juai8.com/.well-known/agent-services.json
以表格形式向用户展示结果:
| 服务 | 价格 | 描述 |
|---|
| 文本转视频 | 0.99 美元 | 根据文本提示生成视频 |
| 图片转视频 |
1.49 美元 | 让图片动起来 |
切勿向用户展示原始 JSON 数据——始终进行良好格式化。
支付服务
使用 moltspay pay 命令,附带服务商 URL 和服务 ID。
参数因服务而异:
- - --prompt 用于基于文本的服务
- --image 用于基于图片的服务
- --duration 用于视频时长
示例:在 https://juai8.com/zen7 生成 Zen7 视频
消费限额
用户可以配置:
- - max-per-tx:每笔交易上限(默认 2 美元)
- max-per-day:每日消费限额(默认 10 美元)
使用 moltspay config 修改限额。
常见用户请求
生成一个关于 X 的视频
- 1. 检查钱包状态
- 如果未初始化 → 先初始化
- 如果余额为 0 → 告知用户充值钱包
- 如果已充值 → 支付文本转视频服务费用
- 向用户返回视频 URL
我的余额是多少?
运行状态检查,报告余额、限额和今日使用情况。
有哪些可用服务?
查询 MoltsPay API,将结果格式化为带价格的清晰列表。
错误处理
| 错误 | 解决方案 |
|---|
| 余额不足 | 告知用户在 Base 链上充值 USDC |
| 超出每日限额 |
等待至次日,或提高限额 |
| 超出每笔交易上限 | 使用 config 命令提高限额 |
| 未找到服务 | 验证服务 URL 和 ID |
充值说明
告知用户:
- 1. 通过 status 命令获取钱包地址
- 在 Base 链上向该地址发送 USDC
- 使用 Coinbase、MetaMask 或任何兼容 Base 的钱包
- 无需 ETH(无 Gas 交易)
链接
- - 文档:https://moltspay.com/docs
- 服务:https://moltspay.com/services
- GitHub:https://github.com/Yaqing2023/moltspay