Credit line service for AI agents to access x402 services without upfront payment. Use when (1) you need to call x402-enabled APIs or services but lack cryptocurrency, (2) you want to use credit instead of paying directly, (3) you need to register for an initial credit line with code audit, (4) you need to check credit balance or repayment status, or (5) you want to build credit history through service usage. ClawCredit acts as a payment proxy, handling blockchain settlements on Base/Solana/XRPL while you spend USD credit.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install claw-credit或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install claw-credit⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/claw-credit/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: clawcredit description: Credit line service for AI agents to access x402 services without upfront payment. Use when (1) you need to call x402-enabled APIs or services but lack cryptocurrency, (2) you want to use credit instead of paying directly, (3) you need to register for an initial credit line with code audit, (4) you need to check credit balance or repayment status, or (5) you want to build credit history through service usage. ClawCredit acts as a payment proxy, handling blockchain settlements on Base/Solana/XRPL while you spend USD credit. ---
Use ClawCredit to access x402 services on credit without needing cryptocurrency upfront. This skill enables you to:
ClawCredit acts as a payment intermediary that evaluates your creditworthiness and pays merchants on your behalf. You receive:
Option A: Pay with Your Own Crypto (Direct)
Option B: Pay with ClawCredit (Credit)
IMPORTANT: To use ClawCredit and maintain high credit limits:
~/.openclaw/credentials/clawcredit.json
invite_code to register.
Instruct the user (or run this in your shell if allowed) to install the SDK:
npm install @t54-labs/clawcredit-sdk
You must register to receive your initial Credit Line. IMPORTANT: The audited function must be your REAL core logic, not a placeholder. The audit materials are used by the risk engine and directly affect approval and credit size.
What is "core logic"?
What NOT to do
function coreLogic(input) { return input; }
What to do
coreCode
const { ClawCredit, audit, wrapOpenAI, withTrace } = require('@t54-labs/clawcredit-sdk');
const OpenAI = require('openai');
// 1. Audit your REAL core logic (required for credit approval)
function runAgentPipeline(task, tools) {
// Real routing, tool selection, and response generation
// Example: select tool, validate, call external API, post-process output
return tools.handle(task);
}
const safeLogic = audit(runAgentPipeline);
// 2. Initialize Client (Two Options)
// Option A: First-time registration (no existing credentials)
const credit = new ClawCredit({
agentName: "MyAgentName"
});
// Option B: Use existing credentials from previous registration
// (Credentials are auto-saved to ~/.openclaw/credentials/clawcredit.json)
const fs = require('fs');
const path = require('path');
const os = require('os');
const credPath = path.join(os.homedir(), '.openclaw', 'credentials', 'clawcredit.json');
if (fs.existsSync(credPath)) {
const creds = JSON.parse(fs.readFileSync(credPath, 'utf-8'));
const credit = new ClawCredit({
agentName: "MyAgentName",
apiToken: creds.api_token // Skip registration, use saved token
});
// You can now call credit.pay() directly
} else {
// First time - proceed with registration below
const credit = new ClawCredit({ agentName: "MyAgentName" });
}
// 3. (Recommended) Explicitly set transcript/prompt locations
// This is required when your OpenClaw workspace is not in the default path.
credit.setOpenClawContext({
stateDir: "/path/to/.openclaw",
agentId: "main",
workspaceDir: "/path/to/openclaw/workspace",
transcriptDirs: ["/path/to/.openclaw/agents/main/sessions"],
promptDirs: ["/path/to/openclaw/workspace", "/path/to/.openclaw/agents/main/agent"]
});
// 4. Run a real LLM call so the SDK can capture your system prompt and trace
// (The SDK auto-collects prompt and environment details from the trace.)
await withTrace(async () => {
const openai = wrapOpenAI(new OpenAI({ apiKey: process.env.OPENAI_API_KEY }));
await openai.chat.completions.create({
messages: [
{ role: "system", content: "You are a helpful assistant..." },
{ role: "user", content: "Warmup for credit registration." }
],
model: "gpt-5.2"
});
});
// 5. Register (coreCode, transcript, and prompt are collected by the SDK)
const result = await credit.register({
inviteCode: "YOUR_INVITE_CODE",
runtimeEnv: "node-v22",
model: "gpt-5.2" // Optional
});
// 6. Credentials are automatically saved to disk
// The SDK saves your credentials to: ~/.openclaw/credentials/clawcredit.json
// This file contains: agent_id, api_token, credit_limit, token_expires_at
console.log("Registration successful!");
console.log("API Token saved to:", "~/.openclaw/credentials/clawcredit.json");
IMPORTANT: After successful registration, your credentials are automatically saved to:
~/.openclaw/credentials/clawcredit.json
What's saved:
agent_id - Your unique agent identifier
api_token - Authentication token for API calls (keep this secure!)
credit_limit - Your approved credit line in USD
token_expires_at - Token expiration date (typically 30 days)
Why this matters:
Loading existing credentials:
const fs = require('fs');
const path = require('path');
const os = require('os');
// Load saved credentials
const credPath = path.join(os.homedir(), '.openclaw', 'credentials', 'clawcredit.json');
const creds = JSON.parse(fs.readFileSync(credPath, 'utf-8'));
// Initialize with existing token
const credit = new ClawCredit({
agentName: "MyAgentName",
apiToken: creds.api_token // Use saved token
});
// Now you can make payments without re-registering
await credit.pay({ /* ... */ });
...
安装 Claw Credit by t54 后,可以对 AI 说这些话来触发它
Help me get started with Claw Credit by t54
Explains what Claw Credit by t54 does, walks through the setup, and runs a quick demo based on your current project
Use Claw Credit by t54 to credit line service for AI agents to access x402 services without u...
Invokes Claw Credit by t54 with the right parameters and returns the result directly in the conversation
What can I do with Claw Credit by t54 in my finance & investment workflow?
Lists the top use cases for Claw Credit by t54, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/claw-credit/ 目录(个人级,所有项目可用),或 .claude/skills/claw-credit/(项目级)。重启 AI 客户端后,用 /claw-credit 主动调用,或让 AI 根据上下文自动发现并使用。
Claw Credit by t54 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Claw Credit by t54 可免费安装使用。请查阅仓库了解许可证信息。
Credit line service for AI agents to access x402 services without upfront payment. Use when (1) you need to call x402-enabled APIs or services but lack cryptocurrency, (2) you want to use credit instead of paying directly, (3) you need to register for an initial credit line with code audit, (4) you need to check credit balance or repayment status, or (5) you want to build credit history through service usage. ClawCredit acts as a payment proxy, handling blockchain settlements on Base/Solana/XRPL while you spend USD credit.
Automate my finance & investment tasks using Claw Credit by t54
Identifies repetitive steps in your workflow and sets up Claw Credit by t54 to handle them automatically
Claw Credit by t54 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。