- Home
- Skills
- Web3 & Crypto
- Kaspa Script Debugger
Kaspa Script Debugger
Disassemble Kaspa script hex, explain txscript errors, and size compute budgets before you sign. Built for Toccata-era covenants.
Free
Works with the AI Agents you already use
Kaspa Script Debugger
Example session with this skill installed
My Kaspa transaction got rejected with script units exceeded the amount committed: used 1342, committed 1000. What does that mean and how do I fix it?
- Read your context and instructions
- Compiled the kaspa script debugger
Summary
I ran the error through explain_script_error. It's a metering limit, not a logic bug: your script ran fine but used more compute than the input paid for.
What happened
ExceededCommittedScriptUnits. The script consumed more execution "script units" than the compute budget the input committed to and paid for. Script units are charged for:
| Charge | Cost |
|---|---|
| Pushed bytes | 1 per byte |
| Hash opcodes | 1-2 per byte hashed |
| ZK proofs | fixed |
| Sig ops | per op |
Here the script used 1342 units against a commitment of 1000.
How to fix it
Raise the input's committed compute budget so the allowed script units cover what the script actually uses (at least 1342 here, plus some margin).
2. Or make the script cheaper: fewer or smaller pushes, a cheaper hash, and don't re-hash large data.
Next step
Paste the script hex and I'll run estimate_script_cost to size the budget before you sign again. The estimate covers the dominant charges and isn't the exact consensus value, so commit a little above it.
Connects securely to your tools. The creator never sees your data.
About this skill
Writing Kaspa covenants and keep hitting ExceededCommittedScriptUnits or "stack contains N unexpected items"? This skill teaches your agent to use the open-source kaspa-script-mcp server to:
- turn script hex into opcodes and pushes, the way the engine's parser reads it
- explain txscript errors in plain language, with a concrete fix
- estimate script units and compute mass, so you commit the right per-input budget
- look up any opcode by name or byte
Offline and deterministic. The opcode table and pricing constants come from rusty-kaspa v2.1.0. Cost figures are estimates, not consensus values, and the skill says so when it matters. It reads scripts only and never signs, broadcasts or touches keys.
Needs the free MCP server (MIT): https://github.com/DrVelvetFog/kaspa-script-mcp. Setup steps are in the skill.
Cost estimates cover the dominant charges (per-byte, pushed bytes, hash opcodes, fixed ZK costs) and are not the consensus value. ZK per-public-input verifying-key pricing can't be fully derived statically. Opcodes and constants are pinned to rusty-kaspa v2.1.0, so they can go stale after a consensus upgrade. Requires the kaspa-script-mcp server.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 3 days ago
- Free with an Agensi account
Requires
Permissions
Terminal and network are only for the one-time setup (git clone, npm install, npm run build). The four tools run offline, read script hex and error text only, and never sign, broadcast or touch keys.