From cross-prediction
Drive the CROSS Prediction market (prediction.crossdefi.io) by natural language. Lists active events, fetches event/market details, shows BILL + CROSS wallet balance, and places BILL-denominated Share buy/sell on CROSS Chain (chain id 612055) through explicit wallet execution strategies only: local signer or configured CROSSx gateway signer. Browser session reuse is not part of the distributable skill. Activates on phrases like "예측 마켓", "CROSS prediction", "BILL 매수/매도", "BTC 1분 예측", "prediction events", "cross defi prediction".
How this skill is triggered — by the user, by Claude, or both
Slash command
/cross-prediction:cross-predictionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A distributable skill for `prediction.crossdefi.io`: list events, inspect markets, read settled results, check balances, and trade outcome Shares in BILL.
package-lock.jsonpackage.jsonreferences/api-map.mdreferences/chain-addresses.mdreferences/ctf-basics.mdscripts/_approval.mjsscripts/_auth.mjsscripts/_chain.mjsscripts/_guard.mjsscripts/_order.mjsscripts/_signer-a-viem.mjsscripts/_signer-c-gateway.mjsscripts/_signer.mjsscripts/_strategy.mjsscripts/balance.mjsscripts/buy.mjsscripts/get-event.mjsscripts/get-results.mjsscripts/list-events.mjsscripts/redeem.mjsA distributable skill for prediction.crossdefi.io: list events, inspect markets, read settled results, check balances, and trade outcome Shares in BILL.
v0.3.1 security posture: read paths are public. Trading is DRY-RUN by default and can execute only through Strategy A (local viem signer) or Strategy C (configured CROSSx gateway signer). Browser-login state tooling is not shipped. Live endpoint: BILL-denominated markets use
https://pred-bill-service-api.crossdefi.io/api/v1; SIWE auth uses domainhttps://prediction.crossdefi.io.
Activate when the user asks for:
If the user asks about Gametoken / CROSS DEX trading instead, hand off to cross-dex-trade.
node --version # require >= 20
SKILL_DIR="$HOME/.claude/skills/cross-prediction"
[ -d "$SKILL_DIR/node_modules" ] || (cd "$SKILL_DIR" && npm install --silent)
No browser automation dependency is required.
Env resolution priority:
./.env in the user's current working directory$HOME/.claude/skills/cross-prediction/.envNever echo PRIVATE_KEY, PIN, raw .env, gateway auth material, or signed payload secrets into the conversation. Do not pass secrets in Bash argv; source env files or pass through process env.
For personal testing, the default env backend reads the key from local
environment variables or a gitignored .env file. For team, hosted-agent, or
production funds, prefer Vault Transit, KMS, or HSM-backed signing so the raw
key is not exported to the agent runtime. Strategy C remains for configured
CROSSx gateway signing.
Required for wallet-specific reads/trades:
WALLET_ADDRESS=0x...Optional per strategy:
PRIVATE_KEY env/config for Strategy APIN=123456, CROSSX_GATEWAY_BASE, and CROSSX_AUTH_TOKEN or .session/gateway.json for Strategy CSTRATEGY=A|C|autoMAX_TRADE_BILL default 100Validation:
WALLET_ADDRESS must match ^0x[0-9a-fA-F]{40}$PRIVATE_KEY, when set, must match ^0x[0-9a-fA-F]{64}$PIN, when set, must match ^\d{6}$| Strategy | Signing | Prerequisite | Notes |
|---|---|---|---|
| A | local viem signer | PRIVATE_KEY | Can perform required on-chain approvals |
| C | CROSSx gateway signer | PIN + configured gateway | Cannot perform on-chain approvals; fails with APPROVAL_GAP when allowance is missing |
STRATEGY=auto prefers A, then C. Deprecated browser-driven strategy names are rejected with STRATEGY_REMOVED.
If no strategy is usable, tell the user that trading needs either local Strategy A signer config or a configured Strategy C gateway. Do not suggest collecting web-login state from a browser.
Every mutating operation checks:
612055.buy.mjs and sell.mjs preview by default; --live is required for execution.MAX_TRADE_BILL cap — aborts when worst-case notional exceeds the configured cap.WALLET_ADDRESS.redeem.mjs previews by default and live redeem requires Strategy A because it sends an on-chain CTF.redeemPositions transaction.All subcommands print a single JSON object on stdout.
cd "$HOME/.claude/skills/cross-prediction"
node scripts/list-events.mjs [--status ACTIVE] [--query "BTC"] [--category CRYPTO] [--limit 20]
node scripts/get-event.mjs <eventId> [--marketId <marketId>] [--status ACTIVE|REDEEMABLE]
node scripts/balance.mjs [--with-shares] [--include-redeemable] [--redeemable-limit 20]
node scripts/get-results.mjs <eventId> [--only-mine] [--limit 20]
# DRY_RUN
node scripts/buy.mjs <marketId> <UP|DOWN|YES|NO|0|1> <amount>
node scripts/sell.mjs <marketId> <UP|DOWN|YES|NO|0|1> <shares>
# LIVE
node scripts/buy.mjs <marketId> UP 1 --live
node scripts/sell.mjs <marketId> UP 1 --live
# Force a strategy
node scripts/buy.mjs <marketId> UP 1 --live --strategy A
node scripts/buy.mjs <marketId> UP 1 --live --strategy C
Order semantics:
MARKET BUY <amount> means BILL notional to spend.LIMIT BUY <shares> --max-price <p> means shares to acquire at no more than p BILL/share.SELL takes shares; use --limit --min-price <p> for limit sells.# DRY_RUN
node scripts/redeem.mjs <marketId>
# LIVE; Strategy A required because redeem is an on-chain CTF transaction
node scripts/redeem.mjs <marketId> --live --strategy A
redeem.mjs fetches the REDEEMABLE market, identifies the winning outcome, reads the caller's CTF Share balance, simulates CTF.redeemPositions(collateralToken, zeroHash, conditionId, indexSets), and then submits the transaction only when --live is present.
scripts/
├── _signer.mjs common Signer interface
├── _signer-a-viem.mjs Strategy A: viem account from PRIVATE_KEY
├── _signer-c-gateway.mjs Strategy C: configured CROSSx gateway signer
├── _strategy.mjs auto-router: env -> A | C
├── _auth.mjs SIWE login using the selected signer
├── _order.mjs EIP-712 order builder + sign + POST
├── _approval.mjs on-chain BILL.approve / CTF.setApprovalForAll
├── _chain.mjs viem client, addresses, ABIs, REST helpers
├── _guard.mjs chain-id check, MAX_TRADE_BILL cap, env validation
├── buy.mjs / sell.mjs dispatchers
├── redeem.mjs settled winning Share redemption
├── balance.mjs wallet + share enumeration
├── list-events.mjs public event list
├── get-event.mjs event + markets + orderbook
└── get-results.mjs settled markets + per-user PnL
For every mutating operation, surface:
DRY_RUN or LIVEMAX_TRADE_BILLtxHash or submit response when liveredeem.mjsNever include PRIVATE_KEY, PIN, raw .env, gateway auth material, or full session/config contents.
This folder is the unit of distribution:
cross-prediction/ into ~/.claude/skills/.npm install..env from .env.example.Read deeper references only when needed:
references/api-map.mdreferences/chain-addresses.mdreferences/ctf-basics.mdCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub to-nexus/cross-skills-suite --plugin cross-prediction