# Cardano Cli Plutus Scripts Operator

> Execute Plutus script transactions: script spends, datum/redeemer submission. Manual invoke only.

- **Type:** Skill
- **Install:** `agentstack add skill-flux-point-studios-cardano-agent-skills-cardano-cli-plutus-scripts-operator`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Flux-Point-Studios](https://agentstack.voostack.com/s/flux-point-studios)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Flux-Point-Studios](https://github.com/Flux-Point-Studios)
- **Source:** https://github.com/Flux-Point-Studios/cardano-agent-skills/tree/main/skills/cardano-cli-plutus-scripts-operator

## Install

```sh
agentstack add skill-flux-point-studios-cardano-agent-skills-cardano-cli-plutus-scripts-operator
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# cardano-cli-plutus-scripts-operator

> **OPERATOR SKILL**: Executes Plutus script transactions. Requires explicit human invocation due to collateral risk.

## When to use
- When ready to spend from a script address
- After reviewing guidance from `cardano-cli-plutus-scripts`

## Operating rules (must follow)
- **ALWAYS verify collateral UTxO is ADA-only**
- Confirm script hash matches expected
- Validate datum/redeemer JSON before use
- **REQUIRE explicit confirmation before submit**
- Test on preprod/preview before mainnet

## Pre-flight checklist
```
[ ] Network: ___________
[ ] Script file (.plutus) verified
[ ] Script hash matches on-chain
[ ] Datum JSON validated
[ ] Redeemer JSON validated
[ ] Collateral UTxO selected (ADA-only!)
[ ] Protocol parameters fresh
```

## Execution workflow

### Step 1: Verify script
```bash
# Get script hash
cardano-cli conway transaction policyid \
  --script-file script.plutus

# Derive script address
cardano-cli conway address build \
  --payment-script-file script.plutus \
  --testnet-magic 1 \
  --out-file script.addr
```

### Step 2: Query script UTxO
```bash
cardano-cli conway query utxo \
  --address $(cat script.addr) \
  --testnet-magic 1
```

### Step 3: Prepare collateral
```bash
# Must be ADA-only UTxO at your payment address
cardano-cli conway query utxo \
  --address  \
  --testnet-magic 1

# Select one with only ADA (no tokens)
```

### Step 4: Build script spend
```bash
cardano-cli conway transaction build \
  --testnet-magic 1 \
  --tx-in # \
  --tx-in-script-file script.plutus \
  --tx-in-inline-datum-present \
  --tx-in-redeemer-file redeemer.json \
  --tx-in-collateral # \
  --tx-out + \
  --change-address  \
  --out-file tx.unsigned
```

### Step 5: Sign and submit
```bash
# Sign (collateral signer required)
cardano-cli conway transaction sign \
  --tx-file tx.unsigned \
  --signing-key-file payment.skey \
  --testnet-magic 1 \
  --out-file tx.signed

# ⚠️ CONFIRM before submit
echo "=== SCRIPT SPEND CONFIRMATION ==="
echo "Script: $(cat script.addr | head -c 20)..."
echo "Spending UTxO: "
echo "Collateral: "
echo "Output to: "

cardano-cli conway transaction submit \
  --testnet-magic 1 \
  --tx-file tx.signed
```

## Debugging failed scripts
```bash
# If script fails, check execution units
cardano-cli conway transaction build \
  ... \
  --calculate-plutus-script-cost cost.json

# Review cost.json for budget issues
cat cost.json | jq .
```

## Safety / key handling
- Collateral is at risk if script fails unexpectedly
- Use minimal collateral (1-5 ADA typically sufficient)
- Keep datum/redeemer free of secrets
- Verify script logic on testnet first

## References
- `cardano-cli-plutus-scripts` (guidance skill)
- `shared/PRINCIPLES.md`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Flux-Point-Studios](https://github.com/Flux-Point-Studios)
- **Source:** [Flux-Point-Studios/cardano-agent-skills](https://github.com/Flux-Point-Studios/cardano-agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-flux-point-studios-cardano-agent-skills-cardano-cli-plutus-scripts-operator
- Seller: https://agentstack.voostack.com/s/flux-point-studios
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
