Locus Payment Skill
Locus connects AI agents to crypto wallets via MCP. Tools are dynamic — each user gets different tools based on their permission group.
Setup (Agent-Guided)
When the user asks to set up Locus, use payments, or anything payment-related — check if Locus is configured and walk them through setup interactively:
Step 1: Check if mcporter is installed
CODEBLOCK0
Step 2: Check if Locus is already configured
mcporter config get locus 2>/dev/null
If configured, skip to
Usage. If the user wants to reconfigure, run:
CODEBLOCK2
Step 3: Ask the user for their API key
Tell them:
You'll need a Locus API key to connect your wallet. Get one at https://app.paywithlocus.com — each key is tied to your wallet and permission group. Paste it here when you're ready.
Wait for the user to provide their key. It should start with locus_. If it doesn't, warn them and confirm before proceeding.
Step 4: Configure mcporter
CODEBLOCK3
Step 5: Verify the connection
mcporter list locus
If tools appear, setup is complete — tell the user they're ready. If it fails, ask them to double-check their API key and try again.
Alternative: Script-based setup
Users can also run the setup script directly from the Clawdbot workspace root:
CODEBLOCK5
Usage
Always discover available tools first:
CODEBLOCK6
This returns all tools the user's permission group allows. Tools vary per user — do not assume which tools exist. Use the schema output to understand parameters.
Call any discovered tool:
CODEBLOCK7
For array/object parameters:
CODEBLOCK8
Email → Payment Flow
- 1. Scan inbox for payment-related emails (invoices, bills, splits, reimbursements)
- Identify actionable items with amounts, recipients, and context
- Summarize findings to user
- On user approval, execute payments via available tools
- Always confirm with user before sending any payment
Safety Rules
- - Never send payments without explicit user confirmation
- Always show: recipient, token, amount, and memo before executing
- Check available balance before attempting payments
- Double-check recipient addresses — typos mean lost funds
- Confirm large payments (>$100) with extra care
技能名称: locus
详细描述:
Locus 支付技能
Locus 通过 MCP 将 AI 代理连接到加密钱包。工具是动态的——每个用户根据其权限组获得不同的工具。
设置(代理引导)
当用户要求设置 Locus、使用支付或任何与支付相关的内容时——检查 Locus 是否已配置,并引导他们交互式完成设置:
步骤 1:检查是否安装了 mcporter
bash
command -v mcporter || npm i -g mcporter
步骤 2:检查 Locus 是否已配置
bash
mcporter config get locus 2>/dev/null
如果已配置,跳转到使用。如果用户想重新配置,运行:
bash
mcporter config remove locus
步骤 3:询问用户的 API 密钥
告诉他们:
你需要一个 Locus API 密钥来连接你的钱包。在 https://app.paywithlocus.com 获取一个——每个密钥都与你的钱包和权限组绑定。准备好后将其粘贴在这里。
等待用户提供他们的密钥。密钥应以 locus_ 开头。如果不是,警告他们并在继续之前确认。
步骤 4:配置 mcporter
bash
mcporter config add locus \
--url https://mcp.paywithlocus.com/mcp \
--header Authorization=Bearer
\
--scope home
步骤 5:验证连接
bash
mcporter list locus
如果工具出现,设置完成——告诉用户他们已经准备好了。如果失败,请他们仔细检查 API 密钥并重试。
替代方案:基于脚本的设置
用户也可以直接从 Clawdbot 工作区根目录运行设置脚本:
bash
bash skills/locus/scripts/setup.sh
使用
始终先发现可用工具:
bash
mcporter list locus --schema
这将返回用户权限组允许的所有工具。工具因用户而异——不要假设存在哪些工具。使用 schema 输出来理解参数。
调用任何发现的工具:
bash
mcporter call locus. param1=value1 param2=value2
对于数组/对象参数:
bash
mcporter call locus. --args {key: value}
电子邮件 → 支付流程
- 1. 扫描收件箱中与支付相关的电子邮件(发票、账单、分摊、报销)
- 识别包含金额、收款人和上下文的可操作项目
- 向用户总结发现
- 在用户批准后,通过可用工具执行支付
- 在发送任何支付前始终与用户确认
安全规则
- - 未经用户明确确认,绝不发送支付
- 始终在执行前显示:收款人、代币、金额和备注
- 在尝试支付前检查可用余额
- 仔细核对收款人地址——拼写错误意味着资金损失
- 对大额支付(>100美元)格外谨慎确认