Index of every page on this site: llms.txt
All skills
Run it yourself

Use 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 program", "deploy to devnet", "send a v1 transaction", "support larger transactions", "fix maxSupportedTransactionVersion", or "explain Solana concepts" (rent, accounts, PDAs, CPIs). Also for program architecture (state layout, compute units, throughput, naming), quick on-chain lookups via public RPC + curl, gasless or sponsored-fee transactions (Kora), server-side signing with KMS/Turnkey/Privy/Fireblocks (Solana Keychain), and issuing stablecoins or allowlisted tokens (Mosaic). Covers wallets, Anchor/Pinocchio, Codama clients, Surfpool/LiteSVM/Mollusk testing, security review, and v1 transactions (SIMD-0385). Prefers @solana/kit 8 plugin clients building transaction v1 by default, @solana/kit-plugin-wallet + @solana/react for wallets, web3.js v3 as the legacy migration target, and Surfpool for local networks.

Use this Skill: https://skilld.dev/gh/solana-foundation/solana-dev-skill/solana-dev

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referenceskitprogramssystem.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

System Program

Solana's built-in program for creating accounts, transferring SOL, and managing durable nonces. Every on-chain account is created through this program.

If using plugin clients, prefer client.use(systemProgram()) for a fluent API. The low-level instructions below are for manual pipe() transaction building. See overview.md and plugins.md.

Program address: 11111111111111111111111111111111

import { SYSTEM_PROGRAM_ADDRESS } from '@solana-program/system';

Account Types

Nonce

Durable nonces replace blockhash lifetimes — use for offline signing or delayed submission.

import { fetchNonce, getNonceSize } from '@solana-program/system';

const size = getNonceSize(); // 80 bytes
const nonce = await fetchNonce(rpc, nonceAddress);
// nonce.data.authority, nonce.data.blockhash

Key Instructions

Create Account

Allocates a new account with a given size and owner. Fund with enough lamports for rent-exemption (getMinimumBalanceForRentExemption).

import { getCreateAccountInstruction } from '@solana-program/system';
import { lamports } from '@solana/kit';

const ix = getCreateAccountInstruction({
  payer,
  newAccount,
  lamports: lamports(minRent),
  space: accountSize,
  programAddress: ownerProgram,
});

Transfer SOL

import { getTransferSolInstruction } from '@solana-program/system';
import { lamports } from '@solana/kit';

const ix = getTransferSolInstruction({
  source: payer,
  destination: recipient.address,
  amount: lamports(1_000_000_000n), // 1 SOL
});

Initialize Nonce Account

import { getInitializeNonceAccountInstruction } from '@solana-program/system';

const ix = getInitializeNonceAccountInstruction({
  nonceAccount,
  nonceAuthority: authority.address,
});

Advance Nonce

import { getAdvanceNonceAccountInstruction } from '@solana-program/system';

const ix = getAdvanceNonceAccountInstruction({
  nonceAccount,
  nonceAuthority: authority,
});

Complete Pattern: Create Account + Transfer

import {
  pipe, createTransactionMessage, setTransactionMessageFeePayerSigner,
  setTransactionMessageLifetimeUsingBlockhash, appendTransactionMessageInstructions,
  fillTransactionMessageProvisoryResourceLimits,
  estimateResourceLimitsFactory, estimateAndSetResourceLimitsFactory,
  signTransactionMessageWithSigners, sendAndConfirmTransactionFactory,
  assertIsTransactionWithBlockhashLifetime, generateKeyPairSigner, lamports,
} from '@solana/kit';
import { getCreateAccountInstruction, getTransferSolInstruction, SYSTEM_PROGRAM_ADDRESS } from '@solana-program/system';

// Generate new account
const newAccount = await generateKeyPairSigner();

// Get minimum rent
const minRent = await rpc.getMinimumBalanceForRentExemption(0n).send();

const { value: latestBlockhash } = await rpc.getLatestBlockhash().send();

const draft = pipe(
  createTransactionMessage({ version: 1 }),
  m => setTransactionMessageFeePayerSigner(payer, m),
  m => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, m),
  m => appendTransactionMessageInstructions([
    getCreateAccountInstruction({
      payer,
      newAccount,
      lamports: lamports(minRent),
      space: 0,
      programAddress: SYSTEM_PROGRAM_ADDRESS,
    }),
    getTransferSolInstruction({
      source: payer,
      destination: newAccount.address,
      amount: lamports(1_000_000_000n),
    }),
  ], m),
  fillTransactionMessageProvisoryResourceLimits,
);

const message = await estimateAndSetResourceLimitsFactory(
  estimateResourceLimitsFactory({ rpc }),
)(draft);

const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions });
const signed = await signTransactionMessageWithSigners(message);
assertIsTransactionWithBlockhashLifetime(signed);
await sendAndConfirm(signed, { commitment: 'confirmed' });

Error Handling

import { isSystemError, SYSTEM_ERROR__INSUFFICIENT_FUNDS } from '@solana-program/system';

try {
  await sendTransaction(tx);
} catch (e) {
  if (isSystemError(e, SYSTEM_ERROR__INSUFFICIENT_FUNDS)) {
    console.error('Not enough SOL for transfer');
  }
}

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning18d5 checks · Risk SAFE
  • Gen Agent Trust Hub19d

    This skill is a legitimate and comprehensive developer resource for Solana blockchain development. It identifies and mitigates common security risks through explicit instructions on handling untrusted on-chain data and enforces transaction safety via user-review guardrails. All external dependencies and tool installations originate from trusted, official Solana ecosystem providers.

  • Socket18d

    No alerts

  • Snyk19d

    Risk: LOW · No issues

  • Runlayer8mo

    3/15 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at c9da262. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 3 weeks ago
compatibility
Requires Node.js 20.18+, Rust toolchain, Solana CLI, Anchor CLI
metadata
{
  "author": "Solana Foundation",
  "version": "2.8.0"
}

README badge

README badge for solana-foundation/solana-dev-skill