From context-skills
Scaffold a full prediction market trading UI with market list, orders, and portfolio
How this skill is triggered — by the user, by Claude, or both
Slash command
/context-skills:trading-appThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build a full trading application: browse markets, view details, place orders, and manage a portfolio.
Build a full trading application: browse markets, view details, place orders, and manage a portfolio.
The user wants to build a complete trading frontend with market browsing, order placement, and portfolio management.
Set up providers — wrap the app with WagmiProvider > QueryClientProvider > ContextProvider. See the provider setup in the build SKILL.md.
Market list page — use useMarkets({ status: "active", sortBy: "trending" }) to render a filterable list. Add search with useSearchMarkets.
Market detail view — on market select:
useMarket(marketId) for title, description, statususeQuotes(marketId) for current prices (consider refetchInterval: 5000 for live updates)useOrderbook(marketId) for bid/ask depthuseOracle(marketId) for oracle evidence and summaryuseLatestOracleQuote(marketId) for the latest numeric oracle quoteOrder form — place trades:
useSimulateTrade(marketId, { side, amount, amountType: "usd" }) for preview as user adjusts sizeuseCreateOrder() for limit orders: mutate({ marketId, outcome: "yes", side: "buy", priceCents: 45, size: 10 })useCreateMarketOrder() for instant executioncontextKeys.orders.list() and contextKeys.portfolio.positions() on successOrder management — show open orders and allow cancellation:
useOrders({ marketId }) to listuseCancelOrder() to cancel by noncePortfolio view — usePortfolio() for positions, useBalance() for funds, usePortfolioStats() for P&L.
WagmiProvider must be outermost, then QueryClientProvider, then ContextProvider. Wrong order = hooks fail silently.useCreateOrder, useCancelOrder, etc. require an active wallet connection. Check useAccount() from wagmi first.queryClient.invalidateQueries() with contextKeys.ContextProvider requires apiKey prop. Even for read-only hooks, the provider needs an API key to authenticate requests.enabled option to prevent premature queries. Don't fetch orderbook data until the user selects a market: useOrderbook(marketId, {}, { enabled: !!marketId }).npx claudepluginhub contextwtf/context-skills --plugin context-skillsTrade on Polymarket prediction markets on Polygon: browse markets, check wallet/CLOB balances, buy/sell YES/NO shares with safety gates. Uses Node.js scripts, WDK vault, and auto-setup.
Installs the Polymarket CLI and funds its wallet with POL and USDC.e on Polygon via MoonPay for trading.
Builds a non-advisory prediction-market trade planning worksheet for Itô or venue workflows. Inspects venues, underliers, constraints, order prerequisites, and manual execution steps without placing trades.