MoltBank Skill For AI Agents
Use MoltBank for:
- - authentication pairing
- treasury balance reads
- pending approval reads
- payment drafting
- x402 discovery and one-shot auto-pay actions
Preferred Execution Order
- 1. If MCP tools are available, use MCP first.
- If MCP tools are unavailable, discover exact CLI contract first:
-
moltbank tools list --json
-
moltbank schema --json
-
moltbank schema <command> --json
- or command
--help
- 3. Execute CLI commands with
--json.
Hard Rule
Do not guess flags, argument names, or tool input shapes from memory.
Always discover exact usage on demand from MCP tool schemas or CLI schema/help.
When using moltbank schema --json, use command name for CLI execution. Do not execute id values (for example moltbank_*) as terminal commands.
When the user asks "what tools/functions can I use", run moltbank tools list --json and answer from that output.
Join / Bootstrap Sequence
When the user asks to "join MoltBank" or to follow setup instructions:
Runtime isolation rule:
- - Do not use another runtime's skill manager (for example OpenClaw) to verify or install the skill for the current runtime. Each runtime is independent.
- 1. Use only the current runtime's native skill mechanism:
- If current runtime is OpenClaw: run
openclaw skills list
- If current runtime is skills.sh-compatible (for example Claude Code, Codex, Hermes, or Manus when
npx skills is available): run
npx skills ls
- If runtime capability is unclear, ask the user which runtime should be configured before running any skill-manager command.
- 2. Treat the skill as installed only when the current runtime reports it as ready/active.
- If the skill is missing or not ready, and the user explicitly approves setup, use the current runtime's installer:
- OpenClaw example:
openclaw skills install moltbank, then confirm with
openclaw skills list (
moltbank must be
✓ ready)
- skills.sh example (including Claude Code, Codex, Hermes, or Manus when compatible):
npx skills add moltbankhq/moltbank-skill
- 4. Check CLI availability with
moltbank --version. - If CLI is missing and the user explicitly approves setup, install the CLI:
-
npm install -g @moltbankhq/cli
- 6. Continue auth flow (
moltbank auth begin --json then moltbank auth poll --json after user approval). - Verify final state with
moltbank whoami --json. - If you run
moltbank doctor --json and it fails, report exact failing checks; do not claim "all good". - During basic join/setup, do not run x402 signer initialization or wallet registration unless the user explicitly requests x402 setup or a requested command requires it.
Never claim "skill installed", "setup complete", or "everything is ready" without command evidence from the current session.
Authentication (Chat-Driven Flow)
If credentials are missing or unauthorized, prefer completing login through chat guidance.
Use this recommended chat flow:
- 1. Run
moltbank auth begin --json. - Extract
verification_uri_complete and user_code from the JSON output. - Present the approval URL to the user in the chat and tell them to verify the domain is
app.moltbank.bot before opening it. - Ask the user to click the link, approve the connection in their browser, and reply
done. - When the user replies
done, run moltbank auth poll --json. - If the command returns
AUTH_PENDING, politely tell the user the approval is still pending and ask them to confirm they completed the browser flow. - If the command succeeds, continue with the user’s original request.
Do not rely on model memory to remember the device code. The CLI manages pending auth state locally.
Never execute long-running interactive authentication wrappers as an agent tool.
x402 Payments
When the user asks to buy or use an x402-protected endpoint:
- 1. If the exact x402 URL is known, use
moltbank_x402_auto_pay. - If the URL is not known, use
moltbank_discover_x402_bazaar first, then use moltbank_x402_auto_pay. - Do not manually orchestrate signer init, wallet registration, inspect, treasury funding, payment execution, or receipt logging.
moltbank_x402_auto_pay handles those steps. - If auto-pay returns
status: needs_user_approval, explain that clearly and stop. If bootstrapBudget.approvalUrl is present, provide that exact link and tell the user to approve it, then rerun the same auto-pay request. - If auto-pay returns
status: needs_configuration, explain what setup is missing and stop. - If auto-pay succeeds, report success and include the returned
paymentTxHash when available. - If auto-pay returns a bootstrapBudget.approvalUrl, present that exact link to the user and tell them to approve it to grant the bot the necessary permissions. Once they approve it, rerun the exact same auto-pay command.
Budget Proposals On Base (Important)
When creating a Base bot budget (propose_bot_budget / moltbank budget propose) and the backend says the x402 wallet is not registered:
- 1. Run
moltbank x402 signer init --json to obtain/reuse the bot wallet address. - Run
moltbank x402 wallet register --wallet-address "<signerAddress>" --json. - Retry the original budget proposal exactly once.
- If it still fails, stop and report the blocker to the user with the exact error.
Do not enter retry loops. Never repeat the same failing command more than 2 times without new inputs or state changes.
For raw fallback calls, moltbank mcp call supports:
- -
--arg key=value (repeatable) - INLINECODE46 (JSON object for tool arguments)
Export History Delivery
INLINECODE47 supports delivery channels:
- -
slack (default for Slack context) - INLINECODE49 (requires
telegramChatId) - INLINECODE51 (returns file payload in tool response; default for non-Slack contexts)
CLI flags:
- - INLINECODE52
- INLINECODE53 (required when channel is telegram)
- INLINECODE54 (optional for Slack delivery outside Slack context)
Dependency Setup (Only With Explicit User Approval)
MoltBank usage depends on:
- - a skill installation in the host runtime
- the local
moltbank CLI
MoltBank usage requires two separate dependencies:
- 1. The skill installed in the host runtime (e.g., via
npx skills add ) - The local
moltbank CLI
Do not skip the runtime skill installation just because the local CLI is already installed.
If setup is needed and the user explicitly approves installation:
- - do not invent ad-hoc install commands
- do not use one runtime's manager to infer another runtime's skill installation status
- treat skill installation as satisfied only when the runtime reports the skill as ready/active
- if bootstrapping another runtime, install the skill first:
- OpenClaw:
openclaw skills install moltbank
- skills.sh-compatible runtimes:
npx skills add moltbankhq/moltbank-skill
-
npm install -g @moltbankhq/cli
- - validate after installation:
-
moltbank auth begin --json
- INLINECODE62
Never auto-install dependencies without user approval.
Boundaries
- - Do not edit global runtime configuration.
- Do not mutate sandbox defaults.
- Do not install this skill or the
moltbank CLI unless the user explicitly approves it. - Do not invent custom install commands when a platform-declared install flow exists.
- Do not state that setup succeeded unless command output in this session confirms it.
- Keep secrets local; never print full tokens, access tokens, or private keys.
面向AI代理的MoltBank技能
使用MoltBank进行:
- - 身份验证配对
- 金库余额查询
- 待审批事项查询
- 支付草稿创建
- x402发现和一次性自动支付操作
优先执行顺序
- 1. 如果MCP工具可用,优先使用MCP。
- 如果MCP工具不可用,先发现确切的CLI命令:
- moltbank tools list --json
- moltbank schema --json
- moltbank schema
--json
- 或命令 --help
- 3. 使用 --json 执行CLI命令。
硬性规则
不要凭记忆猜测标志、参数名称或工具输入格式。
始终根据需要从MCP工具模式或CLI模式/帮助中发现确切用法。
使用 moltbank schema --json 时,使用命令 name 进行CLI执行。不要将 id 值(例如 moltbank_*)作为终端命令执行。
当用户询问我可以使用哪些工具/功能时,运行 moltbank tools list --json 并根据输出回答。
加入/引导流程
当用户要求加入MoltBank或按照设置说明操作时:
运行时隔离规则:
- - 不要使用另一个运行时的技能管理器(例如OpenClaw)来验证或安装当前运行时的技能。每个运行时都是独立的。
- 1. 仅使用当前运行时的原生技能机制:
- 如果当前运行时是OpenClaw:运行 openclaw skills list
- 如果当前运行时与skills.sh兼容(例如Claude Code、Codex、Hermes或Manus当 npx skills 可用时):运行 npx skills ls
- 如果运行时能力不明确,在运行任何技能管理器命令前询问用户应配置哪个运行时。
- 2. 仅当当前运行时报告技能已就绪/激活时,才将技能视为已安装。
- 如果技能缺失或未就绪,且用户明确批准设置,使用当前运行时的安装程序:
- OpenClaw示例:openclaw skills install moltbank,然后用 openclaw skills list 确认(moltbank 必须显示 ✓ ready)
- skills.sh示例(包括Claude Code、Codex、Hermes或兼容时的Manus):npx skills add moltbankhq/moltbank-skill
- 4. 使用 moltbank --version 检查CLI可用性。
- 如果CLI缺失且用户明确批准设置,安装CLI:
- npm install -g @moltbankhq/cli
- 6. 继续认证流程(先 moltbank auth begin --json,用户批准后 moltbank auth poll --json)。
- 使用 moltbank whoami --json 验证最终状态。
- 如果运行 moltbank doctor --json 失败,报告确切失败的检查项;不要声称一切正常。
- 在基本加入/设置过程中,除非用户明确请求x402设置或请求的命令需要,否则不要运行x402签名者初始化或钱包注册。
在没有当前会话的命令证据时,切勿声称技能已安装、设置完成或一切就绪。
身份验证(聊天驱动流程)
如果凭据缺失或未授权,优先通过聊天引导完成登录。
使用此推荐的聊天流程:
- 1. 运行 moltbank auth begin --json。
- 从JSON输出中提取 verificationuricomplete 和 usercode。
- 在聊天中向用户展示批准URL,并告知他们在打开前验证域名为 app.moltbank.bot。
- 要求用户点击链接,在浏览器中批准连接,并回复 done。
- 当用户回复 done 时,运行 moltbank auth poll --json。
- 如果命令返回 AUTHPENDING,礼貌地告知用户批准仍在等待中,并要求他们确认已完成浏览器流程。
- 如果命令成功,继续处理用户的原始请求。
不要依赖模型记忆来记住设备代码。CLI在本地管理待处理的认证状态。
切勿作为代理工具执行长时间运行的交互式身份验证包装器。
x402支付
当用户要求购买或使用x402保护的端点时:
- 1. 如果确切的x402 URL已知,使用 moltbankx402autopay。
- 如果URL未知,先使用 moltbankdiscoverx402bazaar,然后使用 moltbankx402autopay。
- 不要手动编排签名者初始化、钱包注册、检查、金库注资、支付执行或收据记录。moltbankx402autopay 处理这些步骤。
- 如果自动支付返回 status: needsuserapproval,清楚解释并停止。如果存在 bootstrapBudget.approvalUrl,提供该确切链接并告知用户批准,然后重新运行相同的自动支付请求。
- 如果自动支付返回 status: needs_configuration,解释缺少什么设置并停止。
- 如果自动支付成功,报告成功并包含返回的 paymentTxHash(如果可用)。
- 如果自动支付返回bootstrapBudget.approvalUrl,向用户展示该确切链接并告知他们批准以授予机器人必要的权限。一旦他们批准,重新运行完全相同的自动支付命令。
Base上的预算提案(重要)
在创建Base机器人预算(proposebotbudget / moltbank budget propose)且后端报告x402钱包未注册时:
- 1. 运行 moltbank x402 signer init --json 获取/重用机器人钱包地址。
- 运行 moltbank x402 wallet register --wallet-address --json。
- 重试原始预算提案恰好一次。
- 如果仍然失败,停止并向用户报告阻塞问题及确切错误。
不要进入重试循环。在没有新输入或状态变化的情况下,不要重复执行同一失败命令超过2次。
对于原始回退调用,moltbank mcp call 支持:
- - --arg key=value(可重复)
- --body {key:value}(工具参数的JSON对象)
导出历史记录投递
exporttransactionhistory 支持投递渠道:
- - slack(Slack上下文默认)
- telegram(需要 telegramChatId)
- inline(在工具响应中返回文件负载;非Slack上下文默认)
CLI标志:
- - --delivery-channel slack|telegram|inline
- --telegram-chat-id (渠道为telegram时必需)
- --slack-user-id (Slack上下文外投递到Slack时可选)
依赖设置(仅在用户明确批准时)
MoltBank的使用依赖于:
- - 宿主运行时中的技能安装
- 本地 moltbank CLI
MoltBank的使用需要两个独立的依赖:
- 1. 宿主运行时中安装的技能(例如通过 npx skills add)
- 本地 moltbank CLI
不要因为本地CLI已安装就跳过运行时技能安装。
如果需要设置且用户明确批准安装:
- - 不要发明临时安装命令
- 不要使用一个运行时的管理器来推断另一个运行时的技能安装状态
- 仅当运行时报告技能已就绪/激活时,才将技能安装视为已完成
- 如果引导另一个运行时,先安装技能:
- OpenClaw:openclaw skills install moltbank
- 与skills.sh兼容的运行时:npx skills add moltbankhq/moltbank-skill
- npm install -g @moltbankhq/cli
- moltbank auth begin --json
- moltbank doctor --json
未经用户批准,切勿自动安装依赖。
边界
- - 不要编辑全局运行时配置。
- 不要修改沙箱默认值。
- 除非用户明确批准,否则不要安装此技能或 moltbank CLI。
- 当存在平台声明的安装流程时,不要发明自定义安装命令。
- 除非此会话中的命令输出确认,否则不要声称设置成功。
- 保持密钥本地化;切勿打印完整令牌、访问令牌或私钥。