How to build and publish your own trading skills to the AION registry via ClawHub.Skills auto-appear in the AION registry within 6 hours of publishing to ClawHub.
---name: your-skill-slugdescription: One sentence describing what it does and when to use it.metadata: author: "Your Name" version: "1.0.0" displayName: "Your Skill Name" difficulty: "intermediate"---
Rules:
name must be lowercase, hyphens only, match folder name
description is required, max 1024 chars
metadata values must be flat strings
No platform-specific config in SKILL.md — that goes in clawhub.json
aion-sdk in requires.pip is required. This is what causes the skill to appear in the AION registry automatically.
Declare credentials in all three fields, not just requires.env. ClawHub’s moderation scanner reads all of them together; getting this right prevents false-positive “Suspicious” verdicts that block non-interactive installs:
Field
Purpose
Context
requires.env
Strictly required — skill fails without these
Only the minimum credentials needed for the default code path
primaryEnv
Names the single main credential
The one key every user will have (usually AION_API_KEY)
envVars[]
Per-variable declaration with required boolean + human description
Full list including optional credentials; explains when each is needed
Common env vars for AION skills:
Variable
Details
AION_API_KEY
Always required — main credential (also set as primaryEnv)
WALLET_PRIVATE_KEY
Usually required: false — only needed when not using managed wallets
EVM_PRIVATE_KEY
Required if your skill signs EVM transactions
POLYGON_RPC_URL
required: false — only if the user wants a custom RPC endpoint
Skills are templates, not black boxes. Your SKILL.md should include a callout like:
> **This is a template.** The default signal is [your signal source] —> remix it with [alternative signals, different models, etc.].> The skill handles all the plumbing (market discovery, trade execution,> safeguards). Your agent provides the alpha.
The skill handles plumbing: market discovery, order execution, position management, and safeguards. The user’s agent swaps in their own signal — a different API, a custom model, additional data sources. Make it clear what’s swappable and what’s structural.
The /api/sdk/markets/context/{id} endpoint provides trading discipline data — flip-flop detection, slippage estimates, and edge analysis. We strongly recommend checking it before executing trades:
def get_market_context(market_id, my_probability=None): """Fetch context with safeguards and optional edge analysis.""" params = {} if my_probability is not None: params["my_probability"] = my_probability return get_client().get_market_context(market_id, **params)# Before buyingcontext = get_market_context(market_id, my_probability=0.85)# Check warningstrading = context.get("trading", {})if trading.get("flip_flop_warning"): print(f"Skipping: too much reversals") # Don't trade -- you've been reversing too much
For resolved markets, use auto-redemption to collect payouts:
# At the start or end of each cycle — safe to call frequentlyresults = get_client().auto_redeem()for r in results: if r["success"]: print(f"Redeemed {r['market_id']}: tx={r['tx_hash']}")
Always pass --slug explicitly. If omitted, ClawHub uses the folder basename as the slug — which can silently publish to the wrong slug if you’re publishing from a staging/temp directory. Make the slug explicit every time.
After publishing your skill, you can submit it for review via the /agent/skill/submit-skill API endpoint. This registers your skill and triggers the moderation process.
You must submit your skill for review. If you skip this step, you will not earn additional revenue when other users use your skill to trade profitably.
Trading skills that reference crypto keys and call external APIs will sometimes get flagged by ClawHub’s VirusTotal Code Insight scanner — it’s a heuristic LLM scan and may return false positives on legitimate trading code. Verify installs work: