下载地址
https://www.zhengdianxue.com/wp-content/uploads/skills/mingyuanyunke--mysoft-banana-skill-pay.zip将提示词发送给你的 AI 安装该 skills
请根据 https://skillhub.cn/install/skillhub.md,安装 @mingyuanyunke/mysoft-banana-skill-pay。Generate fixed-2K images through the Nano Banana. Use when an agent needs to create a Gemini/Nano Banana 2K image.
阅读全文 (展开查看完整说明)
概述
Nano Banana SkillPay
Generate an image through the ClawEase backend. Handle paid Tencent SkillPay 402 challenges and the final 200 image response without exposing merchant secrets or payment artifacts.
Generate an image
- Obtain a non-empty image prompt. Accept an optional aspect ratio. Always generate at 2K; do not offer or accept another image size.
- Run:
node <skill-dir>/scripts/generate-image.mjs
--prompt '<prompt>'
--aspect-ratio '1:1'
--output '<absolute-output-path>'- The published Skill calls
https://clawease.aiby default. For local or staging verification, setCLAW_EASE_API_BASE_URLor pass--api-base-urlexplicitly. - Read the single JSON object printed to stdout.
Supported aspect ratios: 1:1, 1:4, 4:1, 1:8, 8:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9.
Output size is fixed at 2K for consistent pricing. Do not pass --image-size.
Handle the result
status: completed
- Verify
file_pathexists. - Return or display that image.
- Treat
object_pathas the stable OSS identifier. The returned signedurlis valid for 24 hours. - Report
model, dimensions when available, andusageonly when useful.
status: payment_required
- Read both
payment_codeandout_trade_no. Treat them as ephemeral payment artifacts. Do not display, persist, or log them. - Pass the exact value to the installed
weixinpay_paytool and show the authorization UI to the user. - Never authorize payment on the user's behalf.
- After the tool confirms payment, rerun the same request with the original values and both payment artifacts:
node <skill-dir>/scripts/generate-image.mjs
--prompt '<original-prompt>'
--aspect-ratio '<original-aspect-ratio>'
--output '<original-absolute-output-path>'
--trade-no '<out_trade_no>'
--payment-code '<payment_code>'- Keep the prompt and aspect ratio equivalent to the first request. The backend fixes the size at 2K, binds the normalized request body to the paid order, and rejects changed generation parameters.
- If the backend reports
skillpay_payment_pending, wait briefly and retry the same paid order. Do not create another order. - If the backend reports
skillpay_fulfillment_in_progress, wait for the original fulfillment and retry the same paid order. - If
weixinpay_payis unavailable, explain that Tencent WorkBuddy/QClaw payment capability is required and stop. Never bypass the charge by calling an alternate endpoint.
Safety rules
- Call the image endpoint without an
Authorizationheader. - Allow plain HTTP only for loopback hosts. Require HTTPS for remote backends.
- Never hardcode the SkillHub developer private key,
pub_key_id, WeChat merchant certificate,code_url, payment code, or trade number in this Skill. - Consider payment successful for the user flow only when the payment tool confirms it. The backend independently verifies the WeChat order before generation.
- Reject malformed
402responses that omit eitherWeixinPay-RequiredorX-Out-Trade-No. - Do not retry a failed payment automatically.
- The backend uploads generated bytes to OSS before marking an order fulfilled. Never expect or persist
b64_json.
When implementing or reviewing the backend X402 contract, read [references/skillpay-x402.md](references/skillpay-x402.md).