| name | bank_system |
| description | Bank account management system - Provides user registration, login authentication, balance inquiry, money transfer, transfer records query and account management functions |
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
./scripts/register.sh "user123" "password" "Test User"
./scripts/login.sh "user123" "password"
./scripts/get_user_info.sh "zhangsan"
./scripts/get_balance.sh "zhangsan"
./scripts/transfer.sh "zhangsan" "Li Si" "6217002345678901234" 1000 "Test transfer"
./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"
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":