Agent skill

Sub2API Admin

by Wei-Shaw in Wei-Shaw/sub2api

Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

LGPL-3.0Auto-check passedBackend & APIs

Install Sub2API Admin

skills CLI
$ npx skills add Wei-Shaw/sub2api --skill sub2api-admin -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Wei-Shaw/sub2api sub2api-admin --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Wei-Shaw/sub2api.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sub2api-admin .claude/skills/sub2api-admin && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sub2api-admin
GitHub stars
43k
Used in
1 other repo
Token cost
~717 tokens
SKILL.md length
177 words
Files
4 (incl. scripts, references)
Skills in repo
1
Repo updated
First seen
Licence
LGPL-3.0

At a glance

Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

  • Works in 5 steps: Reuse SUB2API_BASE_URL and either… → Run read-only commands first: accounts… → Before destructive or bulk writes, print… → …
  • Listing or inspecting accounts on a Sub2API instance
  • SKILL.md covers Workflow, Common Commands and Safety Notes
  • Runs JavaScript scripts from its folder; calls node; needs SUB2API_ADMIN_API_KEY and INVALID_ADMIN_KEY

What it does

Sub2API is an open-source relay service for sharing AI subscriptions, and this skill gives the agent a bundled Node script for its administrator API instead of hand-written curl calls. It reads the base URL and either an admin API key or an admin JWT from the environment, then lists, inspects and updates accounts, usage, groups and proxies, manages redeem and recharge codes, and handles bulk imports and exports.

The workflow is cautious by design: read-only commands come first, the target account names and IDs are printed before any destructive or bulk write, and a follow-up read confirms the result. Exports contain credentials, so the skill prefers writing them to a file over printing them in chat, and recharge-related code operations use an idempotency key. A raw api command covers endpoints the CLI does not wrap yet.

When your agent uses it

  • Listing or inspecting accounts on a Sub2API instance
  • Creating or revoking redeem and invitation codes
  • Bulk importing, exporting or refreshing accounts
  • Clearing account errors or adjusting proxies and groups

Example prompts

  • “List all Sub2API accounts that are currently in an error state.”
  • “Create ten recharge codes for the trial group.”
  • “Export the accounts in group 3 to a file, without printing them.”

Requirements

  • A Sub2API instance URL
  • An admin API key or admin JWT
  • Node.js to run scripts/sub2api-admin.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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 , 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.

What it can do on your machine

Read from SKILL.md and the folder at commit 3f1a2ea. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SUB2API_ADMIN_API_KEY
    • INVALID_ADMIN_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sub2API Admin loads about 717 tokens when it runs, and up to ~3.2k if it reads all its reference files. Until then it costs about 124 tokens; SKILL.md has 177 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~124
When it runs · the whole SKILL.md, loaded when a task matches
~717
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Wei-Shaw/sub2api at commit 3f1a2ea, republished under its LGPL-3.0 licence (© Wei-Shaw). 177 words, ~717 tokens.

Download SKILL.mdSave it as .claude/skills/sub2api-admin/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
sub2api-admin
description
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.

bash
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.

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

bash
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.

© Wei-Shaw, LGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/sub2api-admin of Wei-Shaw/sub2api.

  • SKILL.md
  • agents/openai.yaml
  • references/admin-cli.md
  • scripts/sub2api-admin.js

Open the folder on GitHubat commit 3f1a2ea

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Wei-Shaw/sub2api, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Sub2API Admin next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sub2API Admin compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sub2API Admin this skillWei-Shaw/sub2api43k1 repos~717Automated safety check: PassLGPL-3.0
Venice API Overviewveniceai/skills143—~3.5kAutomated safety check: PassMIT
Skill Agent Task Patternsjaviarmesto/ALDC-AL-Development-Collection109—~4.2kAutomated safety check: PassMIT
Firecrawl Build Onboardingfirecrawl/firecrawl189k1 repos~1.4kAutomated safety check: NotesISC
ToolJet Marketplace Plugin BuilderToolJet/ToolJet41k—~2.1kAutomated safety check: PassAGPL-3.0
Firecrawl Search Integrationfirecrawl/firecrawl189k1 repos~1.1kAutomated safety check: PassISC

Similar skills

  • Venice API Overview

    veniceai/skills

    High-level map of the Venice.ai API: base URL, auth modes per endpoint, endpoint categories, response headers, pricing model, error shape and versioning.

    143 GitHub stars~3.5k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Skill Agent Task Patterns

    javiarmesto/ALDC-AL-Development-Collection

    Agent SDK task integration patterns for Business Central. An agent skill from javiarmesto/ALDC-AL-Development-Collection.

    109 GitHub stars~4.2k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Firecrawl Build Onboarding

    firecrawl/firecrawl

    Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.

    189k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check: notes
  • Turns an API description, such as an OpenAPI file or a Postman collection, into a connector plugin for ToolJet's marketplace and checks it with the repo's validator.

    41k GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Firecrawl Search Integration

    firecrawl/firecrawl

    Guidance for adding Firecrawl's /search endpoint to product code and agent workflows when a feature starts from a query rather than a URL.

    189k GitHub starsUsed in 1 repo~1.1k tokens
    Backend & APIsAuto-check passed
  • CoinGecko API Reference

    2025Emma/vibe-coding-cn

    CoinGecko API documentation - cryptocurrency market data API, price feeds, market cap, volume, historical data. Use when integrating CoinGecko API, building…

    23k GitHub starsUsed in 2 repos~646 tokens
    Backend & APIsAuto-check passed

Questions about Sub2API Admin

What does Sub2API Admin do?

Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls. Sub2API is an open-source relay service for sharing AI subscriptions, and this skill gives the agent a bundled Node script for its administrator API instead of hand-written curl calls. It reads the base URL and either an admin API key or an admin JWT from the environment, then lists, inspects and updates accounts, usage, groups and proxies, manages redeem and recharge codes, and handles bulk imports and exports.

When should I use Sub2API Admin?

Sub2API Admin fits situations like: listing or inspecting accounts on a Sub2API instance; creating or revoking redeem and invitation codes; bulk importing, exporting or refreshing accounts; clearing account errors or adjusting proxies and groups.

How do I install Sub2API Admin in Claude Code?

Run `npx skills add Wei-Shaw/sub2api --skill sub2api-admin -a claude-code`. Or copy the skill folder (skills/sub2api-admin in Wei-Shaw/sub2api) into .claude/skills/sub2api-admin in your project. Claude Code loads it when a task matches its description.

How do I install Sub2API Admin in Codex?

Run `npx skills add Wei-Shaw/sub2api --skill sub2api-admin -a codex`. Or copy the skill folder (skills/sub2api-admin in Wei-Shaw/sub2api) into .agents/skills/sub2api-admin in your project. Codex loads it when a task matches its description.

Can I use Sub2API Admin in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Wei-Shaw/sub2api --skill sub2api-admin -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sub2api-admin, .gemini/skills/sub2api-admin, .github/skills/sub2api-admin and .opencode/skills/sub2api-admin in your project.

What does Sub2API Admin need to run?

Going by SKILL.md and its folder, Sub2API Admin needs JavaScript for the scripts in its folder, the command-line tools its instructions call (node) and credentials named SUB2API_ADMIN_API_KEY and INVALID_ADMIN_KEY. Our summary lists: A Sub2API instance URL; An admin API key or admin JWT; Node.js to run scripts/sub2api-admin.js.

Does Sub2API Admin access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sub2API Admin safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Sub2API Admin use?

Sub2API Admin is published under the LGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sub2API Admin use?

About 717 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.5k tokens, read only when the agent opens those files.

What are the alternatives to Sub2API Admin?

Skills that share tags, products or a category with Sub2API Admin: Venice API Overview (veniceai/skills, 143 stars), Skill Agent Task Patterns (javiarmesto/ALDC-AL-Development-Collection, 109 stars), Firecrawl Build Onboarding (firecrawl/firecrawl, 189k stars) and ToolJet Marketplace Plugin Builder (ToolJet/ToolJet, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sub2API Admin?

Wei-Shaw (a GitHub user) maintains it in Wei-Shaw/sub2api, which has 43,365 GitHub stars. The repository was last updated on October 7, 2026.

Source: Wei-Shaw/sub2api on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.