From cardano-dev-skills
Debug failing Cardano transactions by diagnosing common errors like ValueNotConservedUTxO, InsufficientCollateral, script failures, budget exceeded, datum mismatch, missing signer, and min-UTxO errors.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cardano-dev-skills:debug-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 diagnosing and fixing failing Cardano transactions. Works with any SDK (Mesh, Evolution SDK, PyCardano, cardano-client-lib) and covers both native script and Plutus script errors.
build-transactionreview-contractoptimize-validatordesign-tokenRead the error message carefully. Cardano error messages are verbose but precise. They usually tell you exactly what is wrong. The error type name alone often identifies the problem.
Reproduce before fixing. Ensure you can consistently reproduce the error before attempting a fix; transaction failures are deterministic, so the same inputs produce the same error. A root cause you have reproduced beats one reasoned from logs alone.
Isolate the failure layer. Determine if the error occurs during transaction building (SDK), during submission (node), or during script evaluation (Plutus VM).
Check the simple things first. Most transaction failures are caused by insufficient ADA, missing UTxOs, or wrong network. Check these before investigating complex script logic.
Use the transaction evaluator. Most SDKs support dry-run evaluation that simulates the transaction without submitting. Use this to test fixes before spending real resources.
Ask the user for:
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/cardano-node-wiki/ - Cardano node wikiClassify the error into one of these categories:
| Category | Common Errors | Likely Cause |
|---|---|---|
| Value errors | ValueNotConservedUTxO, OutputTooSmallUTxO | Math error in inputs/outputs, min-UTxO not met |
| Input errors | BadInputsUTxO | UTxO already spent or does not exist |
| Fee errors | FeeTooSmallUTxO | Fee calculation incorrect or overridden |
| Collateral errors | InsufficientCollateral, CollateralContainsNonADA | Missing or wrong collateral for Plutus tx |
| Script errors | ScriptFailure, ExUnitsTooBigUTxO | Plutus script fails or exceeds budget |
| Datum errors | NonOutputSupplimentaryDatums | Datum provided but not referenced |
| Signer errors | MissingRequiredSigners | Required signature not included |
| Validity errors | OutsideValidityIntervalUTxO | Transaction time range does not match current slot |
Search ${CLAUDE_SKILL_DIR}/../../docs/sources/ or see references/common-errors.md for
detailed error explanations.
For each error category, follow these diagnostic steps:
evaluate_tx before submittingextra_signatoriesvalidity_range is tight
enough for the script's must_be_before / must_be_after checksOnce the root cause is identified:
Suggest practices to avoid the error in the future:
Most SDKs support evaluating a transaction without submitting:
evaluateTx endpointclient.newTx()...buildEither() for non-throwing inspection (result._tag === "Left" carries a tagged error). On Plutus failure, EvaluationError exposes failures[] with per-script purpose, label, validationError, and traces for trace-message-level debuggingcontext.evaluate_tx(tx)cardano-cli latest transaction calculate-plutus-script-cost (there is no transaction evaluate subcommand; transaction build also evaluates implicitly)Look up transaction hashes, UTxOs, and script addresses.
For inspecting raw transaction bytes:
cardano-cli transaction view --tx-file tx.signedWhen ExUnitsTooBigUTxO occurs:
max_tx_ex_steps/max_tx_ex_mem from current protocol parameters rather
than trusting static numbers)optimize-validator)references/common-errors.md -- complete error reference with causes and fixes${CLAUDE_SKILL_DIR}/../../docs/sources/ for SDK-specific error handling guidesnpx claudepluginhub cardano-foundation/cardano-dev-skills --plugin cardano-dev-skillsBuilds 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.
This skill should be used when the user asks about Midnight transaction execution, guaranteed vs fallible phases, kernel.checkpoint(), transaction composition, state conflicts, DUST fees, gas limits, proof verification, partial transaction success, transaction merging, atomic swaps, or how Compact circuits map to on-chain execution. Also triggered by mentions of "transaction semantics", "fallible phase", "guaranteed phase", "checkpoint", "well-formedness", "Impact VM", or "Zswap offers".
Constructs, simulates, and inspects Solana transactions: instruction building, account resolution, compute budget, priority fees, legacy and versioned (v0) formats with Address Lookup Tables.