Arcium logo

Arcium

Organization
sendaifun
arcium

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.

Overview

Publishersendaifun
Repositoryskills
Skill namearcium
Stars
128
Forks
81
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by sendaifun on GitHub. Read the source before you install it.

Installation

Install the Arcium AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sendaifun/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/arcium .claude/skills/arcium
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Arcium in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Arcium on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Arcium is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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 initializedinit_*_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 writablecallback_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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Arcium AI skill do?

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

Why use Arcium on TypingMind?

Because you install it once and use it with any model. Arcium is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Arcium in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/sendaifun/skills/tree/main/skills/arcium. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Arcium?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Arcium?

As many as you like. As long as a model supports skills, you can use Arcium with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Arcium AI skill free?

Yes. It is published on GitHub by sendaifun under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇