sub2api-admin

star 0

Manage Sub2API admin APIs for accounts, 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, bulk account import/export, keeping or deleting accounts, refreshing accounts, clearing errors, CRS sync, or managing Sub2API backend settings through the admin API.

541968679 By 541968679 schedule Updated 6/7/2026

name: sub2api-admin description: Manage Sub2API admin APIs for accounts, 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, 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.

export SUB2API_BASE_URL='https://your-sub2api-host'
export SUB2API_ADMIN_API_KEY='<admin api key>'

node ~/.codex/skills/sub2api-admin/scripts/sub2api-admin.js accounts list

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

Workflow

  1. Reuse SUB2API_BASE_URL and SUB2API_ADMIN_API_KEY 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 ~/.codex/skills/sub2api-admin/scripts/sub2api-admin.js accounts list --page-size 20
node ~/.codex/skills/sub2api-admin/scripts/sub2api-admin.js accounts get 40
node ~/.codex/skills/sub2api-admin/scripts/sub2api-admin.js accounts usage 40
node ~/.codex/skills/sub2api-admin/scripts/sub2api-admin.js accounts set-schedulable 40 true
node ~/.codex/skills/sub2api-admin/scripts/sub2api-admin.js accounts bulk-update --ids 40,39 --json '{"concurrency":10}'
node ~/.codex/skills/sub2api-admin/scripts/sub2api-admin.js error-rules list
node ~/.codex/skills/sub2api-admin/scripts/sub2api-admin.js tls-profiles list

Safety Notes

  • Authentication uses only x-api-key.
  • If the API returns INVALID_ADMIN_KEY, ask the user to regenerate the admin API key.
  • accounts export includes credentials and tokens. Prefer --file and avoid printing exports in chat.
  • For uncertain or newly added backend APIs, use api <METHOD> <admin-path> after a read-only check.
Install via CLI
npx skills add https://github.com/541968679/sub2api --skill sub2api-admin
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator