Use with AI

Use SODA from your AI agent

A self-contained skill that teaches an AI coding agent (Claude Code, Codex, Cursor, anything that reads markdown skill files) the exact current API surface of @soda-sdk/core.

Drop it into your agent’s skills directory and from then on, prompts like “sign an Ethereum tx from my Anchor program” produce code that compiles on the first try — no hallucinated function names, no stale imports.

Why use it? Without the skill, an agent guesses function names from training data. The skill ships the live API surface (signatures, types, the seven-step pipeline), so the agent writes correct code.

Install in one command

mkdir -p ~/.claude/skills/soda && \
  curl -fsSL https://raw.githubusercontent.com/derek2403/frontier/main/.claude/skills/soda/SKILL.md \
    -o ~/.claude/skills/soda/SKILL.md

That’s it. Open Claude Code in any project and trigger:

/soda

Or just describe what you want — the skill auto-invokes on phrases like “use SODA”, “sign Ethereum from Solana”, “@soda-sdk/core”:

Build me an Anchor program that holds USDC on Sepolia under a PDA, and withdraws it via SODA when a Solana governance vote passes.

What the skill teaches your agent

Install the right package

pnpm add @soda-sdk/core @solana/web3.js @noble/hashes — ESM only, scoped under the @soda-sdk org.

Read the committee public key

Pull group_pk from the on-chain Committee PDA (99apYWpnoMWwA2iXyJZcTMoTEag6tdFasjujdhdeG8b4 on devnet), strip the Anchor discriminator, compress to 33 bytes.

Derive the deterministic foreign address

deriveEthAddress(groupPkCompressed, programId, seeds, chainTag) returns { tweak, foreignPk, ethAddress }. Same inputs → same address every time.

Build the unsigned legacy transaction

encodeUnsignedLegacy({ nonce, gasPriceWei, gasLimit, to, valueWeiBe, data, chainId })

  • keccak_256 from @noble/hashes/sha3 for the payload.

Request the signature on Solana

Either CPI from your Anchor program (soda::cpi::request_signature(...)) or a client-side ix on the deployed soda program. The skill shows both.

Wait for SigCompleted

Subscribe to logs, decode the event with the sha256("event:SigCompleted")[..8] discriminator, extract signature and recoveryId.

Assemble + broadcast

eip155V(recoveryId, chainId)encodeSignedLegacy(tx, v, r, s)new EthRpc(url).sendRawTransaction(rawHex). Returns an Etherscan link.

Trigger phrases

Once installed, the skill auto-invokes when your prompt mentions any of these. No manual /soda needed:

  • “Use SODA”
  • “Sign an Ethereum tx from a Solana program”
  • “I want a Solana PDA to control a Bitcoin UTXO”
  • “Cross-chain signing in Solana”
  • “Build with @soda-sdk/core
  • “Use SODA from a Solana program”

Verify it’s installed

ls ~/.claude/skills/soda/
# expected: SKILL.md

In a Claude Code session:

/soda

If the slash command exists, the install worked.

What’s actually in SKILL.md

The file is around 200 lines. Highlights:

SectionWhy it’s there
YAML frontmatterTells the agent when to auto-invoke the skill, and pre-approves Bash(pnpm *) Bash(npm *) Bash(yarn *) so installs don’t prompt
When to use / not useKeeps the skill from triggering on unrelated Solana prompts
Architecture diagramOne-glance mental model
7-step buildCode blocks for each step, copy-pasteable
API at a glanceTable of every exported function with types
LegacyTx shapeSo the agent doesn’t invent fields
Common errorsinsufficient funds, AlreadyCompleted, SignatureMismatch with fixes
”Just try it” pathClone the repo, ./demo.sh, see real Sepolia tx

View the source on GitHub →

Update or uninstall

# Update to the latest version (re-run the install command)
curl -fsSL https://raw.githubusercontent.com/derek2403/frontier/main/.claude/skills/soda/SKILL.md \
  -o ~/.claude/skills/soda/SKILL.md
 
# Uninstall
rm -rf ~/.claude/skills/soda    # or ~/.codex/skills/soda

Next