Agent skill

Solana Rpc

by agiprolabs in agiprolabs/claude-trading-skills

Direct Solana blockchain interaction via JSON-RPC — account lookups, token balances, transaction submission, and program queries

MITAuto-check passedBackend & APIs

Install Solana Rpc

skills CLI
$ npx skills add agiprolabs/claude-trading-skills --skill solana-rpc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install agiprolabs/claude-trading-skills solana-rpc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/solana-rpc .claude/skills/solana-rpc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
solana-rpc
GitHub stars
410
Token cost
~2.3k tokens
SKILL.md length
344 words
Files
6 (incl. scripts, references)
Skills in repo
68
Repo updated
First seen
Licence
MIT

At a glance

Direct Solana blockchain interaction via JSON-RPC — account lookups, token balances, transaction submission, and program queries

  • Tasks that involve gRPC and Protobuf
  • SKILL.md covers Quick Start, RPC Providers, Core Read Methods and Write Methods, plus 5 more sections
  • Runs Python scripts from its folder; reaches api.mainnet-beta.solana.com

What it does

Solana Rpc is an agent skill from agiprolabs/claude-trading-skills. Direct Solana blockchain interaction via JSON-RPC — account lookups, token balances, transaction submission, and program queries

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/error_handling.md`, `references/methods.md` and `references/providers.md`).

It sits in Backend & APIs, covering gRPC and Protobuf. It works with Solana. The repository describes itself as: 68 trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools. The licence is MIT.

When your agent uses it

  • Tasks that involve gRPC and Protobuf

Example prompts

  • “/solana-rpc”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 981e1d7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.mainnet-beta.solana.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Solana Rpc loads about 2.3k tokens when it runs, and up to ~5.7k if it reads all its reference files. Until then it costs about 35 tokens; SKILL.md has 344 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from agiprolabs/claude-trading-skills at commit 981e1d7, republished under its MIT licence (© agiprolabs). 344 words, ~2,281 tokens.

Download SKILL.mdSave it as .claude/skills/solana-rpc/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
solana-rpc
description
Direct Solana blockchain interaction via JSON-RPC — account lookups, token balances, transaction submission, and program queries

Solana RPC — Direct Blockchain Interaction

The Solana JSON-RPC API provides direct read/write access to the blockchain. Use it for account state queries, token balance lookups, transaction building and submission, and program account enumeration. This is the low-level foundation when higher-level APIs (Birdeye, Helius, SolanaTracker) don't have the data you need.

Quick Start

python
import httpx

RPC = os.getenv("SOLANA_RPC_URL", "https://api.mainnet-beta.solana.com")

def rpc_call(method: str, params: list = None) -> dict:
    resp = httpx.post(RPC, json={
        "jsonrpc": "2.0", "id": 1,
        "method": method, "params": params or [],
    }, timeout=30.0)
    return resp.json()

# Get SOL balance
result = rpc_call("getBalance", ["WALLET_PUBKEY"])
sol_balance = result["result"]["value"] / 1e9

# Get latest blockhash
result = rpc_call("getLatestBlockhash")
blockhash = result["result"]["value"]["blockhash"]

RPC Providers

ProviderFree TierPaidNotes
Helius50K credits/day$49+/moEnhanced RPCs, DAS API
QuickNodeLimited$49+/moMulti-chain, WebSocket
TritonNo free tier~$300+/moYellowstone gRPC bundled
ShyftLimited$49+/moYellowstone gRPC bundled
Alchemy300M CU/moScalingGood free tier
Public (mainnet-beta)Free—Rate limited, unreliable

Recommendation: Use Helius or QuickNode for development. Never use public RPC for production trading.

Core Read Methods

Account & Balance
python
# SOL balance (in lamports, divide by 1e9 for SOL)
getBalance(pubkey, {commitment: "confirmed"})

# Full account info (data, owner, lamports, executable)
getAccountInfo(pubkey, {encoding: "jsonParsed"})

# Multiple accounts in one call
getMultipleAccounts([pubkey1, pubkey2], {encoding: "jsonParsed"})
Token Accounts
python
# All SPL token accounts owned by a wallet
getTokenAccountsByOwner(wallet_pubkey, {
    "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
}, {"encoding": "jsonParsed"})

# Token balance for a specific token account
getTokenAccountBalance(token_account_pubkey)

# Largest token accounts (top holders)
getTokenLargestAccounts(mint_pubkey)

# Total supply of a token
getTokenSupply(mint_pubkey)
Transaction Data
python
# Get parsed transaction by signature
getTransaction(signature, {
    "encoding": "jsonParsed",
    "maxSupportedTransactionVersion": 0,
})

# Recent transaction signatures for an address
getSignaturesForAddress(pubkey, {
    "limit": 20,
    "before": "optional_signature",  # pagination cursor
})

# Transaction status
getSignatureStatuses([sig1, sig2])
Block & Slot
python
# Current slot
getSlot({commitment: "confirmed"})

# Block data
getBlock(slot, {
    "encoding": "jsonParsed",
    "transactionDetails": "full",
    "maxSupportedTransactionVersion": 0,
})

# Latest blockhash (needed for tx building)
getLatestBlockhash({commitment: "confirmed"})

# Slot leader schedule
getLeaderSchedule()
Program Accounts
python
# All accounts owned by a program (with filters)
getProgramAccounts(program_pubkey, {
    "encoding": "jsonParsed",
    "filters": [
        {"dataSize": 165},  # Filter by account data size
        {"memcmp": {         # Filter by data content
            "offset": 32,
            "bytes": "base58_encoded_value",
        }},
    ],
})

Warning: getProgramAccounts without filters can return millions of results and timeout. Always use dataSize and/or memcmp filters.

Priority Fees
python
# Recent priority fee estimates
getRecentPrioritizationFees([account_pubkey])
# Returns array of { slot, prioritizationFee } for recent slots

# Minimum rent for account
getMinimumBalanceForRentExemption(data_length)

Write Methods

Send Transaction
python
# Send a signed, serialized transaction
sendTransaction(base64_tx, {
    "encoding": "base64",
    "skipPreflight": False,
    "preflightCommitment": "confirmed",
    "maxRetries": 3,
})

# Simulate before sending
simulateTransaction(base64_tx, {
    "encoding": "base64",
    "sigVerify": False,
    "commitment": "confirmed",
})
Transaction Confirmation
python
import time

def confirm_transaction(rpc_url: str, signature: str, timeout: float = 30.0) -> bool:
    """Poll for transaction confirmation."""
    start = time.time()
    while time.time() - start < timeout:
        result = rpc_call("getSignatureStatuses", [[signature]])
        statuses = result.get("result", {}).get("value", [None])
        if statuses[0] is not None:
            status = statuses[0]
            if status.get("err"):
                return False
            if status.get("confirmationStatus") in ("confirmed", "finalized"):
                return True
        time.sleep(0.5)
    return False

Commitment Levels

LevelDescriptionUse When
processedSingle node confirmationSpeed over safety
confirmedSupermajority (2/3+)Default for trading
finalizedMaximum supermajority + 31 slotsCritical operations

Always specify commitment explicitly. Default varies by provider.

Common Patterns

Get All Token Holdings for a Wallet
python
def get_wallet_tokens(wallet: str) -> list[dict]:
    """Get all SPL token holdings with metadata."""
    result = rpc_call("getTokenAccountsByOwner", [
        wallet,
        {"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},
        {"encoding": "jsonParsed"},
    ])
    tokens = []
    for acct in result["result"]["value"]:
        info = acct["account"]["data"]["parsed"]["info"]
        tokens.append({
            "mint": info["mint"],
            "amount": int(info["tokenAmount"]["amount"]),
            "decimals": info["tokenAmount"]["decimals"],
            "ui_amount": info["tokenAmount"]["uiAmount"],
        })
    return [t for t in tokens if t["amount"] > 0]
Get Top Holders of a Token
python
def get_top_holders(mint: str) -> list[dict]:
    """Get the 20 largest holders of a token."""
    result = rpc_call("getTokenLargestAccounts", [mint])
    supply_result = rpc_call("getTokenSupply", [mint])
    total_supply = int(supply_result["result"]["value"]["amount"])

    holders = []
    for acct in result["result"]["value"]:
        amount = int(acct["amount"])
        holders.append({
            "address": acct["address"],
            "amount": amount,
            "decimals": acct["decimals"],
            "ui_amount": acct["uiAmount"],
            "percentage": amount / total_supply * 100 if total_supply > 0 else 0,
        })
    return holders
Batch RPC Calls
python
def rpc_batch(calls: list[tuple[str, list]]) -> list[dict]:
    """Execute multiple RPC calls in a single HTTP request."""
    payload = [
        {"jsonrpc": "2.0", "id": i, "method": method, "params": params}
        for i, (method, params) in enumerate(calls)
    ]
    resp = httpx.post(RPC, json=payload, timeout=30.0)
    results = resp.json()
    results.sort(key=lambda r: r["id"])
    return [r.get("result") for r in results]

Key Program IDs

ProgramID
System11111111111111111111111111111111
SPL TokenTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
Token-2022TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Associated TokenATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL
Raydium AMM675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8
Raydium CLMMCAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK
Orca WhirlpoolwhirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc
Meteora DLMMLBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo
PumpFun6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P
Jupiter v6JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4
Compute BudgetComputeBudget111111111111111111111111111111

When to Use Direct RPC vs Higher-Level APIs

NeedUse
Token balance checkDirect RPC (getTokenAccountsByOwner)
Top 20 holdersDirect RPC (getTokenLargestAccounts)
Historical OHLCVBirdeye or SolanaTracker
Parsed transaction historyHelius Enhanced Transactions
Token metadata (name, image)Helius DAS API
Real-time streamingYellowstone gRPC
Wallet PnL trackingSolanaTracker
Token risk scoringSolanaTracker
Cross-chain dataDexScreener or CoinGecko

Files

References
  • references/methods.md — Complete RPC method reference with parameters and response schemas
  • references/error_handling.md — Error codes, rate limits, timeout handling, retry strategies
  • references/providers.md — RPC provider comparison with pricing and features
Scripts
  • scripts/wallet_scanner.py — Scan wallet for all token holdings with balances
  • scripts/token_holders.py — Get top holders and concentration metrics for any token

© agiprolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/solana-rpc of agiprolabs/claude-trading-skills.

  • SKILL.md
  • references/error_handling.md
  • references/methods.md
  • references/providers.md
  • scripts/token_holders.py
  • scripts/wallet_scanner.py

Open the folder on GitHubat commit 981e1d7

Compare with similar skills

Solana Rpc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Solana Rpc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Solana Rpc this skillagiprolabs/claude-trading-skills410—~2.3kAutomated safety check: PassMIT
Release Rebasejito-foundation/geyser-grpc-plugin145—~836Automated safety check: PassCustom licence
Alchemy APImoonpay/skills113—~2.1kAutomated safety check: PassMIT
Quicknode Skillinternet-court/internet-court-skill6.6k—~11kAutomated safety check: PassMIT
Quicknodesendaifun/skills1301 repos~5.5kAutomated safety check: NotesApache-2.0
Alchemy OfficialLeoYeAI/openclaw-master-skills2.2k—~6.1kAutomated safety check: PassMIT

Similar skills

  • Release Rebase

    jito-foundation/geyser-grpc-plugin

    A skill your agent uses when updating this repo to match a new jito-solana release line such as v4.0.

    145 GitHub stars~836 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Alchemy API

    moonpay/skills

    Integrates Alchemy blockchain APIs using an API key. An agent skill from moonpay/skills.

    113 GitHub stars~2.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Quicknode Skill

    internet-court/internet-court-skill

    Quicknode blockchain infrastructure for 80+ chains: Core RPC API, Streams, Webhooks, Blazar WSS, Solana gRPC, HyperCore gRPC, SQL Explorer, Metaplex DAS API, Blockbook, Ordinals & Runes API, Swap…

    6.6k GitHub stars~11k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Quicknode

    sendaifun/skills

    Quicknode blockchain infrastructure for Solana — RPC endpoints, DAS API (Digital Asset Standard) for NFTs and compressed assets, Yellowstone gRPC streaming, Priority Fee API, Streams (real-time data…

    130 GitHub starsUsed in 1 repo~5.5k tokens
    Backend & APIsAuto-check: notes
  • Alchemy Official

    LeoYeAI/openclaw-master-skills

    Official Alchemy skill. An agent skill from LeoYeAI/openclaw-master-skills.

    2.2k GitHub stars~6.1k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed

More from agiprolabs/claude-trading-skills

All 68 skills in this repo
  • Backtrader

    agiprolabs/claude-trading-skills

    Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Birdeye API

    agiprolabs/claude-trading-skills

    Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity

    410 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Coingecko API

    agiprolabs/claude-trading-skills

    Broad crypto market data from CoinGecko covering 13,000+ tokens.

    410 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Cointegration Analysis

    agiprolabs/claude-trading-skills

    Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis

    410 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Copy Trading

    agiprolabs/claude-trading-skills

    Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Correlation Analysis

    agiprolabs/claude-trading-skills

    Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation

    410 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Solana Rpc

What does Solana Rpc do?

Direct Solana blockchain interaction via JSON-RPC — account lookups, token balances, transaction submission, and program queries. Solana Rpc is an agent skill from agiprolabs/claude-trading-skills.

When should I use Solana Rpc?

Solana Rpc fits situations like: tasks that involve gRPC and Protobuf.

How do I install Solana Rpc in Claude Code?

Run `npx skills add agiprolabs/claude-trading-skills --skill solana-rpc -a claude-code`. Or copy the skill folder (skills/solana-rpc in agiprolabs/claude-trading-skills) into .claude/skills/solana-rpc in your project. Claude Code loads it when a task matches its description.

How do I install Solana Rpc in Codex?

Run `npx skills add agiprolabs/claude-trading-skills --skill solana-rpc -a codex`. Or copy the skill folder (skills/solana-rpc in agiprolabs/claude-trading-skills) into .agents/skills/solana-rpc in your project. Codex loads it when a task matches its description.

Can I use Solana Rpc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agiprolabs/claude-trading-skills --skill solana-rpc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/solana-rpc, .gemini/skills/solana-rpc, .github/skills/solana-rpc and .opencode/skills/solana-rpc in your project.

What does Solana Rpc need to run?

Going by SKILL.md and its folder, Solana Rpc needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Solana Rpc access the network?

SKILL.md names 1 domain. In commands or code: api.mainnet-beta.solana.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Solana Rpc safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Solana Rpc use?

Solana Rpc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Solana Rpc use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.

What are the alternatives to Solana Rpc?

Skills that share tags, products or a category with Solana Rpc: Release Rebase (jito-foundation/geyser-grpc-plugin, 145 stars), Alchemy API (moonpay/skills, 113 stars), Quicknode Skill (internet-court/internet-court-skill, 6.6k stars) and Quicknode (sendaifun/skills, 130 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Solana Rpc?

agiprolabs (a GitHub user) maintains it in agiprolabs/claude-trading-skills, which has 410 GitHub stars. The repository holds 68 skills in this directory. The repository was last updated on September 3, 2026.

Source: agiprolabs/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.