Agent skill

Arcium Encrypted Solana Computation

by sendaifun in sendaifun/skills

Builds and debugs Arcium encrypted computation apps on Solana: Arcis circuits, Anchor orchestration, encrypted inputs and the init, queue and callback flow.

MITAuto-check passedBackend & APIs

Install Arcium Encrypted Solana Computation

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

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

GitHub CLI
$ gh skill install sendaifun/skills arcium --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/arcium .claude/skills/arcium && 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
arcium
GitHub stars
130
Token cost
~2.8k tokens
SKILL.md length
983 words
Files
5 (incl. references)
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

Builds and debugs Arcium encrypted computation apps on Solana: Arcis circuits, Anchor orchestration, encrypted inputs and the init, queue and callback flow.

  • Works in 7 steps: Names match exactly — #[instruction] fn… → Comp def initialized — init_*_comp_def… → ArgBuilder param order — calls must… → …
  • Writing your first Arcium encrypted computation app on Solana
  • SKILL.md covers When to Use, Mental Model, Intent Router and Core Pattern: Three Functions, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Arcium runs encrypted computation on Solana through multi-party computation, so data stays encrypted while several parties compute on combined inputs, useful for dark pools, sealed-bid auctions, encrypted voting, hidden game state and confidential DeFi. The `arcium` CLI wraps Anchor for init, build, test and deploy, and the skill points to its own MCP server, bundled through an included mcp.json, for current flags and documentation lookups.

The mental model splits an app into three coupled surfaces: the circuit, written in Arcis Rust with fixed-shape MPC logic; the program, an Anchor layer handling init, queue_computation and callback; and the client, TypeScript code doing key exchange and encryption with RescueCipher and x25519 through `@arcium-hq/client`. MPC constraints shape the circuit: both branches of an if/else always execute, loops need fixed bounds, `.reveal()` cannot run inside a conditional, and all data must be fixed-size arrays rather than Vec, String or HashMap. Reference files cover a minimal circuit example, common patterns and troubleshooting for ArgBuilder ordering, nonce and callback failures.

When your agent uses it

  • Writing your first Arcium encrypted computation app on Solana
  • Debugging an Arcium callback, nonce or ArgBuilder ordering failure
  • Deciding between Shared and Mxe encrypted state for a circuit
  • Designing a sealed-bid auction, encrypted vote or hidden game state

Example prompts

  • “Walk me through building my first Arcium circuit and Anchor program.”
  • “My Arcium callback never fires. Help me debug the queue_computation and callback wiring.”
  • “Should this encrypted auction use Shared or Mxe state for the bid amounts?”

Requirements

  • The arcium CLI (wraps Anchor)
  • The @arcium-hq/client TypeScript package
  • The bundled Arcium MCP server
  • Compatibility (from SKILL.md): Bundled mcp.json configures the Arcium MCP server automatically.

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Names match exactly — #[instruction] fn NAME must match across #[arcium_callback(encrypted_ix = "NAME")], comp_def_offset("NAME"), and all…
  2. Comp def initialized — init_*_comp_def must be called once before any computation
  3. ArgBuilder param order — calls must match circuit fn parameters left-to-right
  4. Shared params include pubkey — .x25519_pubkey() before .plaintext_u128(nonce) before ciphertexts (missing = silent failure)
  5. Nonce is unique — fresh randomBytes(16) per encryption, same nonce passed to program
  6. Callback registered and writable — callback_ix(...) passed in queue_computation call, accounts set in BOTH CallbackAccount { pubkey…
  7. Environment correct — cluster offset matches network, MXE public key available (retry with backoff), RPC endpoint reliable

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.arcium.com
    • github.com
    • ts.arcium.com

    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.

  • Compatibility

    Bundled mcp.json configures the Arcium MCP server automatically.

    From compatibility in the SKILL.md frontmatter.

Context cost

Arcium Encrypted Solana Computation loads about 2.8k tokens when it runs, and up to ~5.9k if it reads all its reference files. Until then it costs about 163 tokens; SKILL.md has 983 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~163
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.9k

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 MIT licence (© sendaifun). 983 words, ~2,814 tokens.

Download SKILL.mdSave it as .claude/skills/arcium/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
arcium
description
Build and debug encrypted Solana applications with Arcium — data stays private during computation, no single party sees it. Use when writing Arcis circuits (#[encrypted], #[instruction]), wiring Anchor programs with init/queue_computation/callback flows, choosing Shared vs Mxe encrypted state, encrypting inputs with @arcium-hq/client (RescueCipher, x25519), or debugging ArgBuilder ordering, nonce, callback, or computation finalization failures. Covers dark pools, sealed-bid auctions, encrypted voting, hidden game state, confidential DeFi, secure randomness, and threshold signing. Also use for getting started with your first Arcium app.
compatibility
Bundled mcp.json configures the Arcium MCP server automatically.
license
MIT
metadata.author
arcium-hq
metadata.version
2.1

Arcium

Encrypted computation on Solana via MPC. Data stays encrypted during computation. The arcium CLI (wraps Anchor) handles init, build, test, and deploy — use MCP for current flags and options.

MCP Tools: search_arcium_docs for discovery (returns page path), then query_docs_filesystem_arcium_docs with cat <path>.mdx for full-page reads (e.g., cat /developers/arcis/mental-model.mdx).

When to Use

Use when:

  • You need trustless computation -- cryptographically guaranteed, no single party sees the data
  • Multiple parties compute on combined data without revealing inputs
  • On-chain state must remain encrypted but computable
  • Privacy: sealed-bid auctions, voting, hidden game state, dark pools, confidential DeFi

Constraints:

  • Fixed loop bounds required (no variable-length iteration)

Mental Model

Arcium apps have three coupled surfaces. Most bugs are mismatches across their boundaries:

SurfaceResponsibilityCommon Boundary Bugs
Circuit (Arcis/Rust)Pure fixed-shape MPC logicVariable loops, dynamic collections, .reveal() inside conditionals
Program (Anchor/Rust)Orchestration: init + queue + callbackMacro name mismatch, callback accounts not writable, wrong ArgBuilder order
Client (TypeScript)Key exchange, encryption, submission, decryptionNonce reuse, missing .x25519_pubkey() for Shared, param order ≠ circuit order

MPC constraints (from how secret sharing works):

  • Both branches of if/else execute unless the condition is a compile-time constant — cost = sum of both branches, not max
  • Loops must have fixed bounds — no while, break, continue
  • Comparisons are expensive; arithmetic (add/multiply) is nearly free
  • .reveal() and .from_arcis() cannot be called inside conditionals (exception: compile-time constant conditions)
  • All data must be fixed-size — no Vec, String, HashMap; use [T; N]

Intent Router

Identify what you're building, then read the linked reference before coding. For API details, CLI flags, deployment, and versions, use MCP directly.

IntentReadMCP Query
First Arcium appminimal-circuit.md"hello world tutorial"
Choose a pattern (stateless, stateful, multi-party)patterns.md"arcium examples"
Circuit syntax (#[encrypted], #[instruction])patterns.md"arcis encrypted instruction"
Shared vs Mxe encryptionSee Encryption Context below"Shared vs Mxe encryption"
ArgBuilder ordering / ciphertext errorstroubleshooting.md -- ArgBuilder Ordering Errors"ArgBuilder encrypted plaintext"
Callback not firing / computation stucktroubleshooting.md -- Computation Never Finalizes"arcium_callback queue_computation"
Nonce / decryption errorstroubleshooting.md -- Nonce Errors"RescueCipher encrypt nonce"
Client-side encryption (RescueCipher, x25519)minimal-circuit.md -- Test section"RescueCipher encrypt nonce"
Threshold signing / secure randomness—"MXESigningKey sign" or "ArcisRNG"
Deployment (devnet/mainnet)—"arcium deploy cluster-offset"
Version / installation requirements—"arcium installation anchor solana"

Core Pattern: Three Functions

Every computation needs three functions in your Solana program:

FunctionPurposeWhen Called
init_<name>_comp_defInitialize computation definitionOnce per instruction
<name>Build args + queue computationEach request
<name>_callbackHandle result from Arx nodesAfter MPC completes
rust
const COMP_DEF_OFFSET_FLIP: u32 = comp_def_offset("flip");

// 1. INIT (once per instruction type)
pub fn init_flip_comp_def(ctx: Context<InitFlipCompDef>) -> Result<()> {
    init_comp_def(ctx.accounts, None, None)
}

// 2. QUEUE (each computation)
pub fn flip(ctx: Context<Flip>, offset: u64, ...) -> Result<()> {
    let args = ArgBuilder::new()...build();
    queue_computation(ctx.accounts, offset, args,
        vec![FlipCallback::callback_ix(offset, &ctx.accounts.mxe_account, &[])?],
        1, 0,
    )?;
    Ok(())
}

// 3. CALLBACK (after MPC completes)
#[arcium_callback(encrypted_ix = "flip")]
pub fn flip_callback(ctx: Context<FlipCallback>,
    output: SignedComputationOutputs<FlipOutput>) -> Result<()> {
    let result = output.verify_output(...)?;
    // Use result...
}

Encryption size: RescueCipher encrypts any scalar to 32 bytes regardless of type. Formula: ciphertext_size = 32 * number_of_scalar_values. See troubleshooting.md for the full size table.

Encryption Context

ScenarioUse
User inputs, results returned to userEnc<Shared, T>
Internal state users shouldn't accessEnc<Mxe, T>
State persisted across computationsEnc<Mxe, T>
Final reveal to all parties.reveal()

Gotchas

Reference during development to avoid common mistakes.

NEVER:

  • NEVER reuse a nonce — every cipher.encrypt() call needs a fresh randomBytes(16)
  • NEVER combine multiple ciphertexts into one ArgBuilder call — each encrypted scalar is its own [u8; 32] call
  • NEVER omit .x25519_pubkey() for Enc<Shared, T> (silent failure); Enc<Mxe, T> skips it
Critical (silent failures)
  • Macro string matching: All macro strings must exactly match #[instruction] fn NAME across #[arcium_callback], comp_def_offset(), #[init_computation_definition_accounts], #[queue_computation_accounts], #[callback_accounts]
  • ArgBuilder ordering: Calls must match circuit parameter order left-to-right. For Enc<Shared, T>: .x25519_pubkey() then .plaintext_u128(nonce) then ciphertexts. For Enc<Mxe, T>: .plaintext_u128(nonce) then ciphertexts. Missing .x25519_pubkey() for Shared = silent failure.
  • Division by secret zero: Guard divisors with the safe divisor pattern -- both branches execute in MPC, so the division always runs. See patterns.md — Safe Division.
  • Combined ciphertext arrays: Each encrypted scalar needs a separate [u8; 32] ArgBuilder call — do NOT pass [u8; 64] for a two-scalar type. See troubleshooting.md — Ciphertext Size Mismatch.
Show full SKILL.md (379 more words)Show less
Warning (wrong results)
  • Nonce reuse: Same nonce for multiple encryptions = garbled output. Use unique randomBytes(16) per encryption.
  • Callback account writability: Pass extra accounts via CallbackAccount { pubkey, is_writable: true } in callback_ix(..., &[...]). Also mark #[account(mut)] in callback struct. Accounts cannot be created or resized during callbacks.
  • Output struct naming: Circuit fn add_together generates AddTogetherOutput. Single returns use field_0 (a SharedEncryptedStruct<1> or MXEEncryptedStruct<1> with .ciphertexts and .nonce). Tuple returns nest field_0, field_1, etc.
Tips
  • Prefer arithmetic over comparisons (cheaper in MPC)
  • Comparisons/divisions are cheaper with narrower types (u64 vs u128); storage cost is identical

Debug Triage Order

Start here when a computation fails or returns wrong results.

When a computation fails, returns wrong results, or never finalizes — check in this order:

  1. Names match exactly — #[instruction] fn NAME must match across #[arcium_callback(encrypted_ix = "NAME")], comp_def_offset("NAME"), and all account macros
  2. Comp def initialized — init_*_comp_def must be called once before any computation
  3. ArgBuilder param order — calls must match circuit fn parameters left-to-right
  4. Shared params include pubkey — .x25519_pubkey() before .plaintext_u128(nonce) before ciphertexts (missing = silent failure)
  5. Nonce is unique — fresh randomBytes(16) per encryption, same nonce passed to program
  6. Callback registered and writable — callback_ix(...) passed in queue_computation call, accounts set in BOTH CallbackAccount { pubkey, is_writable: true } AND #[account(mut)] in callback struct
  7. Environment correct — cluster offset matches network, MXE public key available (retry with backoff), RPC endpoint reliable

For detailed error solutions: troubleshooting.md

Verification Checklist

Pre-deploy gate. Run through before deploying or submitting a PR.

Circuit:

  • arcium build compiles without errors
  • No break/continue/return/variable-length loops
  • #[instruction] fn names are consistent across all macros

Program:

  • init_*_comp_def called before first computation (once per instruction type)
  • Every circuit fn has init + invoke + callback instructions
  • #[arcium_callback(encrypted_ix = "...")] matches circuit fn name exactly
  • Extra callback accounts passed via CallbackAccount { pubkey, is_writable: true } AND #[account(mut)] in callback struct

Client:

  • Unique nonce per encryption (no reuse across calls)
  • ArgBuilder call order matches circuit fn parameter order left-to-right
  • .x25519_pubkey() included for every Enc<Shared, T> parameter
  • Cluster offset matches deployment environment

Deploy:

  • arcium test passes locally before deploy
  • RPC endpoint is reliable (not default Solana RPC)

Resources

© sendaifun, MIT. 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 4 other files (references) in skills/arcium of sendaifun/skills.

  • SKILL.md
  • examples/minimal-circuit.md
  • examples/patterns.md
  • mcp.json
  • references/troubleshooting.md

Open the folder on GitHubat commit 06b36b8

Compare with similar skills

Arcium Encrypted Solana Computation 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.

Arcium Encrypted Solana Computation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Arcium Encrypted Solana Computation this skillsendaifun/skills130—~2.8kAutomated safety check: PassMIT
Use User Controlled Walletscirclefin/skills155—~3.6kAutomated safety check: NotesApache-2.0
Solana Devsolana-foundation/solana-dev-skill573—~3.8kAutomated safety check: PassMIT
Stellar DevVelaPayments/vela-payments131—~1.8kAutomated safety check: PassMIT
RadarAuditware/radar154—~2.1kAutomated safety check: PassGPL-3.0
Safe Solana BuilderFrankcastleauditor/safe-solana-builder145—~3.6kAutomated safety check: PassNone

Similar skills

  • Build non-custodial wallets where end users retain control of their private keys via Circle's user-controlled wallets SDK.

    155 GitHub stars~3.6k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • 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…

    573 GitHub stars~3.8k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Stellar Dev

    VelaPayments/vela-payments

    End-to-end Stellar development playbook. An agent skill from VelaPayments/vela-payments.

    131 GitHub stars~1.8k tokensUpdated 4 days ago
    Backend & APIsAuto-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 6 days ago
    Backend & APIsAuto-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 yesterday
    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
  • 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
  • Ranger Finance

    sendaifun/skills

    Ranger Finance SDK for building perpetual futures trading applications on Solana.

    130 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes

Works with

Questions about Arcium Encrypted Solana Computation

What does Arcium Encrypted Solana Computation do?

Builds and debugs Arcium encrypted computation apps on Solana: Arcis circuits, Anchor orchestration, encrypted inputs and the init, queue and callback flow. Arcium runs encrypted computation on Solana through multi-party computation, so data stays encrypted while several parties compute on combined inputs, useful for dark pools, sealed-bid auctions, encrypted voting, hidden game state and confidential DeFi.json, for current flags and documentation lookups.

When should I use Arcium Encrypted Solana Computation?

Arcium Encrypted Solana Computation fits situations like: writing your first Arcium encrypted computation app on Solana; debugging an Arcium callback, nonce or ArgBuilder ordering failure; deciding between Shared and Mxe encrypted state for a circuit; designing a sealed-bid auction, encrypted vote or hidden game state.

How do I install Arcium Encrypted Solana Computation in Claude Code?

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

How do I install Arcium Encrypted Solana Computation in Codex?

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

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

What does Arcium Encrypted Solana Computation need to run?

SKILL.md names no scripts, command-line tools or credentials: Arcium Encrypted Solana Computation is instructions for the agent only. Our summary lists: The arcium CLI (wraps Anchor); The @arcium-hq/client TypeScript package; The bundled Arcium MCP server. Compatibility (from SKILL.md): Bundled mcp.json configures the Arcium MCP server automatically..

Does Arcium Encrypted Solana Computation access the network?

SKILL.md names 3 domains. As links in the text: docs.arcium.com, github.com and ts.arcium.com. This is read from the text; nothing was executed.

Is Arcium Encrypted Solana Computation 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 Arcium Encrypted Solana Computation use?

Arcium Encrypted Solana Computation is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Arcium Encrypted Solana Computation use?

About 2.8k tokens (SKILL.md is roughly 11k 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 3k tokens, read only when the agent opens those files.

What are the alternatives to Arcium Encrypted Solana Computation?

Skills that share tags, products or a category with Arcium Encrypted Solana Computation: Use User Controlled Wallets (circlefin/skills, 155 stars), Solana Dev (solana-foundation/solana-dev-skill, 573 stars), Stellar Dev (VelaPayments/vela-payments, 131 stars) and Radar (Auditware/radar, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Arcium Encrypted Solana Computation?

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.