AIUSD 智能交易与资产管理
简介
基于 T2 级开源项目的 AIUSD 链上交易技能,支持余额查询、质押兑换、Gas 管理等操作,通过 MCP 协议安全连接后端,为加密货币投资者提供自动化资产管理能力。
原始描述
AIUSD trading and account management skill. Calls backend via MCP for balance, trading, staking, withdraw, gas top-up, and transaction history. Auth priority: MCP_HUB_TOKEN env, then mcporter OAuth or local token file.
通过你的 Agent 添加
安装目录:aiusd-skill/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心功能
AIUSD Skill 是一个基于 MCP(Model Context Protocol)的加密货币交易管理工具,主要提供以下功能:
- 账户管理:查询 AIUSD 托管账户和质押账户余额,获取交易地址
- 交易执行:支持买入/卖出/兑换(如用 USDC 购买 SOL),通过自然语言意图执行交易
- 质押服务:AIUSD 质押(获得 sAIUSD 收益)和解质押赎回
- 资金管理:向外部钱包提取稳定币、Gas 费充值、账户充值引导
- 交易历史:查询近期交易记录和订单状态
工具通过 aiusd-skill tools --detailed 动态获取实时接口定义,支持 OAuth 认证流程。
显著优点
- 意图驱动交互:用户可用自然语言描述交易需求(如"买 100 USDC 的 SOL"),降低 DeFi 操作门槛
- 全链条覆盖:从查询、交易、质押到提现的完整资金管理闭环
- 实时工具发现:动态获取最新工具定义,避免文档过时问题
严重局限性与风险
🔴 高危安全风险(C级/45分)
风险项
严重程度
说明
动态代码执行
Critical
自解压机制从 Base64 解码执行代码,静态审查困难
子进程注入
Critical
多处 execSync 调用 shell 命令,存在命令注入风险
敏感凭证暴露
High
OAuth Token 明文存储于 ~/.mcp-hub/token.json
供应链攻击
Medium
运行时 npm install 动态安装依赖,无法预审计
递归删除数据
High
安装脚本无条件递归删除现有目录
⚠️ 来源可信度
🔴 高危安全风险(C级/45分)
| 风险项 | 严重程度 | 说明 |
|---|---|---|
| 动态代码执行 | Critical | 自解压机制从 Base64 解码执行代码,静态审查困难 |
| 子进程注入 | Critical | 多处 execSync 调用 shell 命令,存在命令注入风险 |
| 敏感凭证暴露 | High | OAuth Token 明文存储于 ~/.mcp-hub/token.json |
| 供应链攻击 | Medium | 运行时 npm install 动态安装依赖,无法预审计 |
| 递归删除数据 | High | 安装脚本无条件递归删除现有目录 |
- T3 级别:个人开发者(chaunceyliu)维护的 MIT 开源项目,未经企业级安全审计
- 缺乏代码签名验证机制,48KB Base64 编码数据难以审查
适合人群
- 熟悉 Docker/虚拟机隔离环境的进阶用户
- 能接受「警示级」安全风险的 DeFi 交易者
- 愿意手动验证交易、监控异常活动的安全意识较强者
不适合:普通用户、大额资金持有者、无技术背景者、生产环境部署
常规风险
- 资金损失:动态代码执行和子进程风险可能导致恶意代码注入
- 凭证泄露:明文 Token 存储可能被恶意软件窃取
- 供应链污染:运行时依赖安装引入未审计代码
- 中间人攻击:API 通信缺乏服务端签名验证
- 数据丢失:安装脚本可能误删用户数据
使用建议
必须在隔离环境(Docker/VM)中以非特权用户运行,启用网络监控,定期轮换 Token,大额操作请使用官方网页端 https://aiusd.ai
技能正文
name: aiusd-skill
description: AIUSD trading and account management skill. Calls backend via MCP for balance, trading, staking, withdraw, gas top-up, and transaction history. Auth priority: MCP_HUB_TOKEN env, then mcporter OAuth or local token file.
AIUSD Skill (Agent Reference)
This skill calls the AIUSD backend via MCP. Auth is resolved in order: env MCP_HUB_TOKEN, mcporter OAuth, or local ~/.mcp-hub/token.json. Ensure a valid Bearer token is available before calling.
⚠️ Agent Output Guidelines
CRITICAL - ABSOLUTELY FORBIDDEN PHRASES: Agents must NEVER use these words or phrases when responding to users:
TEMPLATE-RELATED (COMPLETELY BANNED):
- "template" (any form: template, templates)
- "example" (when referring to trading examples: Example 1, Example 12, etc.)
- "pattern" (when referring to trading patterns)
- "using template", "get template", "trading template", "buy template"
- "use Example [number]", "based on template", "following template"
VERIFICATION-RELATED (COMPLETELY BANNED):
- "skill verification", "verification"
WHAT TO SAY INSTEAD:
- Instead of "using template": say "executing the trade" or "placing the order"
- Instead of "get template": say "preparing the trade" or "setting up the order"
- Instead of "Example 12 template": say "the trade configuration" or simply describe the action
ZERO TOLERANCE: Any use of the word "template" in trading contexts is STRICTLY PROHIBITED.
Authentication Response Guidelines: CRITICAL: When users request re-authentication, respond ONLY with:
- "Please complete authentication in your browser"
- "If browser doesn't open automatically, please type 'reauth' again"
- "After completing authentication, you can check your account balance or wallet status in chat"
STRICTLY FORBIDDEN:
- Do NOT include numbered steps like "1. Open page: [URL]", "2. Connect wallet", etc.
- Do NOT mention any specific URLs in the response (URLs may be incorrect)
- Do NOT say "waiting for authentication completion" or similar waiting phrases
- Do NOT provide detailed step-by-step browser instructions
- Do NOT create bulleted lists of authentication steps
- Do NOT say phrases like "browser has been opened for you", "please complete the following steps in browser"
- Simply guide them to the browser and mention what they can do after completion
Use natural, direct language to describe trading operations and system status. Simply describe what the trade will do without referencing templates or examples.
Important URLs
- Login/Auth:
https://mcp.alpha.dev/oauth/login - Only for getting authentication token
- Official Website:
https://aiusd.ai - For trading operations, recharge, troubleshooting, and all user interactions
Tool Overview
https://mcp.alpha.dev/oauth/login - Only for getting authentication tokenhttps://aiusd.ai - For trading operations, recharge, troubleshooting, and all user interactionsCRITICAL: Always run aiusd-skill tools --detailed FIRST to get the current live schema and available tools before making any calls. Tool parameters and available tools may change.
| Tool | Purpose | Typical user intents |
|---|---|---|
| genalpha_get_balances | Query account balances | balance, how much, account balance |
| genalpha_get_trading_accounts | Get trading accounts / addresses | my account, trading account, wallet address |
| genalpha_execute_intent | Execute trade intent (buy/sell/swap) | buy, sell, buy SOL with USDC, swap |
| genalpha_stake_aiusd | Stake AIUSD | stake, stake AIUSD |
| genalpha_unstake_aiusd | Unstake | unstake |
| genalpha_withdraw_to_wallet | Withdraw to external wallet | withdraw, transfer out |
| genalpha_ensure_gas | Top up Gas for on-chain account | top up gas, ensure gas |
| genalpha_get_transactions | Query transaction history | history, recent transactions |
| recharge / top up | Guide user to recharge account | recharge, top up, deposit, add funds |
| reauth / login | Re-authenticate / login | login, re-login, auth expired, 401 |
NOTE: This list shows commonly available tools. NEW TOOLS may be added. Always check tools --detailed to discover any additional tools that may better serve the user's specific intent.
Tool Reference and Call Usage
MANDATORY: Before calling ANY tool, run aiusd-skill tools --detailed to get current parameters, examples, and any new tools.
genalpha_get_balances
- Purpose: Return user AIUSD custody and staking account balances.
- When to use: User asks for balance, how much, account assets.
- Parameters: Check
tools --detailed for current schema.
genalpha_get_trading_accounts
- Purpose: Return user trading accounts (addresses, etc.) per chain.
- When to use: User asks "my account", "trading account", "wallet address".
- Parameters: Check
tools --detailed for current schema.
genalpha_execute_intent
- Purpose: Execute buy/sell/swap (e.g. buy SOL with USDC, sell ETH).
- When to use: User clearly wants to place order, buy, sell, swap.
- Parameters: Check
tools --detailed for current schema and XML examples.
- IMPORTANT: Intent format may change. Always use examples from live schema.
genalpha_stake_aiusd
- Purpose: Stake AIUSD for yield (e.g. sAIUSD).
- When to use: User says stake, stake AIUSD.
- Parameters: Check
tools --detailed for current schema.
genalpha_unstake_aiusd
- Purpose: Unstake AIUSD (e.g. redeem sAIUSD).
- When to use: User says unstake, redeem.
- Parameters: Check
tools --detailed for current schema.
genalpha_withdraw_to_wallet
- Purpose: Withdraw stablecoin (e.g. USDC) to user-specified external wallet address.
- When to use: User says withdraw, transfer out.
- Parameters: Check
tools --detailed for current schema.
genalpha_ensure_gas
- Purpose: Top up native Gas for user trading account on a given chain.
- When to use: User says top up gas, ensure gas, or chain has low gas.
- Parameters: Check
tools --detailed for current schema.
genalpha_get_transactions
- Purpose: Return user transaction history (list, may include status).
- When to use: User asks history, recent transactions, order status.
- Parameters: Check
tools --detailed for current schema and filtering options.
recharge / top up
- Purpose: Guide user to recharge their AIUSD account with funds.
- When to use: User asks to recharge, top up, deposit, or add funds to their account.
- Response Options:
- Option 1 - Direct deposit: Only USDC stablecoins accepted. Other stablecoins must use official website.
- Option 2 - Official website: https://aiusd.ai (supports all tokens, login with same wallet)
- Important: For direct deposits, only send USDC to the provided addresses. For other stablecoins (USDT, DAI, etc.), user must use the official website.
- Example response: "For recharge, you have two options: 1) Direct USDC deposit to your trading addresses, or 2) Visit https://aiusd.ai for all token types (login with same wallet). Direct deposits only accept USDC - other stablecoins must use the website."
reauth / login (Re-authenticate)
- Purpose: Clear all cached auth and run OAuth login again.
- When to use: User has 401 Unauthorized, "Session ID is required", token expired, auth failure, user asks to re-login, or switch account.
- Params: None. Pass
{}.
- Example:
npm run reauth
npm run login
node scripts/reauth.js
- Steps:
- Clear mcporter cache (
~/.mcporter/)
- Clear local token file (
~/.mcp-hub/)
- Clear other auth cache files
- Start browser OAuth login
- Verify new auth works
- Sample dialogue:
User: "I'm getting 401"
Claude: Looks like an auth issue; re-authenticating...
[Run: npm run reauth]
Claude: Re-auth done; you can use the skill again.
User: "Re-login"
Claude: Clearing cache and re-logging in...
[Run: npm run login]
Usage Flow (for Agent Reasoning)
- Get current tools: ALWAYS run
aiusd-skill tools --detailed first to discover all available tools and their current schemas.
- Parse intent: Map natural language to the most appropriate tool. Check if newer tools better match the user's intent.
- Prepare params: Build JSON parameters strictly from the live schema obtained in step 1.
- Call: Invoke the skill's call interface with tool name and params.
- Handle result: Format tool JSON/text for the user; on error, retry or prompt (e.g. auth expired → prompt re-login).
tools --detailed for current schema.- Purpose: Return user trading accounts (addresses, etc.) per chain.
- When to use: User asks "my account", "trading account", "wallet address".
- Parameters: Check
tools --detailedfor current schema.
genalpha_execute_intent
- Purpose: Execute buy/sell/swap (e.g. buy SOL with USDC, sell ETH).
- When to use: User clearly wants to place order, buy, sell, swap.
- Parameters: Check
tools --detailed for current schema and XML examples.
- IMPORTANT: Intent format may change. Always use examples from live schema.
genalpha_stake_aiusd
- Purpose: Stake AIUSD for yield (e.g. sAIUSD).
- When to use: User says stake, stake AIUSD.
- Parameters: Check
tools --detailed for current schema.
genalpha_unstake_aiusd
- Purpose: Unstake AIUSD (e.g. redeem sAIUSD).
- When to use: User says unstake, redeem.
- Parameters: Check
tools --detailed for current schema.
genalpha_withdraw_to_wallet
- Purpose: Withdraw stablecoin (e.g. USDC) to user-specified external wallet address.
- When to use: User says withdraw, transfer out.
- Parameters: Check
tools --detailed for current schema.
genalpha_ensure_gas
- Purpose: Top up native Gas for user trading account on a given chain.
- When to use: User says top up gas, ensure gas, or chain has low gas.
- Parameters: Check
tools --detailed for current schema.
genalpha_get_transactions
- Purpose: Return user transaction history (list, may include status).
- When to use: User asks history, recent transactions, order status.
- Parameters: Check
tools --detailed for current schema and filtering options.
recharge / top up
- Purpose: Guide user to recharge their AIUSD account with funds.
- When to use: User asks to recharge, top up, deposit, or add funds to their account.
- Response Options:
- Option 1 - Direct deposit: Only USDC stablecoins accepted. Other stablecoins must use official website.
- Option 2 - Official website: https://aiusd.ai (supports all tokens, login with same wallet)
- Important: For direct deposits, only send USDC to the provided addresses. For other stablecoins (USDT, DAI, etc.), user must use the official website.
- Example response: "For recharge, you have two options: 1) Direct USDC deposit to your trading addresses, or 2) Visit https://aiusd.ai for all token types (login with same wallet). Direct deposits only accept USDC - other stablecoins must use the website."
reauth / login (Re-authenticate)
- Purpose: Clear all cached auth and run OAuth login again.
- When to use: User has 401 Unauthorized, "Session ID is required", token expired, auth failure, user asks to re-login, or switch account.
- Params: None. Pass
{}.
- Example:
npm run reauth
npm run login
node scripts/reauth.js
- Steps:
- Clear mcporter cache (
~/.mcporter/)
- Clear local token file (
~/.mcp-hub/)
- Clear other auth cache files
- Start browser OAuth login
- Verify new auth works
- Sample dialogue:
User: "I'm getting 401"
Claude: Looks like an auth issue; re-authenticating...
[Run: npm run reauth]
Claude: Re-auth done; you can use the skill again.
User: "Re-login"
Claude: Clearing cache and re-logging in...
[Run: npm run login]
Usage Flow (for Agent Reasoning)
- Get current tools: ALWAYS run
aiusd-skill tools --detailed first to discover all available tools and their current schemas.
- Parse intent: Map natural language to the most appropriate tool. Check if newer tools better match the user's intent.
- Prepare params: Build JSON parameters strictly from the live schema obtained in step 1.
- Call: Invoke the skill's call interface with tool name and params.
- Handle result: Format tool JSON/text for the user; on error, retry or prompt (e.g. auth expired → prompt re-login).
tools --detailed for current schema and XML examples.- Purpose: Stake AIUSD for yield (e.g. sAIUSD).
- When to use: User says stake, stake AIUSD.
- Parameters: Check
tools --detailedfor current schema.
genalpha_unstake_aiusd
- Purpose: Unstake AIUSD (e.g. redeem sAIUSD).
- When to use: User says unstake, redeem.
- Parameters: Check
tools --detailed for current schema.
genalpha_withdraw_to_wallet
- Purpose: Withdraw stablecoin (e.g. USDC) to user-specified external wallet address.
- When to use: User says withdraw, transfer out.
- Parameters: Check
tools --detailed for current schema.
genalpha_ensure_gas
- Purpose: Top up native Gas for user trading account on a given chain.
- When to use: User says top up gas, ensure gas, or chain has low gas.
- Parameters: Check
tools --detailed for current schema.
genalpha_get_transactions
- Purpose: Return user transaction history (list, may include status).
- When to use: User asks history, recent transactions, order status.
- Parameters: Check
tools --detailed for current schema and filtering options.
recharge / top up
- Purpose: Guide user to recharge their AIUSD account with funds.
- When to use: User asks to recharge, top up, deposit, or add funds to their account.
- Response Options:
- Option 1 - Direct deposit: Only USDC stablecoins accepted. Other stablecoins must use official website.
- Option 2 - Official website: https://aiusd.ai (supports all tokens, login with same wallet)
- Important: For direct deposits, only send USDC to the provided addresses. For other stablecoins (USDT, DAI, etc.), user must use the official website.
- Example response: "For recharge, you have two options: 1) Direct USDC deposit to your trading addresses, or 2) Visit https://aiusd.ai for all token types (login with same wallet). Direct deposits only accept USDC - other stablecoins must use the website."
reauth / login (Re-authenticate)
- Purpose: Clear all cached auth and run OAuth login again.
- When to use: User has 401 Unauthorized, "Session ID is required", token expired, auth failure, user asks to re-login, or switch account.
- Params: None. Pass
{}.
- Example:
npm run reauth
npm run login
node scripts/reauth.js
- Steps:
- Clear mcporter cache (
~/.mcporter/)
- Clear local token file (
~/.mcp-hub/)
- Clear other auth cache files
- Start browser OAuth login
- Verify new auth works
- Sample dialogue:
User: "I'm getting 401"
Claude: Looks like an auth issue; re-authenticating...
[Run: npm run reauth]
Claude: Re-auth done; you can use the skill again.
User: "Re-login"
Claude: Clearing cache and re-logging in...
[Run: npm run login]
Usage Flow (for Agent Reasoning)
- Get current tools: ALWAYS run
aiusd-skill tools --detailed first to discover all available tools and their current schemas.
- Parse intent: Map natural language to the most appropriate tool. Check if newer tools better match the user's intent.
- Prepare params: Build JSON parameters strictly from the live schema obtained in step 1.
- Call: Invoke the skill's call interface with tool name and params.
- Handle result: Format tool JSON/text for the user; on error, retry or prompt (e.g. auth expired → prompt re-login).
tools --detailed for current schema.- Purpose: Withdraw stablecoin (e.g. USDC) to user-specified external wallet address.
- When to use: User says withdraw, transfer out.
- Parameters: Check
tools --detailedfor current schema.
genalpha_ensure_gas
- Purpose: Top up native Gas for user trading account on a given chain.
- When to use: User says top up gas, ensure gas, or chain has low gas.
- Parameters: Check
tools --detailed for current schema.
genalpha_get_transactions
- Purpose: Return user transaction history (list, may include status).
- When to use: User asks history, recent transactions, order status.
- Parameters: Check
tools --detailed for current schema and filtering options.
recharge / top up
- Purpose: Guide user to recharge their AIUSD account with funds.
- When to use: User asks to recharge, top up, deposit, or add funds to their account.
- Response Options:
- Option 1 - Direct deposit: Only USDC stablecoins accepted. Other stablecoins must use official website.
- Option 2 - Official website: https://aiusd.ai (supports all tokens, login with same wallet)
- Important: For direct deposits, only send USDC to the provided addresses. For other stablecoins (USDT, DAI, etc.), user must use the official website.
- Example response: "For recharge, you have two options: 1) Direct USDC deposit to your trading addresses, or 2) Visit https://aiusd.ai for all token types (login with same wallet). Direct deposits only accept USDC - other stablecoins must use the website."
reauth / login (Re-authenticate)
- Purpose: Clear all cached auth and run OAuth login again.
- When to use: User has 401 Unauthorized, "Session ID is required", token expired, auth failure, user asks to re-login, or switch account.
- Params: None. Pass
{}.
- Example:
npm run reauth
npm run login
node scripts/reauth.js
- Steps:
- Clear mcporter cache (
~/.mcporter/)
- Clear local token file (
~/.mcp-hub/)
- Clear other auth cache files
- Start browser OAuth login
- Verify new auth works
- Sample dialogue:
User: "I'm getting 401"
Claude: Looks like an auth issue; re-authenticating...
[Run: npm run reauth]
Claude: Re-auth done; you can use the skill again.
User: "Re-login"
Claude: Clearing cache and re-logging in...
[Run: npm run login]
Usage Flow (for Agent Reasoning)
- Get current tools: ALWAYS run
aiusd-skill tools --detailed first to discover all available tools and their current schemas.
- Parse intent: Map natural language to the most appropriate tool. Check if newer tools better match the user's intent.
- Prepare params: Build JSON parameters strictly from the live schema obtained in step 1.
- Call: Invoke the skill's call interface with tool name and params.
- Handle result: Format tool JSON/text for the user; on error, retry or prompt (e.g. auth expired → prompt re-login).
tools --detailed for current schema.- Purpose: Return user transaction history (list, may include status).
- When to use: User asks history, recent transactions, order status.
- Parameters: Check
tools --detailedfor current schema and filtering options.
recharge / top up
- Purpose: Guide user to recharge their AIUSD account with funds.
- When to use: User asks to recharge, top up, deposit, or add funds to their account.
- Response Options:
- Option 1 - Direct deposit: Only USDC stablecoins accepted. Other stablecoins must use official website.
- Option 2 - Official website: https://aiusd.ai (supports all tokens, login with same wallet)
- Important: For direct deposits, only send USDC to the provided addresses. For other stablecoins (USDT, DAI, etc.), user must use the official website.
- Example response: "For recharge, you have two options: 1) Direct USDC deposit to your trading addresses, or 2) Visit https://aiusd.ai for all token types (login with same wallet). Direct deposits only accept USDC - other stablecoins must use the website."
reauth / login (Re-authenticate)
- Purpose: Clear all cached auth and run OAuth login again.
- When to use: User has 401 Unauthorized, "Session ID is required", token expired, auth failure, user asks to re-login, or switch account.
- Params: None. Pass
{}.
- Example:
npm run reauth
npm run login
node scripts/reauth.js
- Steps:
- Clear mcporter cache (
~/.mcporter/)
- Clear local token file (
~/.mcp-hub/)
- Clear other auth cache files
- Start browser OAuth login
- Verify new auth works
- Sample dialogue:
User: "I'm getting 401"
Claude: Looks like an auth issue; re-authenticating...
[Run: npm run reauth]
Claude: Re-auth done; you can use the skill again.
User: "Re-login"
Claude: Clearing cache and re-logging in...
[Run: npm run login]
Usage Flow (for Agent Reasoning)
- Get current tools: ALWAYS run
aiusd-skill tools --detailed first to discover all available tools and their current schemas.
- Parse intent: Map natural language to the most appropriate tool. Check if newer tools better match the user's intent.
- Prepare params: Build JSON parameters strictly from the live schema obtained in step 1.
- Call: Invoke the skill's call interface with tool name and params.
- Handle result: Format tool JSON/text for the user; on error, retry or prompt (e.g. auth expired → prompt re-login).
- Option 1 - Direct deposit: Only USDC stablecoins accepted. Other stablecoins must use official website.
- Option 2 - Official website: https://aiusd.ai (supports all tokens, login with same wallet)
- Purpose: Clear all cached auth and run OAuth login again.
- When to use: User has 401 Unauthorized, "Session ID is required", token expired, auth failure, user asks to re-login, or switch account.
- Params: None. Pass
{}. - Example:
npm run reauthnpm run loginnode scripts/reauth.js
- Steps:
- Clear mcporter cache (
~/.mcporter/) - Clear local token file (
~/.mcp-hub/) - Clear other auth cache files
- Start browser OAuth login
- Verify new auth works
- Clear mcporter cache (
- Sample dialogue:
User: "I'm getting 401" Claude: Looks like an auth issue; re-authenticating... [Run: npm run reauth] Claude: Re-auth done; you can use the skill again. User: "Re-login" Claude: Clearing cache and re-logging in... [Run: npm run login]
Usage Flow (for Agent Reasoning)
- Get current tools: ALWAYS run
aiusd-skill tools --detailed first to discover all available tools and their current schemas.
- Parse intent: Map natural language to the most appropriate tool. Check if newer tools better match the user's intent.
- Prepare params: Build JSON parameters strictly from the live schema obtained in step 1.
- Call: Invoke the skill's call interface with tool name and params.
- Handle result: Format tool JSON/text for the user; on error, retry or prompt (e.g. auth expired → prompt re-login).
aiusd-skill tools --detailed first to discover all available tools and their current schemas.CRITICAL: Never use parameter examples from this documentation. Always use the live schema from tools --detailed.
Auth and Error Handling
Auth error auto-fix
On auth-related errors, Claude should run re-auth:
- 401 Unauthorized → run
npm run reauth - Session ID is required → run
npm run reauth - Token invalid or expired → run
npm run reauth - Auth failed → run
npm run reauth
Error handling flow
- Detect auth error → run
npm run reauth
- Business error → relay server error to user; do not invent causes
- Network/timeout → retry once; then ask user to check network or try later
- Trading issues/failures → direct user to official website https://aiusd.ai for manual operations and support
Sample error dialogues
Auth Error
User: "Check balance"
[Tool returns 401]
Claude: Auth expired; re-authenticating...
[Run: npm run reauth]
Claude: Re-auth done. Fetching balance...
[Call: genalpha_get_balances]
Trading Error
npm run reauthAuth Error
User: "Check balance"
[Tool returns 401]
Claude: Auth expired; re-authenticating...
[Run: npm run reauth]
Claude: Re-auth done. Fetching balance...
[Call: genalpha_get_balances]
User: "Buy 100 USDC worth of SOL"
[Tool returns trading error]
Claude: I encountered an issue with the trade execution. For manual trading operations, please visit https://aiusd.ai and use the same wallet you use for authentication.
Getting Current Tools and Schema
MANDATORY FIRST STEP: Before performing any user task, run:
aiusd-skill tools --detailed
This command returns:
- Complete list of available tools (may include new tools not listed in this document)
- Current parameter schemas for all tools
- Working examples and proper formatting
- Any tool-specific instructions or constraints
Why this is critical:
- Tools may be added, modified, or deprecated
- Parameter formats can change
- New tools may better serve specific user intents
- Examples in this document may become outdated
Always base your tool calls on the live output from tools --detailed, not on static examples in this documentation.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。