Solana Dev
solana-foundation/solana-dev-skill
A skill your agent uses when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "fuzz my…
Solana transaction construction including instruction building, account resolution, compute budget, priority fees, and versioned transactions
$ npx skills add agiprolabs/claude-trading-skills --skill solana-tx-building -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install agiprolabs/claude-trading-skills solana-tx-building --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/solana-tx-building .claude/skills/solana-tx-building && rm -rf skills-srcUse ~/.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/
Install the "solana-tx-building" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/solana-tx-building into .claude/skills/solana-tx-building/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "solana-tx-building", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/solana-tx-buildingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add agiprolabs/claude-trading-skills --skill solana-tx-building -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install agiprolabs/claude-trading-skills solana-tx-building --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/solana-tx-building .agents/skills/solana-tx-building && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "solana-tx-building" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/solana-tx-building into .agents/skills/solana-tx-building/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "solana-tx-building", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add agiprolabs/claude-trading-skills --skill solana-tx-building -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install agiprolabs/claude-trading-skills solana-tx-building --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/solana-tx-building .cursor/skills/solana-tx-building && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "solana-tx-building" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/solana-tx-building into .cursor/skills/solana-tx-building/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "solana-tx-building", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/agiprolabs/claude-trading-skills.git --path skills/solana-tx-building--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add agiprolabs/claude-trading-skills --skill solana-tx-building -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install agiprolabs/claude-trading-skills solana-tx-building --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/solana-tx-building .gemini/skills/solana-tx-building && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "solana-tx-building" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/solana-tx-building into .gemini/skills/solana-tx-building/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "solana-tx-building", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install agiprolabs/claude-trading-skills solana-tx-buildingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add agiprolabs/claude-trading-skills --skill solana-tx-building -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/solana-tx-building .github/skills/solana-tx-building && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "solana-tx-building" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/solana-tx-building into .github/skills/solana-tx-building/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "solana-tx-building", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add agiprolabs/claude-trading-skills --skill solana-tx-building -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install agiprolabs/claude-trading-skills solana-tx-building --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/solana-tx-building .opencode/skills/solana-tx-building && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "solana-tx-building" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/solana-tx-building into .opencode/skills/solana-tx-building/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "solana-tx-building", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
solana-tx-buildingSolana transaction construction including instruction building, account resolution, compute budget, priority fees, and versioned transactions
Solana Tx Building is an agent skill from agiprolabs/claude-trading-skills. Solana transaction construction including instruction building, account resolution, compute budget, priority fees, and versioned transactions
Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/common_instructions.md`, `references/transaction_anatomy.md` and `scripts/build_transfer.py`).
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.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 981e1d7. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Solana Tx Building loads about 3.1k tokens when it runs, and up to ~6.8k if it reads all its reference files. Until then it costs about 40 tokens; SKILL.md has 970 words of instructions outside code blocks.
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.
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.
The full file from agiprolabs/claude-trading-skills at commit 981e1d7, republished under its MIT licence (© agiprolabs). 970 words, ~3,084 tokens.
.claude/skills/solana-tx-building/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.This skill covers how to construct, simulate, and inspect Solana transactions programmatically. It addresses the full anatomy of a Solana transaction — from raw instruction encoding to versioned transaction formats, compute budget management, priority fees, and address lookup tables.
Safety: This skill is for transaction construction and analysis only. Scripts in this skill NEVER sign or submit real transactions. Always simulate before sending. Never auto-sign.
A Solana transaction consists of:
The hard limit is 1232 bytes for the entire serialized transaction. This constrains how many instructions and accounts you can include. Strategies to stay within the limit:
Each instruction contains three fields:
Instruction {
program_id_index: u8, // Index into the account keys array
accounts: [u8], // Indices into account keys array
data: [u8], // Opaque byte array interpreted by the program
}Every account referenced in an instruction has metadata:
AccountMeta {
pubkey: Pubkey, // 32-byte public key
is_signer: bool, // Must sign the transaction
is_writable: bool, // Will be written to by this instruction
}The four combinations determine the account's role:
| is_signer | is_writable | Role |
|---|---|---|
| true | true | Fee payer, token owner performing transfer |
| true | false | Multisig co-signer, read-only authority |
| false | true | Destination account, PDA being written |
| false | false | Program ID, sysvar, clock |
The original format. All accounts must be listed in the account keys array. With the 1232-byte limit, you can fit roughly 20-35 accounts depending on instruction data size.
Introduced to support Address Lookup Tables (ALTs). A v0 transaction includes:
0x80 for v0)address_table_lookups arrayALTs let you reference accounts by a compact index into an on-chain table rather than including the full 32-byte pubkey. This dramatically increases the number of accounts a transaction can reference.
AddressTableLookup {
account_key: Pubkey, // The ALT account address
writable_indexes: [u8], // Indices for writable accounts
readonly_indexes: [u8], // Indices for read-only accounts
}When to use v0: Any transaction referencing more than ~20 accounts, Jupiter swaps with multi-hop routes, complex DeFi interactions.
Every transaction has a compute budget that determines how many compute units (CUs) it can consume and what priority fee to pay.
Two key instructions from the Compute Budget Program (ComputeBudget111111111111111111111111111111):
1. Set Compute Unit Limit
Instruction data: [0x02, <units as u32 LE>]Sets the maximum CUs this transaction can consume. Default is 200,000 per instruction (max 1,400,000 per transaction). Setting this lower than needed causes the transaction to fail. Setting it higher wastes budget but does not cost more (you only pay for requested, not consumed).
2. Set Compute Unit Price
Instruction data: [0x03, <micro_lamports as u64 LE>]Sets the price per CU in micro-lamports. This is the priority fee mechanism. The total priority fee is:
priority_fee = compute_unit_limit * compute_unit_price / 1_000_000To estimate an appropriate priority fee:
getRecentPrioritizationFees RPC method with the accounts your transaction touchesimport httpx
def get_priority_fees(rpc_url: str, accounts: list[str]) -> list[dict]:
"""Fetch recent prioritization fees for given accounts."""
resp = httpx.post(rpc_url, json={
"jsonrpc": "2.0",
"id": 1,
"method": "getRecentPrioritizationFees",
"params": [accounts]
})
return resp.json()["result"]The simplest transaction: a System Program transfer.
# System Program transfer instruction data layout:
# [2, 0, 0, 0] (u32 LE = instruction index 2 = Transfer)
# + amount as u64 LE (lamports)
import struct
def build_sol_transfer_data(lamports: int) -> bytes:
"""Build instruction data for a SOL transfer."""
return struct.pack("<I", 2) + struct.pack("<Q", lamports)Accounts required:
Transferring SPL tokens requires the Token Program.
# Token Program transfer instruction:
# [3] (instruction index 3 = Transfer)
# + amount as u64 LE
def build_token_transfer_data(amount: int) -> bytes:
"""Build instruction data for an SPL token transfer."""
return bytes([3]) + struct.pack("<Q", amount)Accounts required:
Before transferring tokens, the recipient must have an Associated Token Account.
# ATA Program: instruction index 0 = Create
# No instruction data needed (empty bytes)
ATA_PROGRAM_ID = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"Accounts required (in order):
Jupiter provides a /swap-instructions endpoint that returns pre-built instructions. See the jupiter-api skill for full details.
General flow:
/quote/swap-instructionsAlways simulate before sending. Use the simulateTransaction RPC method:
def simulate_transaction(rpc_url: str, tx_base64: str) -> dict:
"""Simulate a transaction without submitting it.
Args:
rpc_url: Solana RPC endpoint URL.
tx_base64: Base64-encoded serialized transaction.
Returns:
Simulation result with logs and compute units consumed.
"""
resp = httpx.post(rpc_url, json={
"jsonrpc": "2.0",
"id": 1,
"method": "simulateTransaction",
"params": [
tx_base64,
{"encoding": "base64", "replaceRecentBlockhash": True}
]
})
result = resp.json()["result"]
if result["value"]["err"]:
print(f"Simulation failed: {result['value']['err']}")
for log in result["value"].get("logs", []):
print(f" {log}")
else:
cu = result["value"].get("unitsConsumed", 0)
print(f"Simulation OK — {cu} compute units consumed")
return resultThe replaceRecentBlockhash: True flag lets you simulate even if your blockhash has expired, which is useful for testing transaction construction without timing pressure.
Common transaction errors and their causes:
| Error | Cause | Fix |
|---|---|---|
BlockhashNotFound | Blockhash expired (~60-90s) | Fetch new blockhash and rebuild |
InsufficientFunds | Not enough SOL for fees + transfer | Check balance before building |
AccountNotFound | Token account doesn't exist | Create ATA first |
ProgramFailedToComplete | Exceeded compute budget | Increase compute unit limit |
TransactionTooLarge | Over 1232 bytes | Use ALTs or split into multiple txs |
InvalidAccountData | Wrong account passed to instruction | Verify account derivation |
SignatureVerificationFailed | Missing or wrong signer | Check all is_signer accounts signed |
import time
def send_with_retry(
rpc_url: str,
build_fn,
max_retries: int = 3,
base_delay: float = 0.5
) -> dict:
"""Build and send a transaction with blockhash refresh on expiry.
Args:
rpc_url: Solana RPC endpoint.
build_fn: Callable that takes a blockhash and returns a signed tx.
max_retries: Maximum retry attempts.
base_delay: Base delay between retries in seconds.
Returns:
Send result from RPC.
"""
for attempt in range(max_retries):
blockhash = get_latest_blockhash(rpc_url)
tx = build_fn(blockhash)
result = send_transaction(rpc_url, tx)
if "error" not in result:
return result
err = result["error"]
if "BlockhashNotFound" in str(err):
time.sleep(base_delay * (attempt + 1))
continue
raise RuntimeError(f"Transaction failed: {err}")
raise RuntimeError("Max retries exceeded")To decode an existing transaction from the chain:
def decode_transaction(rpc_url: str, signature: str) -> dict:
"""Fetch and return a parsed transaction.
Args:
rpc_url: Solana RPC endpoint.
signature: Transaction signature (base58).
Returns:
Parsed transaction data.
"""
resp = httpx.post(rpc_url, json={
"jsonrpc": "2.0",
"id": 1,
"method": "getTransaction",
"params": [
signature,
{"encoding": "jsonParsed", "maxSupportedTransactionVersion": 0}
]
})
return resp.json()["result"]solana-rpc: Provides the RPC connection layer for submitting and querying transactionsjupiter-api: Supplies swap instructions that this skill assembles into transactionsdex-execution: Orchestrates the full execution flow using transactions built by this skillmev-analysis: Evaluates MEV risk of constructed transactions before submissionhelius-api: Enhanced transaction parsing and webhook-based confirmation trackingBefore submitting any transaction to mainnet:
simulateTransaction before sendTransactionreferences/transaction_anatomy.md — Message format, versioned transactions, compute budget, blockhash managementreferences/common_instructions.md — Instruction layouts for System, Token, ATA, Compute Budget, Memo, and Jupiter programsscripts/build_transfer.py — Build and simulate a SOL transfer transaction (demo mode, never signs)scripts/decode_transaction.py — Fetch and decode on-chain transactions with program identification© agiprolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (scripts, references) in skills/solana-tx-building of agiprolabs/claude-trading-skills.
Open the folder on GitHubat commit 981e1d7
Solana Tx Building 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Solana Tx Building this skillagiprolabs/claude-trading-skills | 410 | — | ~3.1k | Automated safety check: Pass | MIT | |
| Solana Devsolana-foundation/solana-dev-skill | 573 | — | ~3.8k | Automated safety check: Pass | MIT | |
| Meme Coin Security Auditawarexone/Agentic-Bug-Hunter | 5.3k | 1 repos | ~2.4k | Automated safety check: Pass | MIT | |
| Swapper Depositswapperfinance/swapper-toolkit | 852 | — | ~1.8k | Automated safety check: Pass | MIT | |
| PNP Prediction Markets on Solanainternet-court/internet-court-skill | 6.6k | — | ~7.5k | Automated safety check: Notes | MIT | |
| Minara Crypto Trading and WalletMinara-AI/minara-skills | 362 | — | ~5.7k | Automated safety check: Pass | None |
solana-foundation/solana-dev-skill
A skill your agent uses when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "fuzz my…
awarexone/Agentic-Bug-Hunter
Screens EVM and Solana meme coins for rug pull signs such as hidden mint, honeypot logic and fee tricks, starting with fast kill signals before any code review.
swapperfinance/swapper-toolkit
Deposit and bridge funds into a wallet or protocol using Swapper Finance.
internet-court/internet-court-skill
Creates, trades and settles permissionless prediction markets on Solana with any SPL token as collateral, including social-media and custom-oracle markets.
Minara-AI/minara-skills
Drives the Minara CLI for crypto swaps, perps, limit orders, wallet transfers, deposits and withdrawals, plus AI market analysis.
Bonasa-Tech/manifest
A skill your agent uses when building, debugging, or integrating with the Manifest DEX on Solana, especially for TypeScript SDK usage, transaction construction with ManifestClient, market state…
agiprolabs/claude-trading-skills
Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
agiprolabs/claude-trading-skills
Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity
agiprolabs/claude-trading-skills
Broad crypto market data from CoinGecko covering 13,000+ tokens.
agiprolabs/claude-trading-skills
Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis
agiprolabs/claude-trading-skills
Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading
agiprolabs/claude-trading-skills
Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation
Works with
Solana transaction construction including instruction building, account resolution, compute budget, priority fees, and versioned transactions. Solana Tx Building is an agent skill from agiprolabs/claude-trading-skills.
Run `npx skills add agiprolabs/claude-trading-skills --skill solana-tx-building -a claude-code`. Or copy the skill folder (skills/solana-tx-building in agiprolabs/claude-trading-skills) into .claude/skills/solana-tx-building in your project. Claude Code loads it when a task matches its description.
Run `npx skills add agiprolabs/claude-trading-skills --skill solana-tx-building -a codex`. Or copy the skill folder (skills/solana-tx-building in agiprolabs/claude-trading-skills) into .agents/skills/solana-tx-building in your project. Codex loads it when a task matches its description.
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-tx-building -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-tx-building, .gemini/skills/solana-tx-building, .github/skills/solana-tx-building and .opencode/skills/solana-tx-building in your project.
Going by SKILL.md and its folder, Solana Tx Building needs Python for the scripts in its folder. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
Solana Tx Building is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.1k tokens (SKILL.md is roughly 12k 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.7k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Solana Tx Building: Solana Dev (solana-foundation/solana-dev-skill, 573 stars), Meme Coin Security Audit (awarexone/Agentic-Bug-Hunter, 5.3k stars), Swapper Deposit (swapperfinance/swapper-toolkit, 852 stars) and PNP Prediction Markets on Solana (internet-court/internet-court-skill, 6.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.