magicblock
Design, implement, and debug MagicBlock applications on Solana. Covers Ephemeral Rollups with delegated state; ER/PER architecture and settlement; private payments and token flows; oracles and randomness; scheduling and temporary authority; security and local validation.
Install / Use
npx skills add internet-court/internet-court-skill --skill magicblock-devInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of magicblock
magicblock scores 93/100 on our quality scale, 295th of 772 Security skills we index (top 39%).
Its SKILL.md is 15 KB long, well organised into 18 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 6,129 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 39 days ago, so magicblock is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-28. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
magicblock compared with similar skills
All 4 of these similar skills score higher than magicblock; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| magicblock (this skill)by internet-court | 93 | 6.1k | 39d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 5d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 5d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 7d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 7d ago | SKILL.md |
Frequently asked questions
- How do I install magicblock?
- Run
npx skills add internet-court/internet-court-skill --skill magicblock. The install tabs above show the steps for each supported agent. - Which AI agents does magicblock work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is magicblock safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is magicblock still maintained?
- The repository was last updated 39 days ago, so magicblock is actively maintained.
Skill content
View source on GitHubname: magicblock description: Design, implement, and debug MagicBlock applications on Solana. Covers Ephemeral Rollups with delegated state; ER/PER architecture and settlement; private payments and token flows; oracles and randomness; scheduling and temporary authority; security and local validation. Use for MagicBlock product selection, integration, cross-product design, or production troubleshooting.
MagicBlock Development Skill
Pair with the solana-dev skill
Use this skill for MagicBlock-specific concerns: ER/PER, delegation, oracles, Session Keys, cranks, VRF,
Magic Actions, eSPL, and private payments. For general Solana or Anchor work such as scaffolding, PDAs,
account layouts, SPL tokens, clients, wallets, or LiteSVM/Mollusk testing, also load solana-dev.
Key Concepts
Ephemeral Rollups enable high-performance, low-latency transactions by locking a delegated account on the base layer while an ER clone continues to execute under the account's original program owner. They are useful for gaming, real-time apps, and fast transaction throughput.
Ephemeral Accounts are born, used, and closed only inside an ER. They are useful for temporary high-frequency state, but they never commit to Solana and therefore cannot be the only copy of durable ownership, balances, rewards, or settlement results.
Delegation temporarily assigns the base-layer account to the Delegation Program and clones it into the ER with its original program owner. Normal program ownership, signer, authority, and account constraints still apply on the ER; delegation status is a routing and lifecycle concern, not a new application authorization rule.
Delegation debugging invariant: a properly delegated account looks owned by
the delegation program on base, owned by the original program on the ER endpoint
returned by router getDelegationStatus, and cloned into the ER with
delegated=true.
For the verified SDK v0.16.2 snapshot, use MagicIntentBundleBuilder to
schedule commit and commit-and-undelegate intents. Do not use the deprecated
free functions commit_accounts and commit_and_undelegate_accounts.
Private Ephemeral Rollups (PER) gate a delegated account inside a TEE-backed validator with an ER-local EphemeralPermission. Delegate only the data account on the base layer, then create, update, and close its permission on the ER with CreateEphemeralPermissionCpi, UpdateEphemeralPermissionCpi, and CloseEphemeralPermissionCpi. Do not create or delegate a separate base-layer permission account.
Magic Actions are base-layer instructions scheduled inside an ER transaction via
MagicIntentBundleBuilder.add_post_commit_actions(...). Each attempted base-layer transaction applies
its commit and actions atomically. If any BaseAction fails, the committor removes every BaseAction in
that affected TransactionStrategy before retrying its remaining commit strategy; actions in other
transaction/finalize strategies are outside that removal scope. Observe and reconcile every originally
scheduled action: scheduling or eventual commit success alone does not prove that any of them ran.
Commit sponsorship: every delegated account gets 10 free commits to base layer by default. To lift
the cap, either re-delegate (refreshes the quota) or attach the validator-scoped magic_fee_vault PDA
and a delegated fee payer to the intent bundle. The delegated payer is debited; the fee vault is the
validated destination credited with that commit fee.
Lamports top-up: when a delegated account (e.g. a delegated fee payer) needs more lamports on the ER side, use lamportsDelegatedTransferIx from the SDK. The transaction is submitted on base layer — the Ephemeral SPL Token program creates a single-use lamports PDA, funds it, and delegates it so the ER credits the destination.
Ephemeral SPL Token has two surfaces. In the SDK lifecycle model, clients use
delegateSpl/transferSpl/undelegateIx/withdrawSpl, and the ER balance appears as a normal SPL token
account at the owner's canonical ATA address, so Anchor programs can use plain SPL Token CPI. In the
direct-program model, contracts use ephemeral-spl-api and explicitly work with the eATA/global-vault
PDAs; do not apply the canonical-ATA model to that raw surface.
Pricing Oracle republishes supported market feeds for Solana/ER consumers. A safe integration verifies the expected feed identity, upstream publish-time freshness, value domain, exponent, checked arithmetic, and user price bounds; successful deserialization alone is not price validation.
Session Keys authorize a temporary signer for constrained application actions. Session validity is separate from SPL token authority: token spending also requires an explicit, bounded token delegate allowance.
Architecture:
┌─────────────────┐ delegate ┌─────────────────────┐
│ Base Layer │ ───────────────► │ Ephemeral Rollup │
│ (Solana) │ │ (MagicBlock) │
│ │ ◄─────────────── │ │
└─────────────────┘ undelegate └─────────────────────┘
~400ms ~10-50ms
Default stack
Programs
Use Anchor with ephemeral-rollups-sdk; native and Pinocchio are also supported.
- Use the target repo's existing
ephemeral-rollups-sdk/ Anchor versions unless the task is an explicit upgrade - The SDK feature flag selects the Anchor range:
anchorfor Anchor 1.x programs, oranchor-compatfor Anchor >=0.28,<1.0 programs
Required macros:
#[ephemeral]on the program module, before#[program]— injects theprocess_undelegationcallback (the delegation program CPIs into it to return the account) and the commit/undelegate intent builders. Commit and undelegation require it; delegation itself does not. Include it on any program that delegates so its accounts can later be undelegated.#[delegate]and#[commit]on the respective delegation/commit account contexts.#[vrf]on a VRF request context and#[vrf_callback]on the VRF callback context — the callback macro authenticates fulfillment. Enable thevrffeature onephemeral-rollups-sdk. SDK v0.16.2 re-exports VRF, so new Anchor code does not need a directephemeral-vrf-sdkdependency. See vrf.md.
Non-Anchor programs: use the
ephemeral-rollups-pinocchio crate (delegation, commit, and VRF have Pinocchio equivalents). The
engine examples repo ships Anchor and Pinocchio variants of roll-dice; use Pinocchio when
the target program is native rather than Anchor.
Versions in this skill are known-good snapshots or compatibility markers. Before changing dependencies, inspect the target repository's manifests, toolchain files, lockfiles, and relevant upstream sources. See resources.md for the dated snapshot and source links.
Connections
- Base layer connection for initialization and delegation:
https://rpc.magicblock.app/devnetorhttps://rpc.magicblock.app/mainnet - Router connection for delegation status:
https://devnet-router.magicblock.app/orhttps://router.magicblock.app/ - Ephemeral rollup connection for operations on delegated accounts:
use the
fqdnreturned by routergetDelegationStatus
Transaction routing
- Delegate transactions → Base Layer
- Operations on delegated accounts → Ephemeral Rollup
- Undelegate/commit transactions → Ephemeral Rollup
Operating procedure
0. Plan architecture when the design is not fixed
For a new application, integration design, migration, or implementation plan, read architecture-planning.md before writing code. Decide whether MagicBlock is needed, select the smallest product set, map accounts and transaction routing, define settlement and recovery, and choose validation environments. Ask at most three material questions per round; otherwise proceed with explicit assumptions.
1. Classify the operation type
- Account initialization (base layer)
- Delegation (base layer)
- Operations on delegated accounts (ephemeral rollup)
- Commit state (ephemeral rollup)
- Undelegation (ephemeral rollup)
- ER-only Ephemeral Account lifecycle (ephemeral rollup; never commits)
- Asynchronous service work (VRF callback, crank, queued transfer, or Magic Action)
- Hosted API transaction construction followed by client signing/submission
2. Pick the right connection
- Base layer:
https://rpc.magicblock.app/devnetorhttps://rpc.magicblock.app/mainnet - Router:
https://devnet-router.magicblock.app/orhttps://router.magicblock.app/ - Ephemeral rollup: the
fqdnreturned by routergetDelegationStatusfor the account
3. Implement with MagicBlock-specific correctness
For each implementation, record:
- Which connection to use for each transaction
- Router
getDelegationStatuschecks before operations - PDA seeds matching between delegate call and account definition
- Preserving preflight for supported base transactions, and using
skipPreflight: trueonly for an ER path with a known simulation incompatibility (document the reason and inspect execution logs) - Waiting for state propagation after delegate/undelegate
- For Ephemeral SPL Token flows, selecting the deposit and withdrawal builders independently: use the
default shuttle withdrawal, or explicitly run
undelegateIx, wait for its base commit, and call the legacywithdrawSpl(..., { idempotent: false }); useephemeral-spl-apiexports (not copied bytes or guessed seeds) for direct CPI - For oracle flows, feed identity, maximum age, numeric conversion, user limits, and stale-feed behavior
- For Session Keys, scope, expiry, optional one-time signer lamports top-up, revocation, application- enforced spending limits, and any separate SPL delegate allowance
- For asynchronous flows, the difference between acceptance/scheduling and completion, plus observation, idempotency, timeout, retry, refund, and reconciliation
For security-sensitive designs, reviews, and implementations, read security.md. Separate protocol guarantees from required integration validation, application policy, and ordinary Solana security. Do not present an application recommendation as a MagicBlock protocol guarantee.
4. Debug live delegation/routing failures
For InvalidWritableAccount, missing private balances, validator mismatch, or
"account is delegated but ER rejects it" reports:
- Start from the exact signature or account pubkey.
- Query router
getDelegationStatusand use itsfqdnfor ER reads/transactions. - Compare base ownership, router status, ER ownership, and recent ER transaction logs.
- Treat base ownership by the delegation program as expected for a delegated account.
- See debugging.md for the full runbook.
5. Diagnose possible service-side failures
For unexpected RPC, routing, oracle, or transaction errors that could be service-side:
- Always fetch current data; do not answer from remembered status. Use the direct JSON API
https://status.magicblock.app/api/servicesas the source of truth. - Select the same network the code uses: JSON keys are
mainnetanddevnet. - Match the affected endpoint to the right region/server and service:
- Regions are
asia,europe,usa, andtee. - Service IDs are listed in
.meta.services; currentlyer(Ephemeral Rollup),rpc_router,pricing_oracle, andvrf_oracle. - Use the server entries under
.environments[network].regions[region].servers; for mainnet Asia this includesas.magicblock.app.
- Regions are
- Interpret
.live_status[service]:true= Operational,false= Down, missing/undefined = N/A. - Interpret
.metrics[service]as downtime minutes per day aligned with.meta.daysin UTC. - When reporting findings, include the network, region, endpoint, service status, and relevant dat
Truncated for display — read the full file on GitHub.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
