Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问clear审计通过

aiken-smart-contracts艾肯智能合约

Agent Skill

aiken-smart-contracts 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,004

周安装

41

GitHub Stars

7

下载量

325
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:aiken-smart-contracts(艾肯智能合约)
来源仓库:https://github.com/flux-point-studios/cardano-agent-skills
仓库路径:skills/aiken-smart-contracts
安装命令:
npx skills add https://github.com/flux-point-studios/cardano-agent-skills --skill aiken-smart-contracts
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/flux-point-studios/cardano-agent-skills --skill aiken-smart-contracts

简介

用于 Aiken 智能合约项目的构建、测试与 Plutus 工件生成。

  • 适用于开发环境中的合约编写、验证与部署准备等任务。
  • 需先确认项目结构与版本信息,按规范执行检查与构建流程。
  • 安装通过 GitHub 仓库,建议核对维护状态与文件读写权限。
  • aiken-smart-contracts 属于开发类 Skill,可作为该场景下的辅助能力补充。

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.27%
按下载量换算98

Codex

21.03%
按下载量换算68

OpenCode

15.33%
按下载量换算50

Cursor

13.37%
按下载量换算43

Gemini CLI

8.32%
按下载量换算27

windsurf

3.17%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills