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.
npx agentmods add commands/solanabr/solana-ai-kit/migrate-web3git 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.svg" alt="Measured on agentmods" 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.00015 | $0.01930 |
| Opus 5 | $0.00008 | $0.00965 |
| Sonnet 5 | $0.00003 | $0.00386 |
| Haiku 4.5 | $0.00002 | $0.00193 |
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 6d 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, 0 lines differ
- migrate-web3 — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are migrating a codebase from @solana/web3.js to @solana/kit (the modern Solana TypeScript SDK). This is a file-by-file migration with verification.
Related Skills
- ext/solana-dev/skill/references/kit-web3-interop.md - Kit/web3.js interop patterns and boundary handling
- ext/solana-dev/skill/references/frontend-framework-kit.md - Kit-first frontend patterns
Step 1: Detect web3.js Usage
echo "Scanning for @solana/web3.js usage..."
echo ""
# Find all files importing web3.js
echo "Files importing @solana/web3.js:"
grep -rn "from.*@solana/web3\.js" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" . | grep -v node_modules | grep -v ".next"
echo ""
echo "Total files:"
grep -rl "from.*@solana/web3\.js" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" . | grep -v node_modules | grep -v ".next" | wc -l
echo ""
echo "Import breakdown:"
grep -roh "import.*from.*@solana/web3\.js" --include="*.ts" --include="*.tsx" . | grep -v node_modules | sort | uniq -c | sort -rn
Step 2: Detect Specific APIs in Use
echo "Detecting specific web3.js APIs in use..."
echo ""
# Connection usage
echo "Connection instances:"
grep -rn "new Connection\|Connection(" --include="*.ts" --include="*.tsx" . | grep -v node_modules | wc -l
# PublicKey usage
echo "PublicKey usage:"
grep -rn "new PublicKey\|PublicKey\." --include="*.ts" --include="*.tsx" . | grep -v node_modules | wc -l
# Transaction usage
echo "Transaction/VersionedTransaction:"
grep -rn "new Transaction\|VersionedTransaction\|TransactionInstruction" --include="*.ts" --include="*.tsx" . | grep -v node_modules | wc -l
# Keypair usage
echo "Keypair usage:"
grep -rn "Keypair\." --include="*.ts" --include="*.tsx" . | grep -v node_modules | wc -l
# sendTransaction
echo "sendTransaction calls:"
grep -rn "sendTransaction\|sendAndConfirmTransaction" --include="*.ts" --include="*.tsx" . | grep -v node_modules | wc -l
# Token program
echo "SPL Token usage:"
grep -rn "@solana/spl-token" --include="*.ts" --include="*.tsx" . | grep -v node_modules | wc -l
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.
- 6d 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 (99 stars, last pushed 16d ago), licensed MIT. It adds 15 tokens to every session and 1,930 once invoked, about $0.0001 per session on Opus 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.
format
Auto-format code and fix TypeScript issues.
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.
nxt-component
Generates a Next.js + TypeScript + Tailwind component. Auto-detects project conventions (naming, folder structure, function style) from existing components.
generate-idl-client
Generate TypeScript client from Solana program IDL using Codama or Anchor.
migrate-web3
Migrate from @solana/web3.js to @solana/kit.