phantom-connect

A software development guide for connecting Phantom wallets to Solana applications. It covers React, React Native, and browser JavaScript or TypeScript apps, including wallet login and transaction signing.

In plain words
What is it for?
Use it to add wallet connections, Google or Apple sign-in, message or transaction signing, token-gated access, crypto payments, and NFT minting to Solana apps.
Why use it?
It clarifies which Phantom SDK and connection method to use for each app type and highlights important handling for rejected prompts, amounts, and embedded wallets.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/phantom/phantom-agent-kit/phantom-connect
Any agent
npx skills add phantom/phantom-agent-kit --skill phantom-connect
Clone the repo
git clone --depth 1 https://github.com/phantom/phantom-agent-kit

Made for: Claude Code, Codex.

Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00086 $0.01259
Opus 5 $0.00043 $0.00629
Sonnet 5 $0.00017 $0.00252
Haiku 4.5 $0.00009 $0.00126

Measured 2d ago against content hash eb6b48197cb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

phantom-connect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to phantom-connect — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/phantom-connect/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Phantom Connect SDK

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

SDK Selection

Platform SDK Package
React web apps React SDK @phantom/react-sdk
React Native / Expo React Native SDK @phantom/react-native-sdk
Vanilla JS / Vue / Angular Browser 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

Provider Description Requires appId
"injected" Phantom browser extension No
"google" Google OAuth (embedded wallet) Yes
"apple" Apple ID (embedded wallet) Yes

Critical Rules

  1. Always use signAndSendTransactionsignTransaction 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

Quick Start

React SDK

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>
  );
}

Read the full file on GitHub · 132 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 132 lines · 86 tokens per session scan A eb6b48197cb0

Subscribe to this mod's changes

phantom-connect is a skill published in the GitHub repository phantom/phantom-agent-kit (11 stars, last pushed 14d ago), licensed MIT. It adds 86 tokens to every session and 1,259 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to phantom-connect, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

upgrade-browser

Upgrade browser versions (Chrome or Firefox) in the Flutter Web Engine and/or Framework tests. Use when asked to roll or upgrade Chrome or Firefox to a newer version.

flutter/flutter · 36 tokens

generate-component-spec

Maps a Figma component from the Chrome Design System (CDS) to equivalent C++ Views, WebUI, and Clank (Android) components in the Chromium codebase. Generates a comprehensive side-by-side comparative Markdown specification detailing layout variants, interactive states, design tokens, architectural and implementation…

chromium/chromium · 90 tokens

generate-token-map

Maps all Figma design tokens from figma-variables.md to their equivalent C++ (Views) identifiers, CSS (WebUI) variables, and Clank (Android) resource attributes/macros/methods in Chromium, and saves the formatted mapping table to the assets directory of the Chrome Design System project. Use this skill when asked to…

chromium/chromium · 81 tokens

android-unit-test

Guide for writing and converting Chromium Android unit tests across host Robolectric (chromejunittests) and on-device (chromepublicunittestapk) suites.

chromium/chromium · 36 tokens

android-test-batching

Guide for auditing and applying batching annotations (@Batch) and AutoReset rules (AutoResetCtaTransitTestRule) to Android javatests in Chromium. Use this skill when optimizing Java instrumentation test runtimes, resolving test state leaks, or migrating tests to batched execution.

chromium/chromium · 60 tokens

keep-sorted

Automatically detects misordered lists in code (like Android XMLs), injects go/keep-sorted tags, sorts them, and creates CLs.

chromium/chromium · 34 tokens