Aiberm Skill

aiberm-skill teaches a coding agent to read your own Aiberm account. Once it is installed, you can ask Claude Code, Codex, Grok Bot, or another agent “How much balance do I have left on Aiberm?” The agent calls the Aiberm API and answers in plain language.

The skill reads your balance, models, prices, API tokens, usage logs, and top-up records. It can also create, edit, enable, disable, and delete your API tokens, and it asks you before every change.

Info

A skill is a folder containing a SKILL.md file. The agent reads the file when your question matches the skill’s description, then runs curl itself. Nothing runs in the background, and there is nothing to build or keep running.

Prerequisites

  • An Aiberm account (sign up)
  • An agent that supports Skills, such as Claude Code, Codex, or Grok Bot
  • git, curl, and a bash-compatible shell. macOS and Linux usually have all three. On Windows, Claude Code uses Git Bash.

1. Get your user ID and system access token

The skill needs two values, both from Personal Settings:

ValueWhere to find it
User IDIn the header at the top of the page, shown as ID: 123
System access tokenSecurity Settings tab → System Access Token → Generate Token

Aiberm checks both on every account request, and the ID must belong to the account that owns the token.

Warning

The system access token is not an API key (sk-...). It works like your console login: anyone who holds it can do what you can do in the console. Keep it private. Pressing Regenerate replaces it, and anything still using the old token stops working.

2. Install the Skill

Paste this prompt into Claude Code, Codex, Grok Bot, or another agent, and let it install the Skill:

Install the Aiberm Skill from https://github.com/aiberm/aiberm-skill: copy its skills/aiberm folder into the folder you load Skills from.

When it is done, start a new session. To update the Skill later, send the same prompt again.

3. Set the two variables

The agent reads the values from its environment, so set them before you start it.

macOS / Linux: add these lines to ~/.zshrc or ~/.bashrc, then open a new terminal:

export AIBERM_ACCESS_TOKEN="your-system-access-token"
export AIBERM_USER_ID="123"

Windows (PowerShell): run the commands below, then open a new terminal:

setx AIBERM_ACCESS_TOKEN "your-system-access-token"
setx AIBERM_USER_ID "123"
Tip

For Claude Code only, you can put both variables in the env block of ~/.claude/settings.json instead.

To check the values before involving an agent, request your profile. data.quota divided by 500000 is your remaining balance in USD.

curl -sS "https://aiberm.com/api/user/self" \
  -H "Authorization: Bearer $AIBERM_ACCESS_TOKEN" \
  -H "New-Api-User: $AIBERM_USER_ID"

4. Ask your agent

Start a new agent session and ask in your own words:

  • “How much balance do I have left on Aiberm?”
  • “How much did I spend on Aiberm yesterday, by model?”
  • “List my Aiberm API tokens and how much quota each has left.”
  • “What does claude-sonnet-5-5 cost per 1M tokens on Aiberm?”
  • “Which models did I use most on Aiberm this week?”
  • “Show my recent Aiberm top-ups.”
  • “Create an Aiberm API key named my-app with a $5 limit.”
  • “Disable my Aiberm token old-test.”

You can also call the Skill directly: /aiberm in Claude Code and Grok Bot, $aiberm in Codex.

You ask aboutThe skill reads
Balance and total spentGET /api/user/self
Models you can callGET /api/user/models
Model pricesGET /api/pricing
API tokensGET /api/token/
Usage logsGET /api/log/self
Usage totalsGET /api/log/self/stat
Usage by hour and modelGET /api/data/self
Top-up recordsGET /api/user/topup/self
Creating, editing, or deleting API tokensPOST, PUT, or DELETE /api/token/

Amounts are converted to USD at 500000 quota = $1. Prices are what your account actually pays.

Creating and changing API tokens

  • Before every create, edit, enable, disable, or delete, the agent tells you what it will send and waits for your OK.
  • Unless you ask otherwise, a new token gets unlimited quota and no expiry, as in the console. You can ask for a spending limit, an expiry date, or a list of allowed models.
  • After creating a token, the agent shows its full key once. Copy it into your app or config.
  • Deleting a token cannot be undone, and apps using its key stop working at once.

What the skill does not do

  • Apart from API tokens, it does not change anything. It does not make payments, redeem top-up codes, or edit your account. Use the console for those.
  • It does not reset your system access token. The skill tells the agent never to call that route.
  • It does not reveal the full keys of your existing API tokens. The token list contains full keys, and the agent shows them masked, like sk-abcd****wxyz. Copy a full key from Token Management. The only exception is a token the agent has just created for you.
Warning

These rules are instructions to the agent, not a technical lock. The token allows everything your console login allows. Use it only with agents and machines you trust. If it leaks, press Regenerate in Personal Settings.

Troubleshooting

What you seeWhat to do
The agent says the variables are missingSet both, open a new terminal, and start a new agent session.
未提供 New-Api-UserAIBERM_USER_ID is not set.
New-Api-User 与登录用户不匹配AIBERM_USER_ID is not the ID of the account that owns the token. Copy the ID from Personal Settings of the same account.
access token 无效The token is wrong or was regenerated. Generate a new one and update AIBERM_ACCESS_TOKEN.
The agent does not use the SkillCheck that the file is at ~/.claude/skills/aiberm/SKILL.md or ~/.agents/skills/aiberm/SKILL.md, then start a new session. Or call it directly with /aiberm (Claude Code, Grok Bot) or $aiberm (Codex).
时间跨度不能超过 1 个月Hourly usage covers at most 30 days per request. Ask for a shorter range.

The skill’s source and the full list of requests are in the aiberm-skill repository. For errors from the model API itself, see Error Handling.