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.
git clone --depth 1 https://github.com/solanabr/solana-ai-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/solanabr/solana-ai-kit/migrate-web3)<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/migrate-web3"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/migrate-web3/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/migrate-web3"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/migrate-web3.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00020 | $0.01046 |
| Opus 5.5 | $0.00008 | $0.00418 |
| Sonnet 5.5 | $0.00004 | $0.00209 |
| Haiku 4.5 | $0.00002 | $0.00105 |
Grade A, and why
migrate-web3 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 25d 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.
Copies of this mod
2 near-identical copies found in the catalogue:
- migrate-web3 — 100% identical, 218 lines differ
- migrate-web3 — 100% identical, 218 lines differ
How it starts
The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migrate @solana/web3.js 1.x code to @solana/kit. $ARGUMENTS can limit the scope to paths or packages; empty means the whole repo.
Read first: kit-web3-interop.md (choosing the target, dependency boundaries) and kit/overview.md (the current plugin-client API). Detailed mappings and edge cases: solana-kit-migration, with its resources/api-mappings.md and docs/edge-cases.md. Where it disagrees with kit/overview.md (older type names, no plugin client), follow kit/overview.md.
Steps
- Inventory: run the migration skill's
scripts/analyze-migration.sh <path>, or grep for@solana/web3.jsand@solana/spl-tokenimports outsidenode_modules. List the dependencies that need v1 objects (Connection, syncKeypair), such as the Anchor TS client, wallet-adapter and protocol SDKs. - Agree the target with the user:
- Kit plugin client (
createClient().use(...)) for code you own. - web3.js v3 (
@solana/web3.js@rc, the v1 classes rebuilt on Kit) as a stepping stone for a large v1 codebase. It is a release candidate, so pin exact versions; its official migration skill is linked from kit-web3-interop.md. - Code that must keep v1 objects stays behind one adapter module that converts at the seam with
@solana/compat(fromLegacyPublicKey,fromLegacyKeypair,fromLegacyTransactionInstruction,fromVersionedTransaction).
- Kit plugin client (
- Migrate leaf utilities first, then shared modules, then pages and entry points. Run
npx tsc --noEmitafter each file and the tests after each module. - Finish when no
@solana/web3.jsimport remains outside the adapter, tests pass, and unused packages are gone from package.json.
Mappings that commonly go wrong
| web3.js 1.x | @solana/kit |
|---|---|
new Connection(url) |
createClient().use(solanaRpc({ rpcUrl })), or createSolanaRpc(url) + createSolanaRpcSubscriptions(wsUrl); raw RPC calls end in .send() |
new PublicKey(s), .equals() |
address(s): a branded string, compared with === |
Keypair.generate(), Keypair.fromSecretKey(b) |
await generateKeyPairSigner(), await createKeyPairSignerFromBytes(b) (async, WebCrypto) |
new Transaction() + sendAndConfirmTransaction |
client.sendTransaction([ix]), or pipe(createTransactionMessage({ version: 0 }), ...), then signTransactionMessageWithSigners and sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions }) |
TransactionInstruction |
the Instruction type (IInstruction is the old name) |
SystemProgram.transfer |
getTransferSolInstruction from @solana-program/system |
@solana/spl-token |
@solana-program/token or @solana-program/token-2022 (Codama-generated) |
number lamports, LAMPORTS_PER_SOL |
bigint: lamports(1_000_000_000n), solToLamports(sol('1.5')); RPC numbers come back as bigint |
bs58 |
getBase58Codec() |
@solana/wallet-adapter-* |
@solana/kit-plugin-wallet (hooks in /react) with @solana/react; see frontend.md |
@coral-xyz/anchor |
@anchor-lang/core, which still uses v1 types: keep it behind the adapter or replace it with a Codama client (/generate-idl-client) |
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.
- 25d ago Changed · -162 lines · +5 tokens per session 8d42336c387b
- 26d ago Changed d96f80dcefc6
- 1mo ago First seen · 202 lines · 15 tokens per session scan A 757ec17e73dc
migrate-web3 is a command published in the GitHub repository solanabr/solana-ai-kit (104 stars, last pushed 26d ago), licensed MIT. It adds 20 tokens to every session and 1,046 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
types
Hostile audit of the static type layer: assume every any, every suppression, and every unchecked cast is hiding a real type error until proven otherwise. The type checker is only as strong as the escape hatches punched through it — this command finds every hole.
nxt-component
Generates a Next.js + TypeScript + Tailwind component. Auto-detects project conventions (naming, folder structure, function style) from existing components.
nxt-api-route
Generates a Next.js App Router API route handler (route.ts) with proper TypeScript types, request validation, and error handling. Auto-detects auth patterns from the project.
format
Auto-format code and fix TypeScript issues.
/build-fix
Incrementally fix TypeScript and build errors one at a time, verifying each fix before moving on.
checklist
Generate a custom checklist for the current feature based on user requirements.