← Back to list
🛠️

sub2api-admin

Manage Sub2API admin APIs for accounts, redeem codes, groups, proxies, error passthrough rules, TLS
🛠️ Developer Tools skills By Wei-Shaw Version v1.0.874e1b3 Added 2026-12-04 Updated 2026-12-04 Source ↗
7.9Overall rating
0Views
0Downloads
0Stars

Installation

🤖 Install via AI

Copy the prompt below and send it to your AI assistant (e.g. Claude Code) — it will follow the instructions and install automatically.

Install the "sub2api-admin" skill by following the instructions at https://skill123.me/install/sub2api-admin?ref=detail
⌨️ Command line install

Run in your terminal — downloads and installs to ~/.claude/skills/.

curl -fsSL https://skill123.me/install/sub2api-admin.sh?ref=detail | bash
📦 Download ZIP

Download the zip and extract it into your skills directory (e.g. ~/.claude/skills/), then restart your session.

⬇ Download v1.0.874e1b3 · 16.8 MB
📊 Static rating
7.9/10
Trigger
8.0
Structure
7.0
Workflow
8.5
Content
8.5
Engineering
6.0
Security
8.5

Six-dimension rubric with reviewer rationale.

View scorecard ↓
🛡 Dynamic test
—

Not live-tested yet — this skill is rated on static analysis only.

About this skill

Manage Sub2API admin APIs for accounts, redeem codes, groups, proxies, error passthrough rules, TLS fingerprint profiles, imports, exports, batch updates, and raw administrator API calls. Use when the user mentions Sub2API, admin API keys, account management, redeem code management, recharge codes, invitation codes, bulk account import/export, keeping or deleting accounts, refreshing accounts, clearing errors, CRS sync, or managing Sub2API backend settings through the admin API.

Sub2API Admin

Use the bundled CLI instead of ad hoc curl. Run examples from this skill directory.


export SUB2API_BASE_URL='https://your-sub2api-host'
export SUB2API_ADMIN_API_KEY='<admin api key>'
# Or, when the deployment uses admin JWT login instead of an admin API key:
# export SUB2API_JWT='<admin access_token>'
node scripts/sub2api-admin.js accounts list

For all commands and payload examples, read references/admin-cli.md (references/admin-cli.md).

Documentation

Manage Sub2API admin APIs for accounts, redeem codes, groups, proxies, error passthrough rules, TLS fingerprint profiles, imports, exports, batch updates, and raw administrator API calls. Use when the user mentions Sub2API, admin API keys, account management, redeem code management, recharge codes, invitation codes, bulk account import/export, keeping or deleting accounts, refreshing accounts, clearing errors, CRS sync, or managing Sub2API backend settings through the admin API.

Sub2API Admin

Use the bundled CLI instead of ad hoc curl. Run examples from this skill directory.


export SUB2API_BASE_URL='https://your-sub2api-host'
export SUB2API_ADMIN_API_KEY='<admin api key>'
# Or, when the deployment uses admin JWT login instead of an admin API key:
# export SUB2API_JWT='<admin access_token>'
node scripts/sub2api-admin.js accounts list

For all commands and payload examples, read references/admin-cli.md (references/admin-cli.md).

Workflow

1. Reuse SUB2API_BASE_URL and either SUB2API_ADMIN_API_KEY or SUB2API_JWT from the environment.

2. Run read-only commands first: accounts list, accounts get <id>, groups all, or proxies all.

3. Before destructive or bulk writes, print the target account names and IDs.

4. Execute the write command only after the target set is clear.

5. Run a follow-up read command to verify the result.

Common Commands


node scripts/sub2api-admin.js accounts list --page-size 20
node scripts/sub2api-admin.js accounts get 40
node scripts/sub2api-admin.js accounts usage 40
node scripts/sub2api-admin.js accounts set-schedulable 40 true
node scripts/sub2api-admin.js accounts bulk-update --ids 40,39 --json '{"concurrency":10}'
node scripts/sub2api-admin.js redeem-codes list --page-size 20
node scripts/sub2api-admin.js redeem-codes generate --json '{"count":1,"type":"balance","value":10}' --idempotency-key redeem-$(date +%s)
node scripts/sub2api-admin.js redeem-codes create-and-redeem --json '{"code":"order_123","type":"balance","value":10,"user_id":123}' --idempotency-key order-123
node scripts/sub2api-admin.js error-rules list
node scripts/sub2api-admin.js tls-profiles list

Safety Notes

  • Authentication uses x-api-key from SUB2API_ADMIN_API_KEY first, then falls back to Authorization: Bearer <jwt> from SUB2API_JWT.
  • If the API returns INVALID_ADMIN_KEY, ask the user to regenerate the admin API key. If using JWT, log in as an admin user and copy the access_token from POST /api/v1/auth/login.
  • accounts export includes credentials and tokens. Prefer --file and avoid printing exports in chat.
  • Redeem code create/redeem commands should use --idempotency-key for payment or recharge workflows.
  • For uncertain or newly added backend APIs, use api <METHOD> <admin-path> after a read-only check.

Score breakdown

Trigger
8.0
Trigger 8/10 — Rich trigger coverage and a well-guarded destructive-op workflow (read-first, print targets, verify) with concrete CLI commands. references/admin-cli.md and scripts/sub2api-admin.js are absent; credential handling is legitimately scoped via env vars with warnings against leaking exports.
Structure
7.0
Structure 7/10
Workflow
8.5
Workflow 8.5/10
Content
8.5
Content 8.5/10
Engineering
6.0
Engineering 6/10
Security
8.5
Security 8.5/10
Rich trigger coverage and a well-guarded destructive-op workflow (read-first, print targets, verify) with concrete CLI commands. references/admin-cli.md and scripts/sub2api-admin.js are absent; credential handling is legitimately scoped via env vars with warnings against leaking exports.

Assessment methodology

⏳
Assessment in progress
This skill has not been assessed yet — use with caution.

Version history

v1.0.874e1b3 2026-12-04
16.8 MB

— Imported from GitHub Wei-Shaw/sub2api/skills/sub2api-admin@874e1b3