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.mdThat’s it. Open Claude Code in any project and trigger:
/sodaOr 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_256from@noble/hashes/sha3for 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.mdIn a Claude Code session:
/sodaIf the slash command exists, the install worked.
What’s actually in SKILL.md
The file is around 200 lines. Highlights:
| Section | Why it’s there |
|---|---|
| YAML frontmatter | Tells 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 use | Keeps the skill from triggering on unrelated Solana prompts |
| Architecture diagram | One-glance mental model |
| 7-step build | Code blocks for each step, copy-pasteable |
| API at a glance | Table of every exported function with types |
LegacyTx shape | So the agent doesn’t invent fields |
| Common errors | insufficient funds, AlreadyCompleted, SignatureMismatch with fixes |
| ”Just try it” path | Clone the repo, ./demo.sh, see real Sepolia tx |
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/sodaNext
- Sign an Ethereum tx — the same flow as a human-readable walkthrough.
@soda-sdk/corereference — full API surface.- Architecture — what the agent is actually orchestrating under the hood.