Agent skill

Solana Kit Migration

by sendaifun in sendaifun/skills

Helps developers understand when to use @solana/kit vs @solana/web3.js (v1), provides migration guidance, API mappings, and handles edge cases for Solana JavaScript SDK transitions

Apache-2.0Auto-check passedBusiness, Finance & HR

Install Solana Kit Migration

skills CLI
$ npx skills add sendaifun/skills --skill solana-kit-migration -a claude-code

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

GitHub CLI
$ gh skill install sendaifun/skills solana-kit-migration --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/solana-kit-migration .claude/skills/solana-kit-migration && 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
solana-kit-migration
GitHub stars
130
Used in
1 other repo
Token cost
~2.6k tokens
SKILL.md length
585 words
Files
11 (incl. scripts)
Skills in repo
24
Repo updated
First seen
Licence
Apache-2.0

At a glance

Helps developers understand when to use @solana/kit vs @solana/web3.js (v1), provides migration guidance, API mappings, and handles edge cases for Solana JavaScript SDK transitions

  • Works in 12 steps: Analyze Current Codebase → Check Dependencies → Assess Migration Complexity → …
  • Tasks that involve Crypto and DeFi analysis
  • SKILL.md covers Overview, When to Use Each Library, Quick Decision Flowchart and Instructions for Migration…, plus 5 more sections
  • Runs Shell and JavaScript scripts from its folder

What it does

Solana Kit Migration is an agent skill from sendaifun/skills. Helps developers understand when to use @solana/kit vs @solana/web3.js (v1), provides migration guidance, API mappings, and handles edge cases for Solana JavaScript SDK transitions

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 16 other files, including scripts (for example `docs/edge-cases.md`, `examples/mixed-codebase/anchor-with-kit.md` and `examples/v1-to-kit/basic-transfer.md`).

It sits in Business, Finance & HR, covering Crypto and DeFi analysis. It works with Solana and JavaScript. The repository describes itself as: a public marketplace of all solana-related skills for agents to learn from! The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Crypto and DeFi analysis

Example prompts

  • “Use the solana-kit-migration skill to help developers understand when to use @solana/kit vs @solana/web3.js (v1), provides migration guidance, API…”
  • “/solana-kit-migration”

Requirements

  • Node.js
  • A Bash shell

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Analyze Current Codebase
  2. Check Dependencies
  3. Assess Migration Complexity
  4. Recommend Strategy
  5. BigInt Conversion
  6. Base58 Encoding Errors
  7. Async Keypair Generation
  8. RPC Method Chaining
  9. PublicKey vs Address
  10. Transaction Signing
  11. Anchor Incompatibility
  12. Subscription Handling

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

    Ships 2 files in scripts/ (Shell and JavaScript), which the agent can run.

    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):

    • 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

Solana Kit Migration loads about 2.6k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 585 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from sendaifun/skills at commit 06b36b8, republished under its Apache-2.0 licence (© sendaifun). 585 words, ~2,613 tokens.

Download SKILL.mdSave it as .claude/skills/solana-kit-migration/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
solana-kit-migration
description
Helps developers understand when to use @solana/kit vs @solana/web3.js (v1), provides migration guidance, API mappings, and handles edge cases for Solana JavaScript SDK transitions

Solana Kit Migration Assistant

This skill helps you navigate the transition between @solana/web3.js (v1.x) and @solana/kit (formerly web3.js 2.0), providing guidance on when to use each library and how to migrate between them.

Overview

The Solana JavaScript ecosystem has two major SDK options:

LibraryStatusUse Case
@solana/web3.js (1.x)Maintenance modeLegacy projects, Anchor-dependent apps
@solana/kitActive developmentNew projects, performance-critical apps

Key Decision: @solana/kit is the future, but migration isn't always straightforward.

When to Use Each Library

Use @solana/kit When:
  1. Starting a new project without Anchor dependencies
  2. Bundle size matters - Kit is tree-shakeable (26% smaller bundles)
  3. Performance is critical - ~200ms faster confirmation latency, 10x faster crypto ops
  4. Using standard programs (System, Token, Associated Token)
  5. Building browser applications where bundle size impacts load time
  6. Type safety is important - Better TypeScript support catches errors at compile time
  7. Using modern JavaScript - Native BigInt, WebCrypto, AsyncIterators
Use @solana/web3.js (v1.x) When:
  1. Using Anchor - Anchor doesn't support Kit out of the box yet
  2. Existing large codebase - Migration cost outweighs benefits
  3. Dependencies require v1 - Check if your SDKs support Kit
  4. Rapid prototyping - v1's OOP style may be more familiar
  5. Documentation/examples - More community resources for v1
Use Both (Hybrid Approach) When:
  1. Gradual migration - Use @solana/compat for interoperability
  2. Mixed dependencies - Some libs require v1, some support Kit
  3. Feature-by-feature migration - Convert hot paths first

Quick Decision Flowchart

START
  │
  ├─ New project? ─────────────────────────────────────────┐
  │     │                                                   │
  │     ├─ Using Anchor? ──► YES ──► Use @solana/web3.js   │
  │     │                                                   │
  │     └─ No Anchor? ──► Use @solana/kit                  │
  │                                                         │
  └─ Existing project? ────────────────────────────────────┤
        │                                                   │
        ├─ Performance issues? ──► Consider migration      │
        │                                                   │
        ├─ Bundle size issues? ──► Consider migration      │
        │                                                   │
        └─ Working fine? ──► Stay with current SDK         │

Instructions for Migration Analysis

When a user asks about migration, follow these steps:

Step 1: Analyze Current Codebase

Run the migration analysis script to detect:

  • Which SDK version is currently used
  • Anchor dependencies
  • Third-party SDK dependencies
  • Usage patterns that need migration
bash
# Use the analyze-migration.sh script in scripts/
./scripts/analyze-migration.sh /path/to/project
Step 2: Check Dependencies

Look for these blocking dependencies:

  • @coral-xyz/anchor or @project-serum/anchor - Wait for Anchor Kit support
  • SDKs that haven't migrated (check their package.json)
Step 3: Assess Migration Complexity

Count occurrences of these patterns that need changes:

  • new Connection(...) → createSolanaRpc(...)
  • Keypair.fromSecretKey(...) → createKeyPairSignerFromBytes(...)
  • new PublicKey(...) → address(...)
  • new Transaction() → createTransactionMessage(...)
  • Class-based patterns → Functional composition with pipe()
Step 4: Recommend Strategy

Based on findings, recommend:

  • Full Migration: If no blockers and < 50 migration points
  • Gradual Migration: If 50-200 migration points, use @solana/compat
  • Wait: If Anchor-dependent or critical SDKs don't support Kit
  • Hybrid: If only specific modules need Kit performance
Show full SKILL.md (215 more words)Show less

API Migration Reference

See resources/api-mappings.md for complete mappings. Key conversions:

Connection → RPC
typescript
// v1
const connection = new Connection(url, 'confirmed');
const balance = await connection.getBalance(pubkey);

// Kit
const rpc = createSolanaRpc(url);
const { value: balance } = await rpc.getBalance(address).send();
Keypair → KeyPairSigner
typescript
// v1
const keypair = Keypair.fromSecretKey(secretKey);
console.log(keypair.publicKey.toBase58());

// Kit
const signer = await createKeyPairSignerFromBytes(secretKey);
console.log(signer.address);
Transaction Building
typescript
// v1
const tx = new Transaction().add(
  SystemProgram.transfer({
    fromPubkey: sender.publicKey,
    toPubkey: recipient,
    lamports: amount,
  })
);
tx.recentBlockhash = blockhash;
tx.feePayer = sender.publicKey;

// Kit
const tx = pipe(
  createTransactionMessage({ version: 0 }),
  tx => setTransactionMessageFeePayer(sender.address, tx),
  tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx),
  tx => appendTransactionMessageInstruction(
    getTransferSolInstruction({
      source: sender,
      destination: address(recipient),
      amount: lamports(BigInt(amount)),
    }),
    tx
  ),
);

Edge Cases & Gotchas

1. BigInt Conversion

Kit uses native BigInt everywhere. Watch for:

typescript
// WRONG - will fail
const amount = 1000000000;

// CORRECT
const amount = 1_000_000_000n;
// or
const amount = BigInt(1000000000);
// or use helper
const amount = lamports(1_000_000_000n);
2. Base58 Encoding Errors

Kit may require explicit encoding:

typescript
// If you see: "Encoded binary (base 58) data should be less than 128 bytes"
// Add encoding parameter:
await rpc.getAccountInfo(address, { encoding: 'base64' }).send();
3. Async Keypair Generation

Kit keypair creation is async (uses WebCrypto):

typescript
// v1 - synchronous
const keypair = Keypair.generate();

// Kit - MUST await
const keypair = await generateKeyPairSigner();
4. RPC Method Chaining

Kit RPC calls require .send():

typescript
// v1
const balance = await connection.getBalance(pubkey);

// Kit - don't forget .send()!
const { value: balance } = await rpc.getBalance(address).send();
5. PublicKey vs Address

These are different types and not interchangeable:

typescript
// Use @solana/compat for conversion
import { fromLegacyPublicKey, toLegacyPublicKey } from '@solana/compat';

const kitAddress = fromLegacyPublicKey(legacyPublicKey);
const legacyPubkey = toLegacyPublicKey(kitAddress);
6. Transaction Signing

Signing flow is different:

typescript
// v1
transaction.sign(keypair);
// or
const signed = await connection.sendTransaction(tx, [keypair]);

// Kit - use signer pattern
const signedTx = await signTransactionMessageWithSigners(txMessage);
const signature = await sendAndConfirmTransaction(signedTx);
7. Anchor Incompatibility

Anchor generates v1 types. If using Anchor:

typescript
// Keep @solana/web3.js for Anchor interactions
import { Connection, PublicKey } from '@solana/web3.js';
import { Program } from '@coral-xyz/anchor';

// Use Kit for non-Anchor parts if needed
// Bridge with @solana/compat
8. Subscription Handling

Kit uses AsyncIterators:

typescript
// v1
const subscriptionId = connection.onAccountChange(pubkey, callback);
connection.removeAccountChangeListener(subscriptionId);

// Kit - use AbortController
const abortController = new AbortController();
const notifications = await rpcSubscriptions
  .accountNotifications(address)
  .subscribe({ abortSignal: abortController.signal });

for await (const notification of notifications) {
  // handle notification
}
// To unsubscribe:
abortController.abort();
9. VersionedTransaction Migration
typescript
// v1
const versionedTx = new VersionedTransaction(messageV0);

// Kit - transactions are versioned by default
const tx = createTransactionMessage({ version: 0 });
10. Lookup Tables

Address Lookup Tables work differently:

typescript
// v1
const lookupTable = await connection.getAddressLookupTable(tableAddress);
const messageV0 = new TransactionMessage({...}).compileToV0Message([lookupTable.value]);

// Kit
// Lookup tables are handled in transaction compilation
// See resources/lookup-tables-example.md

Alternative: Consider Gill

If Kit feels too low-level, consider Gill:

  • Built on Kit primitives
  • Higher-level abstractions
  • Simpler API for common tasks
  • Full Kit compatibility
typescript
import { createSolanaClient, sendSol } from 'gill';

const client = createSolanaClient({ rpcUrl });
await sendSol(client, { from: signer, to: recipient, amount: lamports(1n) });

Guidelines

  • Always check Anchor compatibility before recommending Kit migration
  • Recommend @solana/compat for gradual migrations
  • Bundle size benefits matter most for browser applications
  • Performance benefits matter most for high-throughput backends
  • Don't migrate stable, working code without clear benefits
  • Test thoroughly - Kit has different error types and behaviors

Files in This Skill

solana-kit-migration/
├── SKILL.md                          # This file
├── scripts/
│   ├── analyze-migration.sh          # Codebase analysis script
│   └── detect-patterns.js            # Pattern detection utility
├── resources/
│   ├── api-mappings.md               # Complete API reference
│   ├── compatibility-matrix.md       # SDK compatibility info
│   └── package-comparison.md         # Feature comparison
├── examples/
│   ├── v1-to-kit/                    # Migration examples
│   │   ├── basic-transfer.md
│   │   ├── token-operations.md
│   │   └── subscription-handling.md
│   └── mixed-codebase/               # Hybrid approach examples
│       └── anchor-with-kit.md
└── docs/
    └── edge-cases.md                 # Detailed edge cases

Notes

  • Kit was released as @solana/web3.js@2.0.0 on December 16, 2024
  • It was later renamed to @solana/kit to avoid confusion
  • The 1.x line is in maintenance mode but still widely used
  • Migration tooling is evolving - check for updates regularly

© sendaifun, Apache-2.0. 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 10 other files (scripts) in skills/solana-kit-migration of sendaifun/skills.

  • SKILL.md
  • docs/edge-cases.md
  • examples/mixed-codebase/anchor-with-kit.md
  • examples/v1-to-kit/basic-transfer.md
  • examples/v1-to-kit/subscription-handling.md
  • examples/v1-to-kit/token-operations.md
  • resources/api-mappings.md
  • resources/compatibility-matrix.md
  • resources/package-comparison.md
  • scripts/analyze-migration.sh
  • scripts/detect-patterns.js

Open the folder on GitHubat commit 06b36b8

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sendaifun/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Solana Kit Migration 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.

Solana Kit Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Solana Kit Migration this skillsendaifun/skills1301 repos~2.6kAutomated safety check: PassApache-2.0
Phantom Connect and DFlowinternet-court/internet-court-skill6.6k—~1.8kAutomated safety check: PassMIT
Alchemy Upgrade Migrationjeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT
CCXT Crypto Exchange Library2025Emma/vibe-coding-cn23k1 repos~4.4kAutomated safety check: PassMIT
Birdeye DeFi Market Datainternet-court/internet-court-skill6.6k1 repos~3.8kAutomated safety check: PassApache-2.0
GLAM Solana Vault Managementinternet-court/internet-court-skill6.6k1 repos~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • 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
  • Alchemy Upgrade Migration

    jeremylongshore/tons-of-skills-marketplace

    Migrate archived Alchemy JavaScript SDK integrations to current capability-specific clients with parity, canary, and rollback evidence.

    2.8k GitHub stars~1.3k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • CCXT Crypto Exchange Library

    2025Emma/vibe-coding-cn

    Reference help for the CCXT library covering crypto exchange APIs, market data, trading and order management across 150+ exchanges in JavaScript, Python and PHP.

    23k GitHub starsUsed in 1 repo~4.4k tokens
    Business, Finance & HRAuto-check passed
  • Birdeye DeFi Market Data

    internet-court/internet-court-skill

    Queries the Birdeye API for token prices, OHLCV candles, trending and new tokens, holder data, security checks and wallet P&L, with WebSocket streams for live prices and whale alerts.

    6.6k GitHub starsUsed in 1 repo~3.8k tokens
    Business, Finance & HRAuto-check passed
  • GLAM Solana Vault Management

    internet-court/internet-court-skill

    Creates and manages tokenized Solana vaults with the GLAM CLI and TypeScript SDK, including Jupiter swaps, Kamino lending, staking, access control and investor subscriptions.

    6.6k GitHub starsUsed in 1 repo~1.8k tokens
    Business, Finance & HRAuto-check passed
  • Metaplex on Solana

    internet-court/internet-court-skill

    Directs Metaplex work on Solana: NFTs, tokens, compressed NFTs, Candy Machine drops, Genesis launches and the agent registry, using the mplx CLI by default and Umi or Kit for code.

    6.6k GitHub stars~2.5k tokensUpdated 1 mo ago
    DevelopmentAuto-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
  • Phantom Connect SDK

    sendaifun/skills

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

    130 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • 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

Questions about Solana Kit Migration

What does Solana Kit Migration do?

Helps developers understand when to use @solana/kit vs @solana/web3.js (v1), provides migration guidance, API mappings, and handles edge cases for Solana JavaScript SDK transitions. Solana Kit Migration is an agent skill from sendaifun/skills.

When should I use Solana Kit Migration?

Solana Kit Migration fits situations like: tasks that involve Crypto and DeFi analysis.

How do I install Solana Kit Migration in Claude Code?

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

How do I install Solana Kit Migration in Codex?

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

Can I use Solana Kit Migration 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 solana-kit-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/solana-kit-migration, .gemini/skills/solana-kit-migration, .github/skills/solana-kit-migration and .opencode/skills/solana-kit-migration in your project.

What does Solana Kit Migration need to run?

Going by SKILL.md and its folder, Solana Kit Migration needs a shell and JavaScript for the scripts in its folder. Our summary lists: Node.js; A Bash shell.

Does Solana Kit Migration access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Solana Kit Migration 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Solana Kit Migration use?

Solana Kit Migration is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Solana Kit Migration use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Solana Kit Migration?

Skills that share tags, products or a category with Solana Kit Migration: Phantom Connect and DFlow (internet-court/internet-court-skill, 6.6k stars), Alchemy Upgrade Migration (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), CCXT Crypto Exchange Library (2025Emma/vibe-coding-cn, 23k stars) and Birdeye DeFi Market Data (internet-court/internet-court-skill, 6.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Solana Kit Migration?

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.