AI-powered agent skill generator for smart contracts.
Skillhub is an HTTP API that generates Agent Skills (SKILL.md files) from Ethereum smart contract addresses. Skills are gated behind x402 micropayments (USDC on Base Mainnet) and stored permanently on IPFS.
AI agents interacting with smart contracts either waste context tokens parsing raw ABIs, hallucinate function signatures, or ask the human — defeating the purpose of autonomy. Skillhub provides a cheaper, faster, higher-quality alternative: pay $0.10, get a concise, validated, context-efficient skill file ready to use in any agent.
| Method | Path | Price | Description |
|---|---|---|---|
POST |
/skills/generate |
$0.10 USDC | Kick off async skill generation |
GET |
/skills/status/:sid |
free | Poll session state |
GET |
/skills/:id |
$0.01 USDC | Fetch completed skill by IPFS CID |
GET |
/health |
free | Health check |
POST /skills/generate
Content-Type: application/json
{ "contractAddress": "0x...", "chainId": 8453 }Response:
{ "sessionId": "...", "statusUrl": "/skills/status/..." }GET /skills/status/:sidResponse when ready:
{ "status": "ready", "skillId": "<ipfs-cid>" }GET /skills/<ipfs-cid>Returns the raw SKILL.md content. Endpoint is x402-gated ($0.01 USDC).
All paywalled endpoints are auto-indexed in x402 Bazaar for discovery by other agents.
- Runtime: Node.js (ES modules)
- Framework: Express
- AI: LangChain + LangGraph (ReAct agent), OpenAI LLM
- Payments:
@x402/express+@x402/evm— USDC on Base Mainnet via PayAI facilitator - Discovery: x402 Bazaar (auto-indexed on payment settlement)
- Storage: IPFS via Pinata SDK (content-addressed, pinned; retrieved via dedicated gateway)
- Block explorer: Uniblock API (ABI, verified source, proxy resolution)
- EVM client: viem (used in generated code examples)
- Wallet: Open Wallet Standard (
owsCLI) via the bundledows-signskill
cp .env.example .env
# fill in required values
npm install
npm start| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
yes | OpenAI API key |
UNIBLOCK_API_KEY |
yes | Uniblock API key for ABI + source fetching |
PINATA_JWT |
yes | Pinata JWT for IPFS pinning |
EVM_ADDRESS |
yes | Wallet address to receive x402 payments (Base Mainnet) |
PORT |
no | HTTP port (default: 3000) |
OPENAI_MODEL |
no | LLM model (default: gpt-4o) |
PINATA_GATEWAY |
no | Pinata dedicated gateway domain |
PAYAI_API_KEY_ID |
no | PayAI API key (free tier works without) |
PAYAI_API_KEY_SECRET |
no | PayAI API secret |
Skill generation runs three async stages with up to 3 total attempts (retry with failure feedback):
- Research — LangGraph ReAct agent calls Uniblock to fetch the contract ABI, verified source code, and detected ERC patterns. Automatically resolves EIP-1967 proxy contracts to their implementation.
- Generate — LLM model produces a
SKILL.mdfrom the research context, targeting <500 lines / <5000 tokens. - Validate — Three checks: required frontmatter fields, ABI cross-check (code examples match function signatures), safety check (warnings present for payable functions and approval patterns).
On validation failure the reason is passed back to the next generate attempt for self-correction.
skills/skillhub/SKILL.md is Skillhub's own agent skill — it tells any compatible agent how to use the Skillhub API: generate a skill for a contract, poll for completion, and download the result via x402 payments using OWS CLI. It is served at GET /skill.md.
Skillhub ships a bundled agent skill at skills/ows-sign/SKILL.md that enables any Claude Code (or compatible) agent to sign and broadcast EVM transactions using the Open Wallet Standard CLI — without exposing private keys.
- Encodes calldata for any contract function via a local
scripts/encode-tx.mjshelper - Signs and broadcasts the encoded transaction through
ows sign+ows broadcast - Works on any EVM chain; tested on Base Mainnet (chainId
8453)
owsCLI installed and a wallet configured (ows wallet list)nodeavailable for the encode-tx script
Install the skill into your agent session:
/skill skills/ows-sign/SKILL.md
The agent will use the ows-sign workflow whenever it needs to call a contract function on-chain.
Generated skills follow the open Agent Skills specification — no vendor lock-in. Code examples use viem.