From cardano-dev-skills
Builds Cardano transactions: send ADA, mint NFTs/tokens, interact with smart contracts, delegate stake, register DReps, and vote on-chain using Mesh SDK, Evolution SDK, PyCardano, or cardano-client-lib.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cardano-dev-skills:build-transactionThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- Documentation lookup path: ${CLAUDE_SKILL_DIR}/../../docs/sources/ -->
Guide the user through building Cardano transactions step by step using their chosen off-chain SDK. Covers the full lifecycle: prerequisites, transaction construction, signing, submission, and verification on a testnet.
write-validator
or review-contractdesign-tokendebug-transactionsetup-devnetChoose the right SDK for the job. Mesh SDK (TypeScript) and Evolution SDK
(TypeScript) have the best documentation and highest-level APIs. PyCardano is best
for Python shops. cardano-client-lib suits JVM projects needing fine control.
Search ${CLAUDE_SKILL_DIR}/../../docs/sources/ for the latest SDK comparison details.
Always prototype on Preview testnet. Never build against mainnet first. Use the Cardano faucet to obtain test ADA. Set the network parameter explicitly in every code example.
UTxO selection matters. Cardano uses the EUTxO model. The SDK must
select unspent outputs that cover the transaction value plus fees. Understand
coin selection to avoid ValueNotConservedUTxO errors.
Fees and change are computed, not guessed. All SDKs have fee estimation. Let the SDK calculate fees and construct change outputs automatically.
Transactions are deterministic. The same inputs and parameters always produce the same transaction. This enables dry-run testing before submission.
Collateral is required for Plutus interactions. Any transaction that executes a Plutus script must include collateral UTxOs containing only ADA.
Ask the user to specify or confirm:
| Parameter | Options | Default |
|---|---|---|
| SDK | mesh, evolution-sdk, pycardano, cardano-client-lib | mesh |
| Transaction type | send-ada, mint-nft, mint-token, interact-with-contract, delegate-stake, register-drep, vote | required |
| Network | preview, preprod, mainnet | preview |
| Wallet | mnemonic, private key, browser wallet | mnemonic |
If the user does not specify an SDK, recommend Mesh SDK for TypeScript projects or cardano-client-lib for Java/JVM projects.
Search the bundled documentation for relevant content:
${CLAUDE_SKILL_DIR}/../../docs/sources/evolution-sdk/ - Evolution SDK docs${CLAUDE_SKILL_DIR}/../../docs/sources/mesh-sdk/ - Mesh SDK docs${CLAUDE_SKILL_DIR}/../../docs/sources/mesh-sdk-packages/ - Mesh SDK package docs${CLAUDE_SKILL_DIR}/../../docs/sources/pycardano/ - PyCardano docs${CLAUDE_SKILL_DIR}/../../docs/sources/cardano-client-lib/ - Cardano Client Lib docsFor each SDK, ensure the user has the required environment:
Mesh SDK (TypeScript/JavaScript)
npm install @meshsdk/core
Evolution SDK (TypeScript)
npm install @evolution-sdk/evolution
PyCardano (Python)
pip install pycardano
cardano-client-lib (Java)
<dependency>
<groupId>com.bloxbean.cardano</groupId>
<artifactId>cardano-client-lib</artifactId>
<version>0.7.2</version>
</dependency>
Provide step-by-step code for the chosen SDK and transaction type. Follow these patterns:
After providing code, explain:
Warn about these frequent issues:
BadInputsUTxO. Re-query and rebuild.Buffer.from("MyToken").toString("hex")).A transaction that type-checks can still fail at submission (min-UTxO, fees, collateral,
script evaluation). Always run it on a testnet first — and for Plutus-script flows, a local
Yaci DevKit devnet (setup-devnet) gives the fastest build→submit→confirm loop.
import { MeshTxBuilder, BlockfrostProvider } from "@meshsdk/core";
const provider = new BlockfrostProvider("<BLOCKFROST_KEY>");
const txBuilder = new MeshTxBuilder({ fetcher: provider, submitter: provider });
// Build, sign, submit pattern
const unsignedTx = await txBuilder
.txOut(recipientAddress, [{ unit: "lovelace", quantity: "5000000" }])
.changeAddress(senderAddress)
.selectUtxosFrom(utxos)
.complete();
const signedTx = await wallet.signTx(unsignedTx);
const txHash = await wallet.submitTx(signedTx);
import { Address, Assets, preprod, Client } from "@evolution-sdk/evolution"
const client = Client.make(preprod)
.withBlockfrost({
baseUrl: "https://cardano-preprod.blockfrost.io/api/v0",
projectId: process.env.BLOCKFROST_API_KEY!
})
.withSeed({ mnemonic: process.env.WALLET_MNEMONIC!, accountIndex: 0 })
const tx = await client
.newTx()
.payToAddress({
address: Address.fromBech32("addr_test1..."),
assets: Assets.fromLovelace(5_000_000n)
})
.build()
const signed = await tx.sign()
const txHash = await signed.submit()
from pycardano import TransactionBuilder, TransactionOutput, Address
builder = TransactionBuilder(context)
builder.add_input_address(sender_address)
builder.add_output(TransactionOutput(recipient, 5_000_000))
signed_tx = builder.build_and_sign([signing_key], change_address=sender_address)
context.submit_tx(signed_tx)
references/sdk-comparison.md -- detailed SDK comparison table${CLAUDE_SKILL_DIR}/../../docs/sources/ for CIP-25, CIP-68 metadata standardsnpx claudepluginhub cardano-foundation/cardano-dev-skills --plugin cardano-dev-skillsGuides integrating Cardano browser wallets into web dApps using the CIP-30 standard. Handles wallet discovery, connection, state reading, and transaction signing.
Builds production-grade Web3 apps, smart contracts, and decentralized systems across Ethereum, Solana, Cosmos, and other ecosystems. Covers DeFi, NFTs, DAOs, security auditing, and Layer 2 solutions.
Builds production-ready Web3 apps, smart contracts, and decentralized systems including DeFi, NFTs, DAOs, and enterprise blockchain integrations.