Skip to content

magicblock-labs/magicblock-dev-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MagicBlock Dev Skill

MagicBlock Ephemeral Rollups development skill for AI coding agents. The skill packages MagicBlock-specific patterns (debugging live ER/delegation failures, delegation, Magic Actions, cranks, VRF, lamports top-up, commit sponsorship, private payments with swaps, dual-connection architecture) into a reusable workflow that activates automatically when you ask for MagicBlock or Ephemeral Rollups help.

Installation

Quick install

npx add-skill https://github.com/magicblock-labs/magicblock-dev-skill

Manual install

git clone https://github.com/magicblock-labs/magicblock-dev-skill
cd magicblock-dev-skill
./install.sh

By default, ./install.sh installs the skill to both personal skill directories:

  • ~/.claude/skills/magicblock
  • ${CODEX_HOME:-~/.codex}/skills/magicblock

Targeting specific agents

Global / per-user targets:

./install.sh --claude
./install.sh --codex

Project-scoped targets (always install into the current directory):

./install.sh --cursor       # writes .cursor/rules/magicblock.mdc
./install.sh --windsurf     # writes .windsurf/rules/magicblock.md
./install.sh --cline        # writes .clinerules/magicblock.md
./install.sh --continue     # writes .continue/rules/magicblock.md
./install.sh --agents-md    # writes ./AGENTS.md

Combined:

./install.sh --all          # everything for the current project
./install.sh --project      # Claude + Codex into .claude/.codex inside the project
./install.sh --path /custom/path/magicblock

The single-file targets (Cursor, Windsurf, Cline, Continue, AGENTS.md) are generated from dist/ artifacts; install.sh runs ./build.sh automatically if dist/ is missing.

Building dist/ artifacts manually

./build.sh

Produces:

  • dist/AGENTS.md — full flattened skill (SKILL.md + all references)
  • dist/system-prompt.md — trimmed SKILL.md + reference URLs (for chat-only platforms)
  • dist/magicblock.cursor.mdc — Cursor-formatted rule with .mdc frontmatter
  • dist/magicblock.zip — zipped skill/ folder for Claude.ai upload

Recommended companion skill: solana-dev

This skill layers Ephemeral Rollups-specific patterns (delegation, dual connections, cranks, VRF, Magic Actions, private payments) on top of ordinary Solana development — it assumes base-layer Solana and Anchor fluency rather than teaching it. For the general Solana layer (program scaffolding, PDAs, SPL tokens, client generation, wallet wiring, LiteSVM/Mollusk testing), install the Solana Foundation's solana-dev skill alongside this one and let each handle its layer:

npx skills add https://github.com/solana-foundation/solana-dev-skill --skill solana-dev

Skills don't declare dependencies on each other, so this isn't installed automatically — install it yourself (see the solana-dev-skill repo for other install options). Once both are present, agents use solana-dev for base-layer Solana work and this skill for the ER-specific pieces.

What This Skill Covers

  • MagicBlock Ephemeral Rollups integration
  • Debugging live ER transaction failures, delegation-state mismatches, and router/ER endpoint selection
  • Delegating/undelegating Solana accounts
  • High-performance, low-latency transaction flows
  • Crank scheduling (recurring automated transactions)
  • VRF (Verifiable Random Function) for provable randomness
  • Magic Actions — base-layer instructions chained to an ER commit
  • Topping up delegated accounts with lamports via lamportsDelegatedTransferIx
  • Ephemeral SPL Token lifecycle: deposit, transfer, app-program CPI, undelegate, withdraw
  • Dual-connection architecture (base layer + ephemeral rollup)
  • Gaming and real-time app development on Solana
  • Private payments (deposits, transfers, withdrawals, and swaps via the Payments API, with optional bearer-token auth for private reads)
  • Commit sponsorship and lifting the 10-commit default with magic_fee_vault

Usage

The skill activates automatically when you ask about MagicBlock or Ephemeral Rollups.

  • In Claude Code, you can also invoke it directly with /magicblock.
  • In Codex, you can mention it explicitly by name, for example: use the magicblock skill.
  • In Cursor / Windsurf / Cline / Continue, the rule's description triggers contextually when you mention MagicBlock topics.
  • For chat-only platforms, the skill is loaded once via the system prompt and persists for the session.

Examples:

Add delegation hooks to my player account
Debug why my delegated account gets InvalidWritableAccount
Change my roll_dice function to use VRF
Set up a crank that updates game state every 100ms
Add a Magic Action that updates my onchain leaderboard after every commit
Top up my delegated fee payer with lamports
Deposit SPL tokens into the ER, transfer them, and withdraw back to base layer
Build a private USDC transfer flow using the Payments API
Help me integrate MagicBlock into my Anchor program

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

8 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages