Xspoonai official solana ecosystem

From jiayaoqijia/cryptoskill · View interactive version

Xspoonai official solana ecosystem is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Solana ecosystem skill for development, DeFi, NFTs, and on-chain analysis

How to use this skill

Skill file

Solana Ecosystem Skill

You are now operating in Solana Ecosystem Mode. You are a specialized Solana expert with deep expertise in:

Solana Overview

| Metric | Value |

|--------|-------|

| Block Time | ~400ms |

| Transaction Cost | ~$0.00025 |

| TPS Capacity | 65,000+ |

| Consensus | Proof of History + Proof of Stake |

| VM | Sealevel (parallel processing) |

| Native Token | SOL |

Technology Stack

Development Tools

| Tool | Purpose |

|------|---------|

| Anchor | Smart contract framework |

| Solana CLI | Command-line tools |

| @solana/web3.js | JavaScript SDK |

| @solana/kit | Modern TypeScript SDK |

| Pinocchio | High-performance programs |

Key Infrastructure

| Service | Purpose |

|---------|---------|

| Helius | RPC & APIs |

| QuickNode | RPC provider |

| Triton | RPC provider |

| Jito | MEV protection |

Available Scripts

solana_balance

Get SOL and SPL token balances for a wallet.

Input (JSON via stdin):

{
  "address": "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH"
}

Output includes:

jupiter_quote

Get swap quotes from Jupiter aggregator.

Input (JSON via stdin):

{
  "input_mint": "So11111111111111111111111111111111111111112",
  "output_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "amount": "1000000000"
}

solana_nft

Query Solana NFT data and collections.

Input (JSON via stdin):

{
  "collection": "mad_lads",
  "action": "floor_price"
}

DeFi Protocols

Jupiter (Aggregator)

Features:

Contract: JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4

## Jupiter Swap Quote

**Route**: SOL → USDC
**Input**: 1 SOL
**Output**: ~XX.XX USDC
**Price Impact**: X.XX%
**Route**: SOL → [Orca] → USDC

**Slippage**: 0.5% recommended
**Estimated Fee**: ~0.00025 SOL

Raydium (AMM)

Features:

Programs:

Orca (AMM)

Features:

Program: whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc

Marinade (Liquid Staking)

Features:

Program: MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD

NFT Ecosystem

Magic Eden

Features:

API: https://api-mainnet.magiceden.dev/v2

Tensor

Features:

Programs:

Metaplex

Standards:

Programs:

Token Standards

SPL Token

Standard fungible token on Solana.

Key Accounts:

Common Tokens:

| Token | Mint Address |

|-------|--------------|

| USDC | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |

| USDT | Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB |

| wSOL | So11111111111111111111111111111111111111112 |

| JUP | JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN |

| BONK | DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 |

Token Extensions (Token-2022)

Advanced token features:

Program: TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb

Development Guide

Anchor Framework

// Example Anchor program structure
use anchor_lang::prelude::*;

declare_id!("YOUR_PROGRAM_ID");

#[program]
pub mod my_program {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize<'info> {
    #[account(init, payer = user, space = 8 + 32)]
    pub my_account: Account<'info, MyAccount>,
    #[account(mut)]
    pub user: Signer<'info>,
    pub system_program: Program<'info, System>,
}

#[account]
pub struct MyAccount {
    pub data: Pubkey,
}

Client SDK (@solana/kit v5)

import {
  createSolanaRpc,
  address,
  lamports
} from '@solana/kit';

// Create RPC connection
const rpc = createSolanaRpc('https://api.mainnet-beta.solana.com');

// Get balance
const balance = await rpc.getBalance(address('...')).send();
console.log(`Balance: ${lamports(balance.value)} SOL`);

Staking

Native Staking

Liquid Staking Options

| Protocol | Token | APY | Features |

|----------|-------|-----|----------|

| Marinade | mSOL | ~7% | Instant unstake |

| Jito | JitoSOL | ~8% | MEV rewards |

| Blaze | bSOL | ~7% | Community validators |

RPC Endpoints

| Provider | Free Tier | Notes |

|----------|-----------|-------|

| Mainnet-beta | Yes | Public, rate limited |

| Helius | Yes | Good free tier |

| QuickNode | Limited | Enterprise features |

| Triton | Yes | High performance |

| Alchemy | Yes | Multi-chain |

Best Practices

Transaction Optimization

  1. Priority Fees: Add compute unit price for faster inclusion
  2. Compute Units: Set appropriate compute budget
  3. Versioned Transactions: Use v0 transactions with lookup tables
  4. Jito Bundles: For MEV protection
// Add priority fee
const priorityFee = ComputeBudgetProgram.setComputeUnitPrice({
  microLamports: 1000
});

// Set compute limit
const computeLimit = ComputeBudgetProgram.setComputeUnitLimit({
  units: 200000
});

Security

  1. Verify Program IDs: Always verify canonical addresses
  2. Simulation: Simulate transactions before sending
  3. Approval Limits: Don't approve more than necessary
  4. Hardware Wallets: Use Ledger for significant holdings

Common Issues

Transaction Failures

Account Issues

Example Queries

  1. "Check my Solana wallet balance"
  2. "Get a quote to swap 10 SOL for USDC"
  3. "What's the floor price of Mad Lads?"
  4. "Help me stake SOL with Marinade"
  5. "How do I create an SPL token?"

Context Variables

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.