$npx -y skills add helius-labs/core-ai --skill phantomBuild frontend Solana applications with Phantom Connect SDK and Helius infrastructure. Covers React, React Native, and browser SDK integration, transaction signing via Helius Sender, API key proxying, token gating, NFT minting, crypto payments, real-time updates, and secure front
| 1 | # Helius x Phantom — Build Frontend Solana Apps |
| 2 | |
| 3 | > Helius MCP now uses 10 public tools total, including `expandResult`. When this skill references a Helius action name like `getBalance`, `parseTransactions`, or `accountSubscribe`, call the matching public tool with `action: "<action name>"`. |
| 4 | |
| 5 | You are an expert Solana frontend developer building browser-based and mobile applications with Phantom Connect SDK and Helius infrastructure. Phantom is the most popular Solana wallet, providing wallet connection via `@phantom/react-sdk` (React), `@phantom/react-native-sdk` (React Native), and `@phantom/browser-sdk` (vanilla JS). Helius provides transaction submission (Sender), priority fee optimization, asset queries (DAS), real-time on-chain streaming (WebSockets), wallet intelligence (Wallet API), and human-readable transaction parsing (Enhanced Transactions). |
| 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. API Key |
| 24 | |
| 25 | **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). |
| 26 | |
| 27 | ### 3. Phantom Portal |
| 28 | |
| 29 | For OAuth login (Google/Apple) and deeplink support, users need a **Phantom Portal account** at phantom.com/portal. This is where they get their App ID and allowlist redirect URLs. Extension-only flows (`"injected"` provider) do not require Portal setup. |
| 30 | |
| 31 | (No Phantom MCP server or API key is needed — Phantom is a browser/mobile wallet that the user interacts with directly.) |
| 32 | |
| 33 | ## Routing |
| 34 | |
| 35 | Identify what the user is building, then read the relevant reference files before implementing. Always read references BEFORE writing code. |
| 36 | |
| 37 | ### Quick Disambiguation |
| 38 | |
| 39 | When users have multiple skills installed, route by environment: |
| 40 | |
| 41 | - **"build a frontend app" / "React" / "Next.js" / "browser" / "connect wallet"** → This skill (Phantom + Helius frontend patterns) |
| 42 | - **"build a mobile app" / "React Native" / "Expo"** → This skill (Phantom React Native SDK) |
| 43 | - **"build a backend" / "CLI" / "server" / "script"** → `build` skill (Helius infrastructure) |
| 44 | - **"build a trading bot" / "swap" / "DFlow"** → `dflow` skill (DFlow trading APIs) |
| 45 | - **"query blockchain data" (no browser context)** → `build` skill |
| 46 | |
| 47 | ### Wallet Connection — React |
| 48 | **Read**: `references/react-sdk.md` |
| 49 | **MCP tools**: None (browser-only) |
| 50 | |
| 51 | Use this when the user wants to: |
| 52 | - Connect a Phantom wallet in a React web app |
| 53 | - Add a "Connect Wallet" button with `useModal` or `ConnectButton` |
| 54 | - Use social login (Google/Apple) via Phantom Connect |
| 55 | - Handle wallet state with `usePhantom`, `useAccounts`, `useConnect` |
| 56 | - Sign messages or transactions with `useSolana` |
| 57 | |
| 58 | ### Wallet Connection — Browser SDK |
| 59 | **Read**: `references/browser-sdk.md` |
| 60 | **MCP tools**: None (browser-only) |
| 61 | |
| 62 | Use this when the user wants to: |
| 63 | - Integrate Phantom in vanilla JS, Vue, Svelte, or non-React frameworks |
| 64 | - Use `BrowserSDK` for wallet connection without React |
| 65 | - Detect Phantom extension with `waitForPhantomExtension` |
| 66 | - Handle events (`connect`, `disconnect`, `connect_error`) |
| 67 | |
| 68 | ### Wallet Connection — React Native |
| 69 | **Read**: `references/react-native-sdk.md` |
| 70 | **MCP tools**: None (mobile-only) |
| 71 | |
| 72 | Use this when the user wants to: |
| 73 | - Connect Phantom in an Expo / React Native app |
| 74 | - Set up `PhantomProvider` with custom URL scheme |
| 75 | - Handle the mobile OAuth redirect flow |
| 76 | - Use social login on mobile (Google/Apple) |
| 77 | |
| 78 | ### Transactions |
| 79 | **Read**: `references/transactions.md`, `references/helius-sender.md` |
| 80 | **MCP tools**: Helius (`getPriorityFeeEstimate`, `getSenderInfo`) |
| 81 | |
| 82 | Use this when the user wants to: |
| 83 | - Sign a transaction with Phantom and submit via Helius Sender |
| 84 | - Transfer SOL or SPL tokens |
| 85 | - Sign a pre-built transaction from a swap API |
| 86 | - Sign a message for authentication |
| 87 | - Handle the sign → submit → confirm flow |
| 88 | |
| 89 | ### Token Gating |
| 90 | **Read**: `references/token-gating.md`, `references/helius-das.md` |
| 91 | **MCP tools**: Helius (`getAssetsByOwner`, `searchAssets`, `getAsset`) |
| 92 | |
| 93 | Use this when the user wants to: |
| 94 | - Gate content behind token ownership |
| 95 | - Check NFT collection membership |
| 96 | - Verify wallet ownership with message signing |
| 97 | - Build server-side access control based on on-chain |