Agent skill

Phantom Connect SDK

by sendaifun in sendaifun/skills

Integrates Phantom wallet connection, social login, and transaction signing into React, React Native, or vanilla JS apps on Solana.

MITAuto-check passedBackend & APIs

Install Phantom Connect SDK

skills CLI
$ npx skills add sendaifun/skills --skill phantom-connect -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sendaifun/skills phantom-connect --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sendaifun/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/phantom-connect .claude/skills/phantom-connect && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
phantom-connect
GitHub stars
130
Token cost
~1.3k tokens
SKILL.md length
360 words
Files
8 (incl. references)
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

Integrates Phantom wallet connection, social login, and transaction signing into React, React Native, or vanilla JS apps on Solana.

  • Works in 3 steps: Phantom Portal Account — Register at… → App ID — Get from Portal → App → Set Up → Allowlisted URLs — Add domains and…
  • Adding Phantom wallet connection to a React or React Native app
  • SKILL.md covers SDK Selection, Prerequisites, Auth Providers and Critical Rules, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Three SDK packages cover three targets, @phantom/react-sdk for React web apps, @phantom/react-native-sdk for React Native or Expo, and @phantom/browser-sdk for vanilla JS, Vue, or Angular, all requiring a Phantom Portal account, an app id, and allowlisted redirect URLs. Embedded wallets add Google or Apple social login on top of the injected browser-extension provider, each requiring the app id to work.

A set of critical rules anchors correct use: always call signAndSendTransaction rather than the unsupported sign-only methods for embedded wallets, convert amounts with LAMPORTS_PER_SOL instead of hardcoding a lamport count, wrap every async SDK call in try-catch since a user can reject a prompt at any time, and keep the browser SDK a singleton rather than creating more than one instance per app.

When your agent uses it

  • Adding Phantom wallet connection to a React or React Native app
  • Adding Google or Apple social login backed by an embedded Solana wallet
  • Signing and sending a Solana transaction through a connected wallet

Example prompts

  • “Add Phantom wallet connection with Google social login to this React app.”
  • “Why is signTransaction rejected for our embedded wallet setup?”
  • “Set up token-gated access using the Phantom browser SDK.”

Requirements

  • A Phantom Portal account and app id
  • Allowlisted redirect URLs in the Phantom Portal

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Phantom Portal Account — Register at phantom.com/portal
  2. App ID — Get from Portal → App → Set Up
  3. Allowlisted URLs — Add domains and redirect URLs in Portal

What it can do on your machine

Read from SKILL.md and the folder at commit 06b36b8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • phantom.com
    • docs.phantom.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Phantom Connect SDK loads about 1.3k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 102 tokens; SKILL.md has 360 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sendaifun/skills at commit 06b36b8, republished under its MIT licence (© sendaifun). 360 words, ~1,294 tokens.

Download SKILL.mdSave it as .claude/skills/phantom-connect/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
phantom-connect
description
Build wallet-connected applications with the Phantom Connect SDK for Solana. Use when integrating Phantom wallets into React, React Native, or vanilla JS/TS apps — including wallet connection, social login (Google/Apple), transaction signing, message signing, token-gated access, crypto payments, and NFT minting. Covers @phantom/react-sdk, @phantom/react-native-sdk, and @phantom/browser-sdk.
license
MIT
metadata.author
phantom
metadata.version
1.0
metadata.homepage
https://github.com/phantom/phantom-connect-cursor-plugin

Phantom Connect SDK

Build wallet-connected Solana applications with the Phantom Connect SDK ecosystem.

SDK Selection

PlatformSDKPackage
React web appsReact SDK@phantom/react-sdk
React Native / ExpoReact Native SDK@phantom/react-native-sdk
Vanilla JS / Vue / AngularBrowser SDK@phantom/browser-sdk

Prerequisites

  1. Phantom Portal Account — Register at phantom.com/portal
  2. App ID — Get from Portal → App → Set Up
  3. Allowlisted URLs — Add domains and redirect URLs in Portal

Auth Providers

ProviderDescriptionRequires appId
"injected"Phantom browser extensionNo
"google"Google OAuth (embedded wallet)Yes
"apple"Apple ID (embedded wallet)Yes

Critical Rules

  1. Always use signAndSendTransaction — signTransaction and signAllTransactions are NOT supported for embedded wallets
  2. Always use LAMPORTS_PER_SOL from @solana/web3.js for amount conversion — never hardcode 1000000000
  3. Wrap all async SDK calls in try-catch — users can reject prompts at any time
  4. Check isConnected before signing — verify wallet connection before any operation
  5. React Native: react-native-get-random-values must be the FIRST import — before any other imports
  6. BrowserSDK must be a singleton — create one instance per app, never multiple
  7. Import AddressType from @phantom/browser-sdk only
  8. Use devnet for testing, mainnet-beta for production — never test against mainnet with real funds
  9. Never expose private keys — Phantom handles all signing internally
  10. Embedded wallet spending limit: $1,000 USD per day per app per user
  11. Social login sessions persist 7 days from last auth event — handle expiration gracefully
Show full SKILL.md (135 more words)Show less

Quick Start

React SDK
tsx
import { PhantomProvider, useModal, usePhantom, darkTheme } from "@phantom/react-sdk";
import { AddressType } from "@phantom/browser-sdk";

function App() {
  return (
    <PhantomProvider
      config={{
        providers: ["google", "apple", "injected"],
        appId: "your-app-id",
        addressTypes: [AddressType.solana],
        authOptions: { redirectUrl: "https://yourapp.com/callback" },
      }}
      theme={darkTheme}
    >
      <YourApp />
    </PhantomProvider>
  );
}
React Native SDK
tsx
// CRITICAL: Must be first import
import "react-native-get-random-values";
import { PhantomProvider, AddressType, darkTheme } from "@phantom/react-native-sdk";

// Requires app.json: { "expo": { "scheme": "myapp", "plugins": [...] } }
Browser SDK
ts
import { BrowserSDK, AddressType } from "@phantom/browser-sdk";

const sdk = new BrowserSDK({
  providers: ["google", "apple", "injected"],
  appId: "your-app-id",
  addressTypes: [AddressType.solana],
  autoConnect: true,
});

Reference Docs

For detailed implementation patterns, read these files:

Common Issues

IssueSolution
"appId required"Add appId from Phantom Portal when using google/apple providers
Redirect not workingAllowlist redirectUrl in Phantom Portal
React Native crashesImport react-native-get-random-values as FIRST import
Extension not detectedUse waitForPhantomExtension() with timeout
signTransaction errorUse signAndSendTransaction instead — embedded wallets don't support signTransaction

Resources

© sendaifun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in skills/phantom-connect of sendaifun/skills.

  • SKILL.md
  • references/browser-sdk.md
  • references/nft-minting.md
  • references/payments.md
  • references/react-native-sdk.md
  • references/react-sdk.md
  • references/token-gating.md
  • references/transactions.md

Open the folder on GitHubat commit 06b36b8

Compare with similar skills

Phantom Connect SDK next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Phantom Connect SDK compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Phantom Connect SDK this skillsendaifun/skills130—~1.3kAutomated safety check: PassMIT
Add Channel Connect Buttonnovuhq/novu40k—~1.6kAutomated safety check: PassCustom licence
Phantom Connect and DFlowinternet-court/internet-court-skill6.6k—~1.8kAutomated safety check: PassMIT
Solana Devsolana-foundation/solana-dev-skill573—~3.8kAutomated safety check: PassMIT
Jazz UI Developmentgarden-co/classic-jazz2.5k—~1.7kAutomated safety check: PassMIT
Elevenlabs Agentsjezweb/claude-skills1.1k—~3.3kAutomated safety check: PassMIT

Similar skills

  • Build a new channel Connect button (e.g. An agent skill from novuhq/novu.

    40k GitHub stars~1.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Phantom Connect and DFlow

    internet-court/internet-court-skill

    Builds Solana wallet-connected apps with Phantom Connect SDKs for React, React Native and vanilla JS, plus DFlow spot swaps and market-data streaming.

    6.6k GitHub stars~1.8k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Solana Dev

    solana-foundation/solana-dev-skill

    A skill your agent uses when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "fuzz my…

    573 GitHub stars~3.8k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Jazz UI Development

    garden-co/classic-jazz

    A skill your agent uses when building, debugging, or optimizing Jazz applications.

    2.5k GitHub stars~1.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Elevenlabs Agents

    jezweb/claude-skills

    Build conversational AI voice agents on the ElevenLabs platform.

    1.1k GitHub stars~3.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Frontmcp Auth UI

    agentfront/frontmcp

    A skill your agent uses when customizing, branding, or replacing the built-in FrontMCP OAuth pages (the login, consent, federated-select, incremental-authorization, and error pages) with your own…

    146 GitHub stars~3.7k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from sendaifun/skills

All 24 skills in this repo
  • Breaks a shared video or GIF down frame by frame to recreate its motion as working code instead of guessing the timing by eye.

    130 GitHub stars~2.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Builds and debugs Arcium encrypted computation apps on Solana: Arcis circuits, Anchor orchestration, encrypted inputs and the init, queue and callback flow.

    130 GitHub stars~2.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Coingecko

    sendaifun/skills

    Complete CoinGecko Solana API integration for token prices, DEX pool data, OHLCV charts, trades, and market analytics.

    130 GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check: notes
  • Integrating Jupiter

    sendaifun/skills

    Comprehensive guidance for integrating Jupiter APIs (Ultra Swap, Lend, Perps, Trigger, Recurring, Tokens, Price, Portfolio, Prediction Markets, Send, Studio, Lock, Routing).

    130 GitHub starsUsed in 1 repo~5.1k tokens
    Auto-check passed
  • Pinocchio Development

    sendaifun/skills

    Comprehensive guide for building high-performance Solana programs using Pinocchio - the zero-dependency, zero-copy framework.

    130 GitHub starsUsed in 1 repo~4.1k tokens
    Auto-check passed
  • Ranger Finance

    sendaifun/skills

    Ranger Finance SDK for building perpetual futures trading applications on Solana.

    130 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes

Questions about Phantom Connect SDK

What does Phantom Connect SDK do?

Integrates Phantom wallet connection, social login, and transaction signing into React, React Native, or vanilla JS apps on Solana. Three SDK packages cover three targets, @phantom/react-sdk for React web apps, @phantom/react-native-sdk for React Native or Expo, and @phantom/browser-sdk for vanilla JS, Vue, or Angular, all requiring a Phantom Portal account, an app id, and allowlisted redirect URLs. Embedded wallets add Google or Apple social login on top of the injected browser-extension provider, each requiring the app id to work.

When should I use Phantom Connect SDK?

Phantom Connect SDK fits situations like: adding Phantom wallet connection to a React or React Native app; adding Google or Apple social login backed by an embedded Solana wallet; signing and sending a Solana transaction through a connected wallet.

How do I install Phantom Connect SDK in Claude Code?

Run `npx skills add sendaifun/skills --skill phantom-connect -a claude-code`. Or copy the skill folder (skills/phantom-connect in sendaifun/skills) into .claude/skills/phantom-connect in your project. Claude Code loads it when a task matches its description.

How do I install Phantom Connect SDK in Codex?

Run `npx skills add sendaifun/skills --skill phantom-connect -a codex`. Or copy the skill folder (skills/phantom-connect in sendaifun/skills) into .agents/skills/phantom-connect in your project. Codex loads it when a task matches its description.

Can I use Phantom Connect SDK in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sendaifun/skills --skill phantom-connect -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/phantom-connect, .gemini/skills/phantom-connect, .github/skills/phantom-connect and .opencode/skills/phantom-connect in your project.

What does Phantom Connect SDK need to run?

SKILL.md names no scripts, command-line tools or credentials: Phantom Connect SDK is instructions for the agent only. Our summary lists: A Phantom Portal account and app id; Allowlisted redirect URLs in the Phantom Portal.

Does Phantom Connect SDK access the network?

SKILL.md names 3 domains. As links in the text: phantom.com, docs.phantom.com and github.com. This is read from the text; nothing was executed.

Is Phantom Connect SDK safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Phantom Connect SDK use?

Phantom Connect SDK is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Phantom Connect SDK use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 10k tokens, read only when the agent opens those files.

What are the alternatives to Phantom Connect SDK?

Skills that share tags, products or a category with Phantom Connect SDK: Add Channel Connect Button (novuhq/novu, 40k stars), Phantom Connect and DFlow (internet-court/internet-court-skill, 6.6k stars), Solana Dev (solana-foundation/solana-dev-skill, 573 stars) and Jazz UI Development (garden-co/classic-jazz, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Phantom Connect SDK?

sendaifun (a GitHub organization) maintains it in sendaifun/skills, which has 130 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on July 31, 2026.

Source: sendaifun/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.