flux-point-studios/cardano-agent-skills

aiken-smart-contracts

Aiken workflows: validators, building, blueprints, .plutus generation. Safe guidance for smart contract development.

First seen Jan 24, 2026

Installation

$ npx skills add flux-point-studios/cardano-agent-skills --skill aiken-smart-contracts

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from flux-point-studios/cardano-agent-skills · top by installs.

npx skills add flux-point-studios/cardano-agent-skills

Browse all from flux-point-studios/cardano-agent-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 8
License LICENSE
Default branch main
Open issues 1
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash(aiken:*), Bash(cardano-cli:*), Read, Write
Declared agents clawdbot

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,275 B
  • docs SUMMARY.md 145 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 50 installs

SKILL.md

aiken-smart-contracts

When to use

  • Writing or auditing Aiken validators
  • Building and testing smart contracts
  • Generating .plutus artifacts for CLI/MeshJS

Operating rules (must follow)

  • Confirm Aiken version before generating code
  • Verify script hashes after every rebuild
  • Test on preprod/preview before mainnet
  • Treat datum/redeemer schemas as versioned APIs

Workflow

1. Initialize project

aiken new my-project
cd my-project

2. Project structure

my-project/
├── aiken.toml           # Project config
├── lib/                 # Reusable modules
├── validators/          # Validator entry points
│   └── my_validator.ak
└── plutus.json          # Generated blueprint

3. Write validator

// validators/my_validator.ak
use aiken/transaction.{ScriptContext}

validator {
  fn spend(datum: Data, redeemer: Data, ctx: ScriptContext) -> Bool {
    // Your validation logic
    True
  }
}

4. Build and test

# Build all validators
aiken build

# Run tests
aiken check

# Format code
aiken fmt

5. Generate artifacts

# Blueprint is auto-generated at plutus.json
# Extract .plutus for cardano-cli:
aiken blueprint convert > my_validator.plutus

# Get script hash
cardano-cli conway transaction policyid \
  --script-file my_validator.plutus

6. Derive script address

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

Examples

Example: Simple spending validator

User request: "Create a validator that only allows spending by a specific pubkey"

Response:

// validators/pubkey_lock.ak
use aiken/hash.{Blake2b_224, Hash}
use aiken/transaction.{ScriptContext, Spend}
use aiken/transaction/credential.{VerificationKey}

type Datum {
  owner: Hash<Blake2b_224, VerificationKey>
}

type Redeemer {
  // Could be unit if no redeemer data needed
}

validator {
  fn spend(datum: Datum, _redeemer: Redeemer, ctx: ScriptContext) -> Bool {
    let ScriptContext { transaction, purpose } = ctx
    expect Spend(_) = purpose

    // Check if owner signed the transaction
    list.has(transaction.extra_signatories, datum.owner)
  }
}
# Build
aiken build

# Test
aiken check

# Generate .plutus
aiken blueprint convert > pubkey_lock.plutus

Example: Parameterized validator

User request: "Create a time-locked validator"

Response:

// validators/time_lock.ak
use aiken/interval.{Finite, Interval, IntervalBound}
use aiken/transaction.{ScriptContext, ValidityRange}

type Datum {
  lock_until: Int  // POSIX time in milliseconds
}

validator {
  fn spend(datum: Datum, _redeemer: Data, ctx: ScriptContext) -> Bool {
    let valid_range: ValidityRange = ctx.transaction.validity_range

    // Check if current time is past lock_until
    when valid_range.lower_bound.bound_type is {
      Finite(tx_earliest_time) -> tx_earliest_time > datum.lock_until
      _ -> False
    }
  }
}

V3 considerations (Conway)

  • Single unified context argument
  • Datum may be optional for some patterns
  • Governance script purposes available
  • Use aiken build --plutus-version v3 if targeting V3

Safety / key handling

  • Datum/redeemer are on-chain visible—no secrets
  • Version your datum schemas (breaking changes break funds)
  • Verify script hash matches after any rebuild
  • Always test with small amounts first

References