| name | Solana Development Workflows |
| description | Guide common Solana development patterns and workflows including querying data, simulating transactions, executing transfers, and analyzing programs. Activate during development conversations involving transaction workflows, data queries, or blockchain interaction patterns. |
| version | 1.0.0 |
Solana Development Workflows
This skill provides guidance on common patterns and workflows for interacting with Solana, helping users accomplish tasks efficiently and safely.
Core Workflows
Workflow 1: Query & Analyze
Purpose: Understand blockchain state without making changes.
Steps:
- User asks about an account, balance, or transaction
- Claude identifies the query type
- Claude uses Account Explorer or Transaction Analyst agent
- Results are explained in simple terms
Examples:
"What's the balance of So1111...?"
"Show me recent transactions for this address"
"What does this transaction do?"
"Who owns this account?"
Cost: Free (read-only operations)
Risk: None (no state changes)
Network: Works on any network (devnet, testnet, mainnet)
Workflow 2: Simulate & Verify
Purpose: Test a transaction without spending real money.
Steps:
- User requests a simulation: "Simulate sending 0.5 SOL to [address]"
- Claude prepares the transaction
- Claude sends it to Solana network in simulation mode
- Network predicts the result without executing
- Claude shows you what would happen
Examples:
"Can you simulate this transfer before I execute?"
"What would happen if I swapped 100 USDC?"
"Will this token account creation work?"
"Check if this transaction would succeed"
Cost: Free (no real funds spend)
Risk: None (not executed)
Network: Best on testnet/mainnet to match real conditions
Pro tip: Always simulate before executing on mainnet
Workflow 3: Execute & Confirm
Purpose: Actually perform a blockchain operation.
Steps:
- User requests execution: "Send 0.1 SOL to [address]"
- Claude reminds of network (devnet = automatic, mainnet = requires acceptance)
- Claude simulates first to verify success
- Claude explains what will happen
- Claude executes the transaction
- Claude shows transaction hash and confirmation
Examples:
"Transfer 1 SOL to [address]"
"Send 100 USDC to [recipient]"
"Execute the swap"
"Create this token account"
Cost: Real SOL/tokens (amounts vary)
Risk: Medium to high (depends on amount)
Network: Devnet (safe) or Mainnet (after /solana-accept-risk)
Safety: Requires simulation first, clear confirmations
Workflow 4: Troubleshoot & Fix
Purpose: Diagnose problems and find solutions.
Steps:
- User reports issue: "This transaction failed"
- Claude analyzes the error
- Claude explains root cause in simple terms
- Claude suggests solutions
- User implements fix and retries
Examples:
"Why did this fail?"
"Insufficient balance means?"
"How do I fix 'missing signer'?"
"What does this error mean?"
Cost: Varies (depending on fix)
Risk: None initially (diagnosis only)
Network: Any
Value: Saves debugging time
Operational Patterns
Pattern 1: Data Discovery
When: "I need to understand this account"
Steps:
- Get account address
- Query account details
- Check balance
- List token holdings
- Show recent transactions
- Explain the account's purpose
Tools: Account Explorer agent
Cost: Free
Time: Seconds
Pattern 2: Transaction Inspection
When: "I need to understand what happened"
Steps:
- Get transaction hash
- Fetch transaction details
- Break down instructions
- Identify programs involved
- Explain outcome
- Highlight relevant details
Tools: Transaction Analyst agent
Cost: Free
Time: Seconds
Pattern 3: Safe Transfer
When: "I need to send SOL/tokens"
Steps:
- Verify network (devnet, testnet, mainnet)
- Check balance is sufficient
- Verify recipient address
- Simulate the transaction
- Review simulation results
- Execute transaction
- Confirm with transaction hash
Tools: solana-onchain-mcp transfer tools
Cost: Transaction fee (~0.00005 SOL)
Time: Minutes
Pattern 4: Token Account Setup
When: "I need to prepare for token operations"
Steps:
- Identify token type (USDC, BONK, etc.)
- Check if token account exists
- If not, create token account
- Verify creation was successful
- Account is ready for transfers
Tools: solana-onchain-mcp account creation
Cost: ~0.002 SOL per account
Time: Minutes
Pattern 5: Multi-Step Operations
When: "I need to do multiple operations"
Steps:
- Break down into sub-tasks
- Execute each task safely
- Verify each step
- Proceed to next step
- Document complete flow
Example: "Swap USDC for SOL, then transfer SOL to friend"
- Swap tokens
- Verify swap completed
- Transfer SOL
- Confirm transfer
- Summarize operation
Decision Trees
"Should I use devnet or mainnet?"
Are you learning or testing new code?
├─ Yes → Use devnet (free, no risk)
└─ No → Have you tested on devnet first?
├─ No → Go test on devnet first
└─ Yes → Use testnet to test with real conditions
└─ Works on testnet? → Ready for mainnet with `/solana-accept-risk`
"How much should I send first?"
Is it your first time with this address?
├─ Yes → Send 0.01-0.1 SOL (minimal test amount)
│ └─ Verify it works → Send larger amount
└─ No → Already tested this address?
├─ Yes → Send normal amount
└─ No → Send small test amount first
"Should I simulate first?"
Is this a transaction that modifies blockchain state?
├─ No (just querying) → No simulation needed
└─ Yes (transfer, swap, etc.)
├─ First time? → ALWAYS simulate first
└─ Done it before? → Still simulate if unsure
Common Task Patterns
Task: Check if Address is Valid
1. Query the address with Account Explorer
2. If it returns data → Valid
3. If it fails → Invalid or doesn't exist
Task: Verify Funds Arrived
1. Get recipient address
2. Check current balance
3. Check balance matches expectation
4. Confirmed! (or investigate if wrong amount)
Task: Find Transaction Details
1. Get transaction hash from wallet or explorer
2. Query with Transaction Analyst
3. Explain what happened
4. Identify status (success/failed/pending)
Task: Investigate Failed Transfer
1. Get failed transaction hash
2. Analyze with Transaction Analyst
3. Identify failure reason
4. Explain what went wrong
5. Suggest fix
Task: Prepare for Mainnet
1. Test on devnet thoroughly
2. Test on testnet (real conditions)
3. Run `/solana-accept-risk`
4. Run `/solana-network mainnet-beta`
5. Execute with confidence
Parameter Patterns
Address Formats
- Full:
So1111111111111111111111111111111111111111111111 (44 chars)
- Short:
9B5... (first 3, last 3 chars)
- Both work; full is safer to avoid typos
Amount Formats
- SOL:
0.5 (decimal format)
- Token:
100 or 100.5 (depends on decimals)
- Lamports:
500000000 (if working with raw numbers)
Network Names
devnet: Testing network
testnet: Community testnet
localnet: Local validator
mainnet-beta: Production
Error Recovery
"Insufficient Balance"
- Check current balance
- Reduce transfer amount or
- Add more SOL to wallet
"Invalid Address"
- Verify address format (44 characters)
- Check for typos
- Copy from reliable source
"Network Error"
- Check internet connection
- Retry the operation
- Switch networks if needed
"Transaction Failed"
- Analyze with Transaction Analyst
- Identify root cause
- Fix issue and retry
Best Practices by Role
For Non-Technical Users
- Start on devnet always
- Ask Claude to explain before executing
- Use simulation before real transactions
- Keep amounts small until comfortable
- Double-check addresses every time
For Technical Users
- Understand network differences
- Use appropriate RPC endpoints
- Handle errors programmatically
- Optimize for speed/cost
- Automate common patterns
For Developers
- Test contracts on devnet first
- Use test wallets throughout
- Understand program architecture
- Verify contract behavior
- Document your flows
Workflow Templates
Template 1: Safe First-Time Transfer
1. `/solana-network devnet` → Switch to devnet
2. `Query balance` → Verify funds
3. `Simulate: send 0.01 SOL to [address]`
4. Review simulation results
5. `Execute transfer`
6. Verify transaction succeeded
Template 2: Mainnet Preparation
1. Test thoroughly on devnet
2. Test on testnet
3. `/solana-accept-risk` → Accept risk
4. `/solana-network mainnet-beta` → Switch to mainnet
5. Simulate transaction
6. Execute small amount
7. Verify success
8. Increase amount if confident
Template 3: Transaction Investigation
1. Get transaction hash
2. Analyze with Transaction Analyst
3. Understand what happened
4. Identify status
5. Extract relevant details
6. Learn from the transaction
Pro Tips
- Verify twice, execute once: Check addresses and amounts carefully
- Start small: 0.01 SOL is plenty to test
- Simulate always: Costs nothing, prevents mistakes
- Read output carefully: Claude explains important details
- Keep notes: Document successful addresses and patterns
- Use devnet liberally: It's free for testing
- Ask questions: Don't guess about blockchain operations