Agent skill

Magicblock

by sendaifun in sendaifun/skills

Complete guide for MagicBlock Ephemeral Rollups - high-performance Solana execution with sub-10ms latency, gasless transactions, and Solana Plugins.

Apache-2.0Auto-check passed

Install Magicblock

skills CLI
$ npx skills add sendaifun/skills --skill magicblock -a claude-code

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

GitHub CLI
$ gh skill install sendaifun/skills magicblock --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/sendaifun/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/magicblock .claude/skills/magicblock && 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
magicblock
GitHub stars
130
Token cost
~2.2k tokens
SKILL.md length
422 words
Files
11
Skills in repo
24
Repo updated
First seen
Licence
Apache-2.0

At a glance

Complete guide for MagicBlock Ephemeral Rollups - high-performance Solana execution with sub-10ms latency, gasless transactions, and Solana Plugins.

  • Works in 3 steps: Add Dependencies (Cargo.toml) → Program Setup (lib.rs) → TypeScript Client Setup
  • Building real-time games
  • SKILL.md covers Overview, Architecture, Prerequisites and Quick Start, plus 7 more sections
  • Runs TypeScript and Rust scripts from its folder; calls cargo; reaches github.com and devnet-router.magicblock.app

What it does

Magicblock is an agent skill from sendaifun/skills. Complete guide for MagicBlock Ephemeral Rollups - high-performance Solana execution with sub-10ms latency, gasless transactions, and Solana Plugins. Use when building real-time games, high-frequency trading, or any application requiring ultra-low latency on Solana.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 18 other files (for example `docs/advanced-patterns.md`, `docs/troubleshooting.md` and `examples/anchor-counter/README.md`).

It works with Solana and Rust. The repository describes itself as: a public marketplace of all solana-related skills for agents to learn from! The licence is Apache-2.0.

When your agent uses it

  • Building real-time games
  • High-frequency trading
  • Any application requiring ultra-low latency on Solana

Example prompts

  • “/magicblock”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Add Dependencies (Cargo.toml)
  2. Program Setup (lib.rs)
  3. TypeScript Client Setup

What it can do on your machine

Read from SKILL.md and the folder at commit 06b36b8. 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 script files (TypeScript and Rust), which the agent can run.

    Shell commands in SKILL.md call:

    • cargo

    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:

    • github.com
    • devnet-router.magicblock.app
    • api.devnet.solana.com
    • devnet.magicblock.app

    Also links to:

    • docs.magicblock.gg
    • book.boltengine.gg

    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

Magicblock loads about 2.2k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 422 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from sendaifun/skills at commit 06b36b8, republished under its Apache-2.0 licence (© sendaifun). 422 words, ~2,169 tokens.

Download SKILL.mdSave it as .claude/skills/magicblock/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
magicblock
description
Complete guide for MagicBlock Ephemeral Rollups - high-performance Solana execution with sub-10ms latency, gasless transactions, and Solana Plugins. Use when building real-time games, high-frequency trading, or any application requiring ultra-low latency on Solana.

MagicBlock Ephemeral Rollups Guide

A comprehensive guide for building high-performance Solana applications with MagicBlock Ephemeral Rollups - enabling sub-10ms latency and gasless transactions.

Overview

MagicBlock Ephemeral Rollups (ER) are specialized SVM runtimes that enhance Solana with:

  • Sub-10ms latency (vs ~400ms on base Solana)
  • Gasless transactions for seamless UX
  • Full composability with existing Solana programs
  • Horizontal scaling via on-demand rollups

Architecture

┌─────────────────────────────────────────────────────────────┐
│                      Your Application                        │
├─────────────────────────────────────────────────────────────┤
│  Base Layer (Solana)          │  Ephemeral Rollup (ER)      │
│  - Initialize accounts        │  - Execute operations       │
│  - Delegate accounts          │  - Process at ~10-50ms      │
│  - Final state commits        │  - Zero gas fees            │
│  - ~400ms finality            │  - Commit state to Solana   │
└─────────────────────────────────────────────────────────────┘
Core Flow
  1. Initialize - Create accounts on Solana base layer
  2. Delegate - Transfer account ownership to delegation program
  3. Execute - Run fast operations on Ephemeral Rollup
  4. Commit - Sync state back to base layer
  5. Undelegate - Return ownership to your program

Prerequisites

bash
# Required versions
Solana: 2.3.13
Rust: 1.85.0
Anchor: 0.32.1
Node: 24.10.0

# Install Anchor (if needed)
cargo install --git https://github.com/coral-xyz/anchor anchor-cli

Quick Start

1. Add Dependencies (Cargo.toml)
toml
[dependencies]
anchor-lang = "0.32.1"
ephemeral-rollups-sdk = { version = "0.6.5", features = ["anchor", "disable-realloc"] }
2. Program Setup (lib.rs)
rust
use anchor_lang::prelude::*;
use ephemeral_rollups_sdk::anchor::{delegate_account, commit_accounts, ephemeral};
use ephemeral_rollups_sdk::cpi::DelegationProgram;

declare_id!("YourProgramId111111111111111111111111111111");

#[ephemeral]  // Required: enables ER support
#[program]
pub mod my_program {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        ctx.accounts.state.value = 0;
        Ok(())
    }

    #[delegate]  // Auto-injects delegation accounts
    pub fn delegate(ctx: Context<Delegate>) -> Result<()> {
        Ok(())
    }

    pub fn increment(ctx: Context<Update>) -> Result<()> {
        ctx.accounts.state.value += 1;
        Ok(())
    }

    #[commit]  // Auto-injects commit accounts
    pub fn undelegate(ctx: Context<Undelegate>) -> Result<()> {
        Ok(())
    }
}
3. TypeScript Client Setup
typescript
import { Connection, PublicKey } from "@solana/web3.js";
import { AnchorProvider, Program } from "@coral-xyz/anchor";
import { DELEGATION_PROGRAM_ID } from "@magicblock-labs/ephemeral-rollups-sdk";

// CRITICAL: Separate connections for each layer
const baseConnection = new Connection("https://api.devnet.solana.com");
const erConnection = new Connection("https://devnet.magicblock.app");

// Create providers
const baseProvider = new AnchorProvider(baseConnection, wallet, { commitment: "confirmed" });
const erProvider = new AnchorProvider(erConnection, wallet, {
  commitment: "confirmed",
  skipPreflight: true,  // Required for ER
});

// Check delegation status
async function isDelegated(pubkey: PublicKey): Promise<boolean> {
  const info = await baseConnection.getAccountInfo(pubkey);
  return info?.owner.equals(DELEGATION_PROGRAM_ID) ?? false;
}

Key Concepts

Delegation

Delegation transfers PDA ownership to the delegation program, allowing the Ephemeral Validator to process transactions.

rust
#[derive(Accounts)]
pub struct Delegate<'info> {
    #[account(mut)]
    pub payer: Signer<'info>,
    /// CHECK: Will be delegated
    #[account(mut, del)]  // 'del' marks for delegation
    pub state: AccountInfo<'info>,
    pub delegation_program: Program<'info, DelegationProgram>,
}
Commit

Commits update PDA state from ER to base layer without undelegating.

rust
use ephemeral_rollups_sdk::anchor::commit_accounts;

pub fn commit(ctx: Context<Commit>) -> Result<()> {
    commit_accounts(
        &ctx.accounts.payer,
        vec![&ctx.accounts.state.to_account_info()],
        &ctx.accounts.magic_context,
        &ctx.accounts.magic_program,
    )?;
    Ok(())
}
Undelegation

Returns PDA ownership to your program while committing final state.

rust
#[commit]  // Handles commit + undelegate
pub fn undelegate(ctx: Context<Undelegate>) -> Result<()> {
    Ok(())
}

ER Validators (Devnet)

RegionValidator Identity
AsiaMAS1Dt9qreoRMQ14YQuhg8UTZMMzDdKhmkZMECCzk57
EUMEUGGrYPxKk17hCr7wpT6s8dtNokZj5U2L57vjYMS8e
USMUS3hc9TCw4cGC12vHNoYcCGzJG1txjgQLZWVoeNHNd
TEEFnE6VJT5QNZdedZPnCoLsARgBwoE6DeJNjBs2H1gySXA

Magic Router (auto-selects best): https://devnet-router.magicblock.app

Critical Rules

DO:
  • Maintain separate connections for base layer and ER
  • Use skipPreflight: true for all ER transactions
  • Verify delegation status before sending to ER
  • Use AccountInfo for delegated accounts in Rust
  • Match PDA seeds exactly between Rust and TypeScript
DON'T:
  • Send delegated account operations to base layer
  • Mix base layer and ER operations in single transaction
  • Assume account ownership without checking
  • Skip commitment verification before base layer reads
Show full SKILL.md (178 more words)Show less

Products

ProductDescription
Ephemeral Rollup (ER)High-performance, gasless transactions
Private ER (PER)Privacy-preserving computation with Intel TDX
VRFVerifiable random function for on-chain randomness
BOLT FrameworkECS architecture for fully on-chain games
Solana PluginsApp-specific extensions for enhanced capabilities

Solana Plugins (New)

Solana Plugins are modular capabilities that can be added to your dApp to extend what's possible on Solana. Think of them as your custom toolkit: plug in what you need, when you need it.

Available Plugins
PluginDescriptionUse Cases
Verifiable Randomness (VRF)Provably fair on-chain randomnessGames, lotteries, NFT drops
Real-Time Price FeedsUp-to-the-millisecond market dataDEXs, trading bots, DeFi
AI OraclesCall AI models directly from smart contractsDynamic NFTs, AI agents
Using VRF Plugin
typescript
import { requestRandomness, getRandomnessResult } from "@magicblock-labs/vrf-sdk";

// Request randomness
const requestTx = await requestRandomness({
  payer: wallet.publicKey,
  seed: Buffer.from("my_game_seed"),
});

// Get result after confirmation
const result = await getRandomnessResult(requestId);
console.log("Random value:", result.randomness);
Privacy with Intel TDX

MagicBlock enables privacy in any Solana program state account through Ephemeral Rollups running in Trusted Execution Environments (TEE) on Intel TDX. This allows:

  • Private computation without exposing state
  • Verifiable execution guarantees
  • Selective disclosure of results

Resources

Skill Structure

magicblock/
├── SKILL.md                          # This file
├── resources/
│   ├── api-reference.md              # Complete API reference
│   └── program-ids.md                # All program IDs and constants
├── examples/
│   ├── anchor-counter/README.md      # Basic counter with delegation
│   ├── delegation-flow/README.md     # Full delegation lifecycle
│   ├── vrf-randomness/README.md      # VRF integration
│   └── crank-automation/README.md    # Scheduled tasks
├── templates/
│   ├── program-template.rs           # Rust program starter
│   └── client-template.ts            # TypeScript client starter
└── docs/
    ├── advanced-patterns.md          # Complex patterns
    └── troubleshooting.md            # Common issues

© sendaifun, Apache-2.0. 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 10 other files in skills/magicblock of sendaifun/skills.

  • SKILL.md
  • docs/advanced-patterns.md
  • docs/troubleshooting.md
  • examples/anchor-counter/README.md
  • examples/crank-automation/README.md
  • examples/delegation-flow/README.md
  • examples/vrf-randomness/README.md
  • resources/api-reference.md
  • resources/program-ids.md
  • templates/client-template.ts
  • templates/program-template.rs

Open the folder on GitHubat commit 06b36b8

Compare with similar skills

Magicblock 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.

Magicblock compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Magicblock this skillsendaifun/skills130—~2.2kAutomated safety check: PassApache-2.0
Minara Crypto Trading and WalletMinara-AI/minara-skills362—~5.7kAutomated safety check: PassNone
Rsigmatimescale/rsigma162—~1.2kAutomated safety check: PassMIT
RadarAuditware/radar154—~2.1kAutomated safety check: PassGPL-3.0
Safe Solana BuilderFrankcastleauditor/safe-solana-builder145—~3.6kAutomated safety check: PassNone
lo2cin4bt Backtesting Assistantlo2cin4/lo2cin4bt289—~2.6kAutomated safety check: PassCustom licence

Similar skills

  • Minara Crypto Trading and Wallet

    Minara-AI/minara-skills

    Drives the Minara CLI for crypto swaps, perps, limit orders, wallet transfers, deposits and withdrawals, plus AI market analysis.

    362 GitHub stars~5.7k tokensUpdated 22 days ago
    Business, Finance & HRAuto-check passed
  • Rsigma

    timescale/rsigma

    Use the rsigma CLI and MCP server: engine eval, engine daemon, rule lint, rule draft, rule tune, rule backtest, backend convert, mcp serve.

    162 GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Radar

    Auditware/radar

    Use radar for smart contract security analysis, AST generation, and detection template development.

    154 GitHub stars~2.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Safe Solana Builder

    Frankcastleauditor/safe-solana-builder

    A skill your agent uses whenever the user wants to write, scaffold, or build a Solana smart contract or program from scratch.

    145 GitHub stars~3.6k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Guides an agent through installing, configuring and running local backtests in the lo2cin4bt repo, then explaining the results and fixing setup problems.

    289 GitHub stars~2.6k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Wiremock Test

    OpenZeppelin/openzeppelin-relayer

    Manage WireMock proxy for RPC testing. An agent skill from OpenZeppelin/openzeppelin-relayer.

    154 GitHub stars~1.6k tokensUpdated 2 days ago
    Backend & APIsAuto-check: notes

More from sendaifun/skills

All 24 skills in this repo
  • Breaks a shared video or GIF down frame by frame to recreate its motion as working code instead of guessing the timing by eye.

    130 GitHub stars~2.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Builds and debugs Arcium encrypted computation apps on Solana: Arcis circuits, Anchor orchestration, encrypted inputs and the init, queue and callback flow.

    130 GitHub stars~2.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Coingecko

    sendaifun/skills

    Complete CoinGecko Solana API integration for token prices, DEX pool data, OHLCV charts, trades, and market analytics.

    130 GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check: notes
  • Phantom Connect SDK

    sendaifun/skills

    Integrates Phantom wallet connection, social login, and transaction signing into React, React Native, or vanilla JS apps on Solana.

    130 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Integrating Jupiter

    sendaifun/skills

    Comprehensive guidance for integrating Jupiter APIs (Ultra Swap, Lend, Perps, Trigger, Recurring, Tokens, Price, Portfolio, Prediction Markets, Send, Studio, Lock, Routing).

    130 GitHub starsUsed in 1 repo~5.1k tokens
    Auto-check passed
  • Pinocchio Development

    sendaifun/skills

    Comprehensive guide for building high-performance Solana programs using Pinocchio - the zero-dependency, zero-copy framework.

    130 GitHub starsUsed in 1 repo~4.1k tokens
    Auto-check passed

Works with

Questions about Magicblock

What does Magicblock do?

Complete guide for MagicBlock Ephemeral Rollups - high-performance Solana execution with sub-10ms latency, gasless transactions, and Solana Plugins. Magicblock is an agent skill from sendaifun/skills. Complete guide for MagicBlock Ephemeral Rollups - high-performance Solana execution with sub-10ms latency, gasless transactions, and Solana Plugins.

When should I use Magicblock?

Magicblock fits situations like: building real-time games; high-frequency trading; any application requiring ultra-low latency on Solana.

How do I install Magicblock in Claude Code?

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

How do I install Magicblock in Codex?

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

Can I use Magicblock 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 sendaifun/skills --skill magicblock -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/magicblock, .gemini/skills/magicblock, .github/skills/magicblock and .opencode/skills/magicblock in your project.

What does Magicblock need to run?

Going by SKILL.md and its folder, Magicblock needs TypeScript and Rust for the scripts in its folder and the command-line tools its instructions call (cargo). Our summary lists: Node.js.

Does Magicblock access the network?

SKILL.md names 6 domains. In commands or code: github.com, devnet-router.magicblock.app, api.devnet.solana.com and devnet.magicblock.app; the agent is likely to contact these when it follows the instructions. As links in the text: docs.magicblock.gg and book.boltengine.gg. This is read from the text; nothing was executed.

Is Magicblock 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. Review the folder before installing.

What licence does Magicblock use?

Magicblock is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Magicblock use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Magicblock?

Skills that share tags, products or a category with Magicblock: Minara Crypto Trading and Wallet (Minara-AI/minara-skills, 362 stars), Rsigma (timescale/rsigma, 162 stars), Radar (Auditware/radar, 154 stars) and Safe Solana Builder (Frankcastleauditor/safe-solana-builder, 145 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Magicblock?

sendaifun (a GitHub organization) maintains it in sendaifun/skills, which has 130 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on July 31, 2026.

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