Linkex Skills
The official skill that lets your agent check balance and top up Linkex by itself — 3 turns from "balance low" to "credited".
linkex-skills is Linkex's official skill repository for agent runtimes that support the skills ecosystem (Claude Code, OpenClaw, etc.). Its first skill, linkex-agents-pay, teaches your agent to:
- check the API key's remaining balance (
status.sh) - create an x402 top-up order and preview payment options
- hand off signing to an x402 wallet (Binance Agentic Wallet) and settle
- optionally warn you automatically when the balance runs low (consent-gated hook)
Compared with wiring the x402 endpoints yourself, the skill's bundled scripts collapse the whole flow into 3 agent turns — prepare, confirm, execute.
Prerequisites
- An agent runtime with skills support (e.g. Claude Code) and Node.js ≥ 18
- A Linkex API key (
sk-...) — an agent key is recommended - For signing: the
binance-agentic-walletskill (the flow drives itsbawCLI); any x402 v2exactclient also works manually
Install
npx skills add stablepay-llc/linkex-skills/skills/linkex-agents-payConfigure
The skill reads one required variable:
| Variable | Required | Description |
|---|---|---|
LINKEX_API_KEY | Yes | Your Linkex key; used for model calls and top-up orders |
LINKEX_BASE_URL | No | Defaults to https://linkex.ai |
LINKEX_LOW_BALANCE_USD | No | Low-balance warning threshold, default 5 |
For Claude Code, put it in the env block of ~/.claude/settings.json (or .claude/settings.local.json) so every session inherits it:
{
"env": { "LINKEX_API_KEY": "sk-YOUR_KEY" }
}First run
Just talk to your agent:
"Check my Linkex balance" → the skill runs
status.shand reports balance plus available top-up networks/tokens."Top up $5 on BNB Chain" → turn 1 creates the order and previews signable options; turn 2 shows you a table (token, chain, amount, wallet balance) and asks for confirmation; turn 3 signs via
bawand reports the settle result with the new balance.
The skill never signs or spends without your explicit confirmation, and it holds no private keys — signing lives entirely in the wallet skill.
Optional: automatic low-balance guard
The skill ships a balance-guard.sh hook: after each conversation turn it checks the key (debounced to once per 10 minutes) and prints a warning when the balance drops below the threshold. Your agent will offer to install it — it's consent-gated, read-only, and never creates orders on its own.
First-time wallet notes
If you sign with a fresh Binance Agentic Wallet, two things trip people up:
- The sign-in link must be opened in a desktop browser, then scanned with the Binance App (opening it on the phone shows an app-download page).
- The agentic wallet starts empty — it's an isolated MPC wallet, separate from your main Binance funds. Fund it with the token on the target chain before creating the order (orders expire in 10 minutes).
Troubleshooting
| Symptom | Fix |
|---|---|
| Skill asks for a key every session | Store LINKEX_API_KEY in the agent's settings env block instead of the shell |
prepare succeeds but options aren't signable | Wallet balance insufficient on that chain — fund the wallet, then re-run prepare (old order may have expired) |
execute returns ORDER_EXPIRED | Orders live 10 minutes; re-run prepare |
SPEND_CAP_EXCEEDED | The agent key's spend caps are doing their job — raise them if intended |