Bank System Skill
Overview
This skill provides bank account management functions, including user registration, login authentication, balance inquiry, money transfer, transfer records query and account information management.
Scripts
register.sh
Create new user account.
user_id (string, required): User ID
password (string, required): Password
name (string, optional): Display name
login.sh
Verify user credentials.
user_id (string, required): User ID
password (string, required): Password
get_user_info.sh
Get detailed user information.
user_id (string, required): User ID
get_balance.sh
Query current account balance.
user_id (string, required): User ID
transfer.sh
Transfer money to specified account.
from_user_id (string, required): Sender user ID
to_name (string, required): Recipient name
to_bank_card (string, required): Recipient bank card number
amount (number, required): Transfer amount
description (string, optional): Transfer description
get_transfer_records.sh
Get transfer records for a user (both sent and received).
user_id (string, required): User ID
limit (number, optional): Maximum number of records to return, default 20
offset (number, optional): Number of records to skip, default 0
Usage
# Register user
./scripts/register.sh "user123" "password" "Test User"
# Login
./scripts/login.sh "user123" "password"
# Get user info
./scripts/get_user_info.sh "zhangsan"
# Get balance
./scripts/get_balance.sh "zhangsan"
# Transfer
./scripts/transfer.sh "zhangsan" "Li Si" "6217002345678901234" 1000 "Test transfer"
# Get transfer records
./scripts/get_transfer_records.sh "zhangsan"
./scripts/get_transfer_records.sh "zhangsan" 10 0
Return Format
Success Response
{
"success": true,
"data": { ... },
"message": "Operation successful"
}
Error Response
{
"success": false,
"error": "Error message",
"message": "Operation failed"
}
Script-specific Response Data
register.sh
- Success:
data contains the created user object:{
"uuid": "user_1234567890_abc123",
"user_id": "user123",
"password": "password",
"name": "Test User",
"email": "user123@example.com",
"phone": "",
"address": "",
"bank_card": "",
"id_card": "",
"gender": "",
"birthday": "",
"balance": 0.0,
"created_at": "2025-04-01T12:00:00",
"updated_at": "2025-04-01T12:00:00",
"status": "active"
}
login.sh
get_user_info.sh
- Success:
data contains the full user object:{
"uuid": "user_1234567890_abc123",
"user_id": "zhangsan",
"name": "Zhang San",
"email": "zhangsan@example.com",
"phone": "13800138000",
"address": "Beijing",
"bank_card": "6217002345678901234",
"balance": 1000.0,
"created_at": "2025-04-01T12:00:00",
"status": "active"
}
get_balance.sh
- Success:
data contains balance:{
"balance": 1000.0
}
transfer.sh
get_transfer_records.sh
- Success:
data contains transfer records with pagination info:{
"records": [
{
"transaction_id": "txn_1712345678901_abc12345",
"from_user_id": "zhangsan",
"from_name": "Zhang San",
"from_bank_card": "6217001234567890123",
"to_name": "Li Si",
"to_bank_card": "6217002345678901234",
"amount": 1000.0,
"description": "Test transfer",
"status": "completed",
"created_at": "2025-04-01T12:00:00",
"direction": "outgoing"
}
],
"total": 15,
"limit": 20,
"offset": 0
}
direction: "outgoing" for sent transfers, "incoming" for received transfers
1---2name: bank-system-1-0-03description: Bank System Skill4---56# Bank System Skill78## Overview910This skill provides bank account management functions, including user registration, login authentication, balance inquiry, money transfer, transfer records query and account information management.1112## Scripts1314### register.sh15Create new user account.16- `user_id` (string, required): User ID17- `password` (string, required): Password18- `name` (string, optional): Display name1920### login.sh21Verify user credentials.22- `user_id` (string, required): User ID23- `password` (string, required): Password2425### get_user_info.sh26Get detailed user information.27- `user_id` (string, required): User ID2829### get_balance.sh30Query current account balance.31- `user_id` (string, required): User ID3233### transfer.sh34Transfer money to specified account.35- `from_user_id` (string, required): Sender user ID36- `to_name` (string, required): Recipient name37- `to_bank_card` (string, required): Recipient bank card number38- `amount` (number, required): Transfer amount39- `description` (string, optional): Transfer description4041### get_transfer_records.sh42Get transfer records for a user (both sent and received).43- `user_id` (string, required): User ID44- `limit` (number, optional): Maximum number of records to return, default 2045- `offset` (number, optional): Number of records to skip, default 04647## Usage4849```bash50# Register user51./scripts/register.sh "user123" "password" "Test User"5253# Login54./scripts/login.sh "user123" "password"5556# Get user info57./scripts/get_user_info.sh "zhangsan"5859# Get balance60./scripts/get_balance.sh "zhangsan"6162# Transfer63./scripts/transfer.sh "zhangsan" "Li Si" "6217002345678901234" 1000 "Test transfer"6465# Get transfer records66./scripts/get_transfer_records.sh "zhangsan"67./scripts/get_transfer_records.sh "zhangsan" 10 068```6970## Return Format7172### Success Response7374```json75{76 "success": true,77 "data": { ... },78 "message": "Operation successful"79}80```8182### Error Response8384```json85{86 "success": false,87 "error": "Error message",88 "message": "Operation failed"89}90```9192### Script-specific Response Data9394#### register.sh95- **Success**: `data` contains the created user object:96 ```json97 {98 "uuid": "user_1234567890_abc123",99 "user_id": "user123",100 "password": "password",101 "name": "Test User",102 "email": "user123@example.com",103 "phone": "",104 "address": "",105 "bank_card": "",106 "id_card": "",107 "gender": "",108 "birthday": "",109 "balance": 0.0,110 "created_at": "2025-04-01T12:00:00",111 "updated_at": "2025-04-01T12:00:00",112 "status": "active"113 }114 ```115116#### login.sh117- **Success**: `data` contains session and user info:118 ```json119 {120 "session_id": "uuid-string",121 "user": { ...user object... }122 }123 ```124125#### get_user_info.sh126- **Success**: `data` contains the full user object:127 ```json128 {129 "uuid": "user_1234567890_abc123",130 "user_id": "zhangsan",131 "name": "Zhang San",132 "email": "zhangsan@example.com",133 "phone": "13800138000",134 "address": "Beijing",135 "bank_card": "6217002345678901234",136 "balance": 1000.0,137 "created_at": "2025-04-01T12:00:00",138 "status": "active"139 }140 ```141142#### get_balance.sh143- **Success**: `data` contains balance:144 ```json145 {146 "balance": 1000.0147 }148 ```149150#### transfer.sh151- **Success**: `data` contains sender's remaining balance and transaction ID:152 ```json153 {154 "from_balance": 500.0,155 "transaction_id": "txn_1712345678901_abc12345"156 }157 ```158159#### get_transfer_records.sh160- **Success**: `data` contains transfer records with pagination info:161 ```json162 {163 "records": [164 {165 "transaction_id": "txn_1712345678901_abc12345",166 "from_user_id": "zhangsan",167 "from_name": "Zhang San",168 "from_bank_card": "6217001234567890123",169 "to_name": "Li Si",170 "to_bank_card": "6217002345678901234",171 "amount": 1000.0,172 "description": "Test transfer",173 "status": "completed",174 "created_at": "2025-04-01T12:00:00",175 "direction": "outgoing"176 }177 ],178 "total": 15,179 "limit": 20,180 "offset": 0181 }182 ```183 - `direction`: "outgoing" for sent transfers, "incoming" for received transfers