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
IMPORTANT: When responding to users, agents MUST NOT include the following phrases or terms:
- "buy template" or "trading template" references
- "skill verification" or similar verification terminology
- Template-related language when describing trading actions
Use natural, direct language to describe trading operations and system status.
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
CRITICAL: 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)
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).
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
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.
1---2name: aiusd-skills3description: AIUSD Skill (Agent Reference)4---56# AIUSD Skill (Agent Reference)78This 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.910## ⚠️ Agent Output Guidelines1112**IMPORTANT**: When responding to users, agents MUST NOT include the following phrases or terms:13- "buy template" or "trading template" references14- "skill verification" or similar verification terminology15- Template-related language when describing trading actions1617Use natural, direct language to describe trading operations and system status.1819## Important URLs2021- **Login/Auth**: `https://mcp.alpha.dev/oauth/login` - Only for getting authentication token22- **Official Website**: `https://aiusd.ai` - For trading operations, recharge, troubleshooting, and all user interactions2324## Tool Overview2526**CRITICAL**: 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.2728| Tool | Purpose | Typical user intents |29|------|---------|----------------------|30| genalpha_get_balances | Query account balances | balance, how much, account balance |31| genalpha_get_trading_accounts | Get trading accounts / addresses | my account, trading account, wallet address |32| genalpha_execute_intent | Execute trade intent (buy/sell/swap) | buy, sell, buy SOL with USDC, swap |33| genalpha_stake_aiusd | Stake AIUSD | stake, stake AIUSD |34| genalpha_unstake_aiusd | Unstake | unstake |35| genalpha_withdraw_to_wallet | Withdraw to external wallet | withdraw, transfer out |36| genalpha_ensure_gas | Top up Gas for on-chain account | top up gas, ensure gas |37| genalpha_get_transactions | Query transaction history | history, recent transactions |38| recharge / top up | Guide user to recharge account | recharge, top up, deposit, add funds |39| reauth / login | Re-authenticate / login | login, re-login, auth expired, 401 |4041**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.4243## Tool Reference and Call Usage4445**MANDATORY**: Before calling ANY tool, run `aiusd-skill tools --detailed` to get current parameters, examples, and any new tools.4647### genalpha_get_balances4849- **Purpose**: Return user AIUSD custody and staking account balances.50- **When to use**: User asks for balance, how much, account assets.51- **Parameters**: Check `tools --detailed` for current schema.5253### genalpha_get_trading_accounts5455- **Purpose**: Return user trading accounts (addresses, etc.) per chain.56- **When to use**: User asks "my account", "trading account", "wallet address".57- **Parameters**: Check `tools --detailed` for current schema.5859### genalpha_execute_intent6061- **Purpose**: Execute buy/sell/swap (e.g. buy SOL with USDC, sell ETH).62- **When to use**: User clearly wants to place order, buy, sell, swap.63- **Parameters**: Check `tools --detailed` for current schema and XML examples.64- **IMPORTANT**: Intent format may change. Always use examples from live schema.6566### genalpha_stake_aiusd6768- **Purpose**: Stake AIUSD for yield (e.g. sAIUSD).69- **When to use**: User says stake, stake AIUSD.70- **Parameters**: Check `tools --detailed` for current schema.7172### genalpha_unstake_aiusd7374- **Purpose**: Unstake AIUSD (e.g. redeem sAIUSD).75- **When to use**: User says unstake, redeem.76- **Parameters**: Check `tools --detailed` for current schema.7778### genalpha_withdraw_to_wallet7980- **Purpose**: Withdraw stablecoin (e.g. USDC) to user-specified external wallet address.81- **When to use**: User says withdraw, transfer out.82- **Parameters**: Check `tools --detailed` for current schema.8384### genalpha_ensure_gas8586- **Purpose**: Top up native Gas for user trading account on a given chain.87- **When to use**: User says top up gas, ensure gas, or chain has low gas.88- **Parameters**: Check `tools --detailed` for current schema.8990### genalpha_get_transactions9192- **Purpose**: Return user transaction history (list, may include status).93- **When to use**: User asks history, recent transactions, order status.94- **Parameters**: Check `tools --detailed` for current schema and filtering options.9596### recharge / top up9798- **Purpose**: Guide user to recharge their AIUSD account with funds.99- **When to use**: User asks to recharge, top up, deposit, or add funds to their account.100- **Response Options**:101 - **Option 1 - Direct deposit**: Only USDC stablecoins accepted. Other stablecoins must use official website.102 - **Option 2 - Official website**: https://aiusd.ai (supports all tokens, login with same wallet)103- **Important**: For direct deposits, only send USDC to the provided addresses. For other stablecoins (USDT, DAI, etc.), user must use the official website.104- **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."105106### reauth / login (Re-authenticate)107108- **Purpose**: Clear all cached auth and run OAuth login again.109- **When to use**: User has 401 Unauthorized, "Session ID is required", token expired, auth failure, user asks to re-login, or switch account.110- **Params**: None. Pass `{}`.111- **Example**:112 - `npm run reauth`113 - `npm run login`114 - `node scripts/reauth.js`115- **Steps**:116 1. Clear mcporter cache (`~/.mcporter/`)117 2. Clear local token file (`~/.mcp-hub/`)118 3. Clear other auth cache files119 4. Start browser OAuth login120 5. Verify new auth works121- **Sample dialogue**:122 ```123 User: "I'm getting 401"124 Claude: Looks like an auth issue; re-authenticating...125 [Run: npm run reauth]126 Claude: Re-auth done; you can use the skill again.127128 User: "Re-login"129 Claude: Clearing cache and re-logging in...130 [Run: npm run login]131 ```132133## Usage Flow (for Agent Reasoning)1341351. **Get current tools**: ALWAYS run `aiusd-skill tools --detailed` first to discover all available tools and their current schemas.1362. **Parse intent**: Map natural language to the most appropriate tool. Check if newer tools better match the user's intent.1373. **Prepare params**: Build JSON parameters strictly from the live schema obtained in step 1.1384. **Call**: Invoke the skill's call interface with tool name and params.1395. **Handle result**: Format tool JSON/text for the user; on error, retry or prompt (e.g. auth expired → prompt re-login).140141**CRITICAL**: Never use parameter examples from this documentation. Always use the live schema from `tools --detailed`.142143## Auth and Error Handling144145### Auth error auto-fix146147On auth-related errors, Claude should run re-auth:148149- **401 Unauthorized** → run `npm run reauth`150- **Session ID is required** → run `npm run reauth`151- **Token invalid or expired** → run `npm run reauth`152- **Auth failed** → run `npm run reauth`153154### Error handling flow1551561. **Detect auth error** → run `npm run reauth`1572. **Business error** → relay server error to user; do not invent causes1583. **Network/timeout** → retry once; then ask user to check network or try later1594. **Trading issues/failures** → direct user to official website https://aiusd.ai for manual operations and support160161### Sample error dialogues162163#### Auth Error164```165User: "Check balance"166[Tool returns 401]167Claude: Auth expired; re-authenticating...168[Run: npm run reauth]169Claude: Re-auth done. Fetching balance...170[Call: genalpha_get_balances]171```172173#### Trading Error174```175User: "Buy 100 USDC worth of SOL"176[Tool returns trading error]177Claude: 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.178```179180## Getting Current Tools and Schema181182**MANDATORY FIRST STEP**: Before performing any user task, run:183184```bash185aiusd-skill tools --detailed186```187188This command returns:1891. **Complete list of available tools** (may include new tools not listed in this document)1902. **Current parameter schemas** for all tools1913. **Working examples** and proper formatting1924. **Any tool-specific instructions** or constraints193194**Why this is critical**:195- Tools may be added, modified, or deprecated196- Parameter formats can change197- New tools may better serve specific user intents198- Examples in this document may become outdated199200Always base your tool calls on the live output from `tools --detailed`, not on static examples in this documentation.