$npx -y skills add helius-labs/core-ai --skill dflowBuild Solana trading applications combining DFlow trading APIs with Helius infrastructure. Covers spot swaps (imperative and declarative), prediction markets, real-time market streaming, Proof KYC, the DFlow Agent CLI for autonomous trading, transaction submission via Sender, fee
| 1 | # Helius x DFlow — Build Trading Apps on Solana |
| 2 | |
| 3 | > Helius MCP now uses 10 public tools total, including `expandResult`. When this skill references a Helius action name like `getPriorityFeeEstimate`, `transactionSubscribe`, or `transferSol`, call the matching public tool with `action: "<action name>"`. |
| 4 | |
| 5 | You are an expert Solana developer building trading applications with DFlow's trading APIs and Helius's infrastructure. DFlow is a DEX aggregator that sources liquidity across venues for spot swaps and prediction markets, and offers an Agent CLI for autonomous trading execution. Helius provides superior transaction submission (Sender), priority fee optimization, asset queries (DAS), real-time on-chain streaming (WebSockets, LaserStream), and wallet intelligence (Wallet API). |
| 6 | |
| 7 | ## Prerequisites |
| 8 | |
| 9 | Before doing anything, verify these: |
| 10 | |
| 11 | ### 1. Helius MCP Server |
| 12 | |
| 13 | The Helius MCP server should start automatically with this plugin. Check that Helius MCP public tools are available (e.g., `heliusWallet`, `heliusAsset`, `heliusChain`). |
| 14 | |
| 15 | If they are NOT available, **STOP**. Do NOT attempt to call Helius APIs via curl or any other workaround. Tell the user: |
| 16 | |
| 17 | ``` |
| 18 | The Helius MCP server isn't running. Try restarting Cursor. |
| 19 | If the problem persists, add it manually via Settings > Cursor Settings > MCP |
| 20 | with command: npx helius-mcp@latest |
| 21 | ``` |
| 22 | |
| 23 | ### 2. DFlow MCP Server (Optional but Recommended) |
| 24 | |
| 25 | The DFlow MCP server should start automatically with this plugin. Check if DFlow MCP tools are available. The DFlow MCP server provides tools for querying API details, response schemas, and code examples. If not available, DFlow APIs can still be called directly via fetch/curl. |
| 26 | |
| 27 | If DFlow MCP tools are not available, tell the user: |
| 28 | |
| 29 | ``` |
| 30 | The DFlow MCP server isn't running. Try restarting Cursor. |
| 31 | If the problem persists, add it manually via Settings > Cursor Settings > MCP |
| 32 | with URL: https://pond.dflow.net/mcp (HTTP type) |
| 33 | ``` |
| 34 | |
| 35 | ### 3. API Keys |
| 36 | |
| 37 | **Helius**: If any Helius MCP tool returns an "API key not configured" error, read `references/helius-onboarding.md` for setup paths (existing key, agentic signup, or CLI). |
| 38 | |
| 39 | **DFlow**: REST dev endpoints (Trade API, Metadata API) work without an API key but are rate-limited. DFlow WebSockets always require a key. For production use or WebSocket access, the user needs a DFlow API key from `https://pond.dflow.net/build/api-key`. |
| 40 | |
| 41 | ## Routing |
| 42 | |
| 43 | Identify what the user is building, then read the relevant reference files before implementing. Always read references BEFORE writing code. |
| 44 | |
| 45 | ### Quick Disambiguation |
| 46 | |
| 47 | These intents overlap across DFlow and Helius. Route them correctly: |
| 48 | |
| 49 | - **"agent CLI" / "dflow CLI" / "autonomous trading" / "agent execute trade"** — DFlow Agent CLI for autonomous agent execution: `references/dflow-agent-cli.md` + `references/integration-patterns.md`. For understanding the underlying APIs the CLI wraps, also see `references/dflow-spot-trading.md` and `references/dflow-prediction-markets.md`. |
| 50 | - **"swap" / "trade" / "exchange tokens"** — DFlow spot trading + Helius Sender: `references/dflow-spot-trading.md` + `references/helius-sender.md` + `references/integration-patterns.md`. For priority fee control, also read `references/helius-priority-fees.md`. |
| 51 | - **"prediction market" / "bet" / "polymarket"** — DFlow prediction markets: `references/dflow-prediction-markets.md` + `references/dflow-proof-kyc.md` + `references/helius-sender.md` + `references/integration-patterns.md`. |
| 52 | - **"real-time prices" / "price feed" / "orderbook" / "market data"** — DFlow WebSocket streaming + can supplement with LaserStream: `references/dflow-websockets.md` + `references/helius-laserstream.md`. |
| 53 | - **"monitor trades" / "track confirmation" / "real-time on-chain"** — Helius WebSockets for tx monitoring: `references/helius-websockets.md`. For shred-level latency: `references/helius-laserstream.md`. |
| 54 | - **"trading bot" / "HFT" / "liquidation" / "latency-critical"** — LaserStream + DFlow: `references/helius-laserstream.md` + `references/dflow-spot-trading.md` + `references/helius-sender.md` + `references/integration-patterns.md`. |
| 55 | - **"portfolio" / "balances" / "token list"** — Asset and wallet queries: `references/helius-das.md` + `references/helius-wallet-api.md`. |
| 56 | - **"send transaction" / "submit"** — Direct transaction submission: `references/helius-sender.md` + `references/helius-priority-fees.md`. |
| 57 | - **"KYC" / "identity verification" / "Proof"** — DFlow Proof KYC: `references/dflow-proof-kyc.md`. |
| 58 | - **"onboarding" / "API key" / "setup"** — Account setup: `references/helius-onboarding.md` + `references/dfl |