How this skill is triggered — by the user, by Claude, or both
Slash command
/context-skills:buildThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build prediction market frontends using React hooks from `context-markets-react`.
Build prediction market frontends using React hooks from context-markets-react.
context-markets-react and context-markets >= 0.6.0wagmi >= 2, viem >= 2, @tanstack/react-query >= 5ContextProvider. Trading hooks additionally require wallet connection.npm install context-markets-react context-markets wagmi viem @tanstack/react-query
Order matters. All three are required.
import { WagmiProvider } from "wagmi"
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
import { ContextProvider } from "context-markets-react"
const queryClient = new QueryClient()
function App({ children }: { children: React.ReactNode }) {
return (
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
<ContextProvider apiKey={process.env.NEXT_PUBLIC_CONTEXT_API_KEY!}>
{children}
</ContextProvider>
</QueryClientProvider>
</WagmiProvider>
)
}
Markets (query): useMarkets · useSearchMarkets · useMarket · useOrderbook · useQuotes · usePriceHistory · useMarketActivity · useSimulateTrade · useOracle · useLatestOracleQuote
Orders (query): useOrders · useOrder
Orders (mutation): useCreateOrder · useCreateMarketOrder · useCancelOrder · useCancelReplace
Portfolio (query): usePortfolio · usePositions · useBalance · useClaimable · usePortfolioStats
Account (mixed): useAccountStatus · useAccountSetup · useDeposit · useWithdraw · useApproveUsdc · useApproveOperator
Questions (mutation): useSubmitQuestion · useSubmitAndWait · useCreateMarket · useAgentSubmit · useAgentSubmitAndWait
Utilities: ContextProvider · useContextClient · contextKeys · ContextWalletError
Use contextKeys for cache invalidation after mutations:
import { contextKeys } from "context-markets-react"
contextKeys.markets.list(params)
contextKeys.markets.get(marketId)
contextKeys.markets.quotes(marketId)
contextKeys.markets.latestOracleQuote(marketId)
contextKeys.orders.list(address, params)
contextKeys.orders.get(address, id)
contextKeys.portfolio.get(address, params)
contextKeys.portfolio.positions(address, params)
contextKeys.portfolio.balance(address)
| Workflow | When to use |
|---|---|
| trading-app | Full trading UI with market list, orders, portfolio |
| market-widget | Embeddable single-market component |
| portfolio-dashboard | Position tracking and P&L display |
| account-setup-flow | Wallet connect → approve → deposit → ready |
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.
Trade on prediction markets (Polymarket, Kalshi). Search markets, buy/sell positions, track PnL, and view trade history.
Provides React/Next.js patterns for component composition, compound components, render props, state management (Zustand/Context), data fetching (SWR/React Query), performance (memoization), forms (Zod), and accessible UI.