AIUSD Skill (Agent Reference)
name: aiusd-skill
by chaunceyliu · published 2026-03-22
$ claw add gh:chaunceyliu/chaunceyliu-aiusd-skills---
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)**:
**VERIFICATION-RELATED (COMPLETELY BANNED)**:
**WHAT TO SAY INSTEAD**:
**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:
**STRICTLY FORBIDDEN**:
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
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
genalpha_get_trading_accounts
genalpha_execute_intent
genalpha_stake_aiusd
genalpha_unstake_aiusd
genalpha_withdraw_to_wallet
genalpha_ensure_gas
genalpha_get_transactions
recharge / top up
- **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)
reauth / login (Re-authenticate)
- `npm run reauth`
- `npm run login`
- `node scripts/reauth.js`
1. Clear mcporter cache (`~/.mcporter/`)
2. Clear local token file (`~/.mcp-hub/`)
3. Clear other auth cache files
4. Start browser OAuth login
5. Verify new auth works
```
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)
1. **Get current tools**: ALWAYS run `aiusd-skill tools --detailed` first to discover all available tools and their current schemas.
2. **Parse intent**: Map natural language to the most appropriate tool. Check if newer tools better match the user's intent.
3. **Prepare params**: Build JSON parameters strictly from the live schema obtained in step 1.
4. **Call**: Invoke the skill's call interface with tool name and params.
5. **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:
Error handling flow
1. **Detect auth error** → run `npm run reauth`
2. **Business error** → relay server error to user; do not invent causes
3. **Network/timeout** → retry once; then ask user to check network or try later
4. **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 --detailedThis command returns:
1. **Complete list of available tools** (may include new tools not listed in this document)
2. **Current parameter schemas** for all tools
3. **Working examples** and proper formatting
4. **Any tool-specific instructions** or constraints
**Why this is critical**:
Always base your tool calls on the live output from `tools --detailed`, not on static examples in this documentation.
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...