agentleFS
Vo1ganinVo1ganin/crypto-claude-skills/skills/solana-rpc/SKILL.md

solana-rpc

Skill2 starsChanged 3 months agoMITView on GitHub

Expert assistant for Solana JSON-RPC — works with any provider: QuickNode, Helius, Triton, Ankr, Chainstack, or public endpoints. Standard JSON-RPC methods are identical across providers; only the URL differs.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. agiprolabs/claude-trading-skills★ 366same name
    2. IngAs8/ClaudeSkill★ 0same name
    3. Serennity007/claude-trading-skills-67★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 3 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When in doubt: check references/helius-extensions.md first — if Helius has a purpose-built endpoint, use it.

    line 49
  2. Very specific:

    If you're querying NFTs or tokens by collection/owner: use DAS instead (getAssetsByGroup, getAssetsByOwner).

    line 75
  3. Distinctive:

    All Solana RPC calls need a URL.

    line 81
  4. Distinctive:

    If user has both Helius and QuickNode, you can configure fallback:

    line 101
  5. Very specific:

    Read account data → getAccountInfo, getMultipleAccounts

    line 110
  6. Very specific:

    Read tx → getTransaction (raw) or Helius Enhanced (parsed)

    line 111
  7. Very specific:

    Read history → getSignaturesForAddress + batch getTransaction, OR Helius getTransactionsForAddress

    line 112
  8. Very specific:

    Read token balances/NFTs → DAS getAssetsByOwner (preferred) or getTokenAccountsByOwner

    line 113
  9. Distinctive:

    If > 3 items of same method → batch them in one HTTP request.

    line 119
  10. Very specific:

    Default confirmed for reads

    line 122
  11. Very specific:

    Never processed for production (may revert)

    line 124

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Solana RPC Skill

Reference files:

  • references/core-methods.md — standard Solana JSON-RPC methods, parameters, response shapes
  • references/helius-extensions.md — DAS API, Enhanced Transactions, Priority Fee, Sender, LaserStream
  • references/quicknode-extensions.md — qn_estimatePriorityFees, Metaplex DAS addon, Jito
  • references/patterns.md — batching, rate limits, resume, cost optimization
  • references/examples/ — working Python scripts

🚨 Rule #1: use the provider's parsed/enhanced APIs when available

The biggest credit waste on Solana RPC is fetching raw data and parsing it yourself when the provider offers a parsed endpoint. Matrix:

TaskCheap optionExpensive / broken option
Wallet NFTs + tokensHelius DAS getAssetsByOwnergetTokenAccountsByOwner + metadata lookups
Complete tx historyHelius getTransactionsForAddressgetSignaturesForAddress + N × getTransaction
Parsed DEX swap detailsHelius Enhanced Tx or SolscangetTransaction + manual program parsing
NFTs by collectionDAS getAssetsByGroup / searchAssetsgetProgramAccounts (expensive + slow)
Priority fee estimategetPriorityFeeEstimate (Helius) or qn_estimatePriorityFees (QuickNode)getRecentPrioritizationFees (raw, needs math)
Compressed NFT historyDAS getSignaturesForAssetgetSignaturesForAddress (doesn't work for cNFTs)

When in doubt: check references/helius-extensions.md first — if Helius has a purpose-built endpoint, use it.

🚨 Rule #2: batch JSON-RPC requests

Single HTTP request can carry an array of JSON-RPC calls:

[
  {"jsonrpc":"2.0","id":1,"method":"getTransaction","params":["sig1",{"encoding":"jsonParsed","maxSupportedTransactionVersion":0}]},
  {"jsonrpc":"2.0","id":2,"method":"getTransaction","params":["sig2",{"encoding":"jsonParsed","maxSupportedTransactionVersion":0}]},
  ...up to ~100 items
]

Response is an array. Most providers count each call individually but save massive HTTP overhead. Always batch when fetching N items of same shape.

See references/patterns.md for semaphore tuning and provider-specific batch limits.

🚨 Rule #3: never getProgramAccounts without tight filters

getProgramAccounts scans ALL accounts under a program. On popular programs (SPL Token, Token 2022, NFT programs) it's catastrophically slow and expensive, often times out.

Always apply:

  • dataSize filter (exact byte length)
  • memcmp filter (matches at specific offset) — typically for mint address, owner, or discriminator

If you're querying NFTs or tokens by collection/owner: use DAS instead (getAssetsByGroup, getAssetsByOwner).


Setup: provider URL

All Solana RPC calls need a URL. Configure via env var:

# Helius
export SOLANA_RPC_URL="https://mainnet.helius-rpc.com/?api-key=YOUR_KEY"

# QuickNode
export SOLANA_RPC_URL="https://YOUR-ENDPOINT.solana-mainnet.quiknode.pro/YOUR-TOKEN/"

# Ankr
export SOLANA_RPC_URL="https://rpc.ankr.com/solana/YOUR_KEY"

# Public (DON'T use for production)
export SOLANA_RPC_URL="https://api.mainnet-beta.solana.com"

Scripts read from SOLANA_RPC_URL. Never hardcode. If user has separate endpoints for archive vs. frontend (common on QuickNode), support SOLANA_RPC_URL_ARCHIVE additionally.

Multi-provider fallback (optional)

If user has both Helius and QuickNode, you can configure fallback:

  • SOLANA_RPC_URL_PRIMARY — first choice
  • SOLANA_RPC_URL_FALLBACK — used when PRIMARY hits 429 or errors 5×× persistently

Script pattern in references/examples/.

Step-by-step workflow

1. Classify the task

  • Read account data → getAccountInfo, getMultipleAccounts
  • Read tx → getTransaction (raw) or Helius Enhanced (parsed)
  • Read history → getSignaturesForAddress + batch getTransaction, OR Helius getTransactionsForAddress
  • Read token balances/NFTs → DAS getAssetsByOwner (preferred) or getTokenAccountsByOwner
  • Submit tx → sendTransaction or Helius Sender (better landing rate)
  • Estimate fee → getPriorityFeeEstimate (Helius) or qn_estimatePriorityFees (QuickNode)
  • Stream real-time → WebSocket / LaserStream (not polling)

2. Check for batch opportunities If > 3 items of same method → batch them in one HTTP request. Don't loop.

3. Pick commitment level

  • Default confirmed for reads
  • finalized for financial audit / history
  • Never processed for production (may revert)

4. Execute (MCP or script)

  • Single call: curl or httpx inline
  • Batch: Python script with aiohttp + JSON-RPC array, output JSONL

5. Present results

  • Lamports → divide by 1e9 for SOL
  • Token amounts → divide by 10^decimals
  • Timestamps: block_time is unix seconds (no sub-second precision on getBlockTime)

Common mistakes & error codes

ErrorCauseFix
-32009 "Slot ... skipped"Asked for a slot that wasn't producedUse getBlock with commitment: "confirmed" and skip error silently
-32602 Invalid paramsWrong encoding / missing maxSupportedTransactionVersion: 0Add "maxSupportedTransactionVersion": 0 to all tx reads
429 Too Many RequestsRate limitRespect provider's Retry-After, lower semaphore
Response timeout on getBlockLarge response (~MBs)Set HTTP timeout ≥ 30s; consider transactionDetails: "signatures" or accounts if full tx not needed
Empty result on getSignaturesForAddressNo sigs in the range OR wrong before/until cursorsVerify cursor with getSignatureStatuses
DAS methods missingNot Helius/QuickNode with DAS addonFall back to raw RPC or enable addon

Memory updates

Old memory says:

  • "QuickNode getTransaction: ~10k/min, ~15KB response, 3x faster than Solscan for single-tx" — ✅ still valid
  • "getBlock: ~30s timeout needed, large response" — ✅ still valid
  • "getBlockTime: seconds precision only" — ✅ still valid

Add:

  • maxSupportedTransactionVersion: 0 is required for modern tx reads — otherwise you get "Transaction version (0) is not supported" errors on v0 tx
  • Helius DAS now supports fungible tokens too (showFungible: true on getAssetsByOwner)
  • Priority fee: prefer getPriorityFeeEstimate (Helius) over raw getRecentPrioritizationFees

Reference files

  • references/core-methods.md — standard Solana JSON-RPC: accounts, blocks, transactions, fees
  • references/helius-extensions.md — DAS, Enhanced Tx, Priority Fee, Sender, Webhooks, LaserStream
  • references/quicknode-extensions.md — qn_estimatePriorityFees, DAS addon, Jito
  • references/patterns.md — batching details, rate limits, fallback, cost
  • references/examples/fetch_tx_batch.py — batched getTransaction for N signatures
  • references/examples/wallet_full_history.py — Helius getTransactionsForAddress with pagination
  • references/examples/wallet_holdings_das.py — DAS getAssetsByOwner with full token metadata

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.