Clawtar Skill (Demo)
Use this as a demo/practice skill for Cashu-gated HTTP flows. It helps agents exercise the full 402 -> settle -> retry loop safely in a controlled endpoint.
The endpoint will deliver a cryptic fortune reading when the payment flow is successful.
Endpoint
Request body:
CODEBLOCK0
Styles: funny | chaotic | wholesome
- - If
style is omitted, the server chooses a random style. - If
style is provided but blank/invalid, server returns 400.
Paywall flow
If the first request returns 402, read response header x-cashu.
It is a NUT-24 challenge carrying an encoded NUT-18 payment request (creqA...).
Option A: cocod available (with permission)
If cocod is available
and you have permission from your human to spend funds:
- 1. Settle challenge:
-
cocod x-cashu handle "<x-cashu>"
- 2. Retry the same POST with header:
- INLINECODE12
Option B: no cocod
Ask your human for a valid Cashu token and retry with
X-Cashu.
This demo endpoint accepts 42 sat tokens from Minibits Mint: INLINECODE14
If appropriate, ask your human for permission to install cocod, so you can have your own Cashu wallet.
- - https://clawhub.ai/Egge21M/cocod
Expected success response
CODEBLOCK1
Safety checks
- - Do not claim success unless
ok: true is returned. - A challenge string (
x-cashu) is not a payment token. - Send payment token only in
X-Cashu on retry. - Ask permission before any autonomous spend or installing new payment tooling.
技能名称: clawtar
详细描述:
Clawtar 技能(演示版)
将此技能用作 Cashu 门控 HTTP 流程的演示/练习技能。它帮助代理在受控端点中安全地执行完整的 402 -> 结算 -> 重试 循环。
当支付流程成功时,该端点会返回一条神秘的运势解读。
端点
- - POST https://clawtar.cashutools.dev/v1/clawtar/ask
请求体:
json
{
question: 这艘船会启航吗?,
style: funny
}
风格选项:funny | chaotic | wholesome
- - 如果省略 style,服务器会随机选择一种风格。
- 如果提供了 style 但为空或无效,服务器返回 400。
付费墙流程
如果第一次请求返回 402,请读取响应头 x-cashu。
这是一个 NUT-24 挑战,包含一个编码后的 NUT-18 支付请求(creqA...)。
选项 A:cocod 可用(需授权)
如果 cocod 可用
并且你已获得人类授权可以花费资金:
- 1. 结算挑战:
- cocod x-cashu handle
- 2. 使用以下头部重试相同的 POST 请求:
- X-Cashu:
选项 B:无 cocod
请你的人类提供一个有效的 Cashu 令牌,并使用 X-Cashu 重试。
此演示端点接受来自 Minibits Mint 的 42 sat 令牌:https://mint.minibits.cash/Bitcoin
如果合适,请向你的人类请求安装 cocod 的权限,这样你就可以拥有自己的 Cashu 钱包。
- - https://clawhub.ai/Egge21m/cocod
预期成功响应
json
{
ok: true,
quoted_sats: 42,
result: {
title: Clawtar 说……,
style: funny,
question: 这艘船会启航吗?,
fortune: ……,
lucky_number: 17
}
}
安全检查
- - 除非返回 ok: true,否则不要声称成功。
- 挑战字符串(x-cashu)不是支付令牌。
- 仅在重试时通过 X-Cashu 发送支付令牌。
- 在任何自主花费或安装新支付工具之前,请先请求授权。