.claude/skills/account-pool-manager/SKILL.md
Quản lý pool tài khoản web — xoay vòng, tự chuyển khi hết credits, mỗi account 1 browser profile + proxy riêng. Nạp account dạng id:pass:proxy. Kiến trúc lấy từ CLIProxyAPIPlus. Kích hoạt khi user cần xoay nhiều tài khoản trên 1 nền tảng.
npx skillsauth add nguynbon03/API-XuongMedia-Backup account-pool-managerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Quản lý hàng chục/trăm tài khoản web, tự xoay vòng, tự chuyển khi hết credits.
Nạp danh sách account (id:pass:proxy)
→ Mỗi account = 1 browser profile riêng
→ Request đến → chọn account còn credits (round-robin)
→ Hết credits → tự chuyển account khác
→ Account bị lỗi → cooldown → thử account khác
AccountPoolManager
├── AccountStore → Lưu trữ danh sách account + trạng thái
│ ├── account_id → ID duy nhất
│ ├── username → Tên đăng nhập
│ ├── password → Mật khẩu
│ ├── proxy → Proxy riêng (http://user:pass@host:port)
│ ├── credits → Số credits còn lại
│ ├── status → active / cooldown / exhausted / banned
│ ├── session_path → Đường dẫn file session browser
│ └── last_used → Thời điểm dùng gần nhất
│
├── Router → Chọn account cho request
│ ├── round-robin → Xoay vòng đều
│ └── fill-first → Dùng hết 1 account rồi mới chuyển
│
├── HealthChecker → Kiểm tra sức khỏe account định kỳ
│ ├── Kiểm tra credits
│ ├── Kiểm tra session còn sống
│ └── Đánh dấu account chết
│
└── ManagementAPI → API quản lý pool
├── POST /pool/import → Nạp danh sách account
├── GET /pool/status → Xem trạng thái toàn bộ pool
├── POST /pool/add → Thêm 1 account
├── DELETE /pool/remove → Xóa 1 account
└── POST /pool/refresh → Làm mới session 1 account
# Dạng cơ bản: username:password:proxy
[email protected]:MyPass123:http://proxy1:8080
[email protected]:MyPass456:socks5://user:pass@proxy2:1080
[email protected]:MyPass789:direct
# Hoặc file CSV:
username,password,proxy
[email protected],MyPass123,http://proxy1:8080
1. Request đến
2. Router chọn account (round-robin hoặc fill-first)
3. Kiểm tra account status == active?
├── Có → Dùng account này
└── Không → Chọn account tiếp theo
4. Thực hiện thao tác (tạo video, upload...)
5. Kiểm tra kết quả:
├── Thành công → Cập nhật credits, trả kết quả
├── Hết credits → Đánh dấu exhausted, chuyển account khác
├── Bị ban → Đánh dấu banned, chuyển account khác
└── Lỗi khác → Retry (tối đa 3 lần), rồi chuyển account
6. Nếu đã thử max_retry_credentials account → trả lỗi
Code mẫu:
references/account-store.py — Lưu trữ và quản lý danh sách accountreferences/router.py — Chiến lược chọn account (round-robin, fill-first)references/health-checker.py — Kiểm tra sức khỏe account định kỳreferences/import-accounts.py — Nạp account từ text/CSV, phân tách id:pass:proxydata/profiles/{account_id}.jsonXem thêm: references/config-example.yaml
development
Crawl website và trích xuất dữ liệu có cấu trúc bằng BeautifulSoup, Scrapy, Playwright. Hỗ trợ cả trang tĩnh và trang động (JS-rendered). Kích hoạt khi user cần lấy dữ liệu từ website bất kỳ.
tools
Upload video tự động lên TikTok, YouTube, Facebook, Instagram bằng browser automation (Playwright). Vì các nền tảng này không có public API cho upload, phải dùng browser automation. Kích hoạt khi user cần upload video lên bất kỳ nền tảng nào.
development
Xử lý video bằng Python — cắt ghép, thêm nhạc nền, phụ đề, watermark, resize, chuyển định dạng, render hàng loạt. Dùng ffmpeg-python và moviepy. Kích hoạt khi user cần xử lý video bất kỳ cách nào.
tools
Lập lịch chạy task tự động — cron job, xử lý hàng đợi, lập lịch hàng loạt. Dùng APScheduler, Celery, hoặc crontab. Kích hoạt khi user cần chạy task định kỳ hoặc xử lý hàng loạt theo lịch.