solana-kit-migration

Guides migration from @solana/web3.js v1 to @solana/kit with API mappings and codebase analysis.

6|20|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/andresdefi/cryptoskills --skill solana-kit-migration-andresdefi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solana-kit-migration
Source: https://github.com/andresdefi/cryptoskills/tree/main/skills/solana-kit-migration
Command: npx skills add https://github.com/andresdefi/cryptoskills --skill solana-kit-migration-andresdefi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Solana developers face uncertainty when choosing between @solana/web3.js (v1) and @solana/kit, and migrating existing codebases involves many breaking changes: async keypair generation, BigInt amounts, functional transaction building with pipe(), and different RPC patterns that cause subtle runtime errors. ## Core Features & Use Cases - Decision Guidance: Clear criteria and a flowchart for choosing between @solana/web3.js v1, @solana/kit, or a hybrid approach using @solana/compat, including Anchor compatibility checks. - Automated Codebase Analysis: Shell and Node.js scripts scan a project for v1 patterns (Connection, Keypair, PublicKey, Transaction usage), count migration points, detect blocking dependencies, and recommend a migration strategy. - Complete API Reference: Detailed mappings for RPC calls, keypairs, transactions, subscriptions, and PDAs, plus edge-case documentation covering BigInt serialization, .send() requirements, and encoding errors. - Use Case: A developer with an existing Solana dApp runs the analysis script, discovers 120 migration points with no Anchor dependency, and follows the checklist to incrementally migrate using @solana/compat. ## Quick Start Analyze my Solana project and tell me whether I should migrate from @solana/web3.js to @solana/kit and how to do it.

Frequently Asked Questions about solana-kit-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from @solana/web3.js to @solana/kit?

Replace Connection with createSolanaRpc, convert Keypair to async createKeyPairSignerFromBytes, change new PublicKey to address(), and rebuild transactions using pipe() with createTransactionMessage. Use @solana/compat for gradual migration of large codebases.

Should I use @solana/kit or @solana/web3.js for a new project?

Use @solana/kit for new projects without Anchor dependencies: it offers smaller bundles, faster confirmations, and better type safety. Stay on web3.js v1 if you depend on Anchor, which does not support Kit yet.

Does Anchor work with @solana/kit?

No, Anchor currently requires @solana/web3.js v1 and does not support Kit natively. Use a hybrid approach: keep v1 for Anchor program interactions and use Kit for non-Anchor operations, bridging types with @solana/compat.

Why does my @solana/kit RPC call return a pending request object?

Kit RPC methods return a request builder, not the result directly. You must append .send() to every call, for example await rpc.getBalance(address).send(), and destructure the wrapped response with { value }.

Why does JSON.stringify fail after migrating to @solana/kit?

Kit uses native BigInt for all lamport amounts, and BigInt is not JSON-serializable by default. Convert values with toString() before serialization or pass a custom replacer function to JSON.stringify.

When should I not migrate to @solana/kit?

Avoid migration when your project depends on Anchor, when critical third-party SDKs like Metaplex or Raydium lack Kit support, or when a large stable codebase has no performance or bundle-size problems justifying the effort.