Token导航 LogoToken导航

Agent Skill · 开发

aptos(aptos 命令行)

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

aptos 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 13,365。

总安装 927周安装 39GitHub Stars 74下载 324核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:aptos(aptos 命令行)
来源仓库:https://github.com/raintree-technology/claude-starter
仓库路径:skills/aptos
安装命令:
npx skills add https://github.com/raintree-technology/claude-starter --skill aptos
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/raintree-technology/claude-starter --skill aptos

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 Aptos 区块链和 Move 语言相关的开发任务,提供智能合约编写支持。适用于理解 Move 类型系统、资源模型和代币标准等核心概念。通过命令行激活,结合官方文档和示例代码进行合约设计和测试。使用前需确认开发环境和网络配置,避免误部署到主网或泄露敏感信息。

aptos 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/aptos

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/raintree-technology/claude-starter --skill apt…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

aptos 怎么安装?

在终端执行 npx skills add https://github.com/raintree-technology/claude-starter --skill aptos。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

aptos 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

aptos 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

aptos 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

aptos 用的人多吗?

公开数据是累计安装 927 次,近一周安装 39 次,下载 324 次,GitHub 74 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

aptos 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
aptos

aptos 命令行 · 本页

92774接触敏感数据MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Aptos Blockchain & Move Language Expert

Aptos is a Layer 1 blockchain with the Move programming language, designed for safe and scalable smart contracts.

When to Use

  • Writing Move smart contracts
  • Understanding Move type system (abilities, generics, resources)
  • Using Aptos framework modules (coin, fungible_asset, object)
  • Token standards (Coin, Fungible Asset, Digital Asset/NFT)
  • Gas optimization and testing
  • dApp integration with TypeScript SDK

Move Language Fundamentals

Abilities - Move's Core Feature

Every type has abilities that control what you can do with it:

AbilityMeaningExample
copyCan be duplicatedPrimitives, configs
dropCan be discardedTemporary data
storeCan be stored in structsMost data types
keyCan be top-level resourceAccount resources
// Resource that can be stored globally
struct Balance has key, store {
    coins: u64
}

// Value type that behaves like a primitive
struct Point has copy, drop, store {
    x: u64,
    y: u64
}

// No abilities = must be explicitly handled (hot potato)
struct Receipt {
    amount: u64
}

Generics and Phantom Types

// Type parameter with ability constraint
struct Box<T: store> has key {
    value: T
}

// Phantom type - zero runtime cost, type safety only
struct Coin<phantom CoinType> has store {
    value: u64
}

// Different types can't be mixed
let btc: Coin<BTC> = Coin { value: 100 };
let eth: Coin<ETH> = Coin { value: 50 };
// btc + eth → compile error!

Global Storage Operations

// Store resource at signer's address
public fun initialize(account: &signer) {
    move_to(account, MyResource { value: 0 });
}

// Read resource (requires acquires annotation)
public fun get_value(addr: address): u64 acquires MyResource {
    borrow_global<MyResource>(addr).value
}

// Modify resource
public fun set_value(addr: address, val: u64) acquires MyResource {
    borrow_global_mut<MyResource>(addr).value = val;
}

// Check existence
public fun exists_at(addr: address): bool {
    exists<MyResource>(addr)
}

// Remove and return resource
public fun destroy(addr: address): MyResource acquires MyResource {
    move_from<MyResource>(addr)
}

Signer - Authentication

use std::signer;

// Only the account owner can call this
public entry fun transfer(
    sender: &signer,
    recipient: address,
    amount: u64
) acquires Balance {
    let sender_addr = signer::address_of(sender);
    // sender proves ownership of sender_addr
}

Visibility Modifiers

module example {
    // Private (default) - only within module
    fun internal() { }

    // Public - callable from anywhere
    public fun library_fn() { }

    // Friend - only from declared friend modules
    public(friend) fun restricted() { }

    // Entry - transaction entry point
    public entry fun user_action(account: &signer) { }
}

Aptos Framework (0x1)

Core Modules

ModulePurpose
accountAccount creation, auth key rotation
coinOriginal fungible token standard
fungible_assetNew flexible token standard
objectObject model for composable assets
aptos_coinNative APT token
timestampBlock timestamp
eventEvent emission

Coin Standard (0x1::coin)

use aptos_framework::coin;

// Register to receive a coin type
public entry fun register<CoinType>(account: &signer) {
    coin::register<CoinType>(account);
}

// Transfer coins
public entry fun transfer<CoinType>(
    from: &signer,
    to: address,
    amount: u64
) {
    coin::transfer<CoinType>(from, to, amount);
}

// Check balance
public fun balance<CoinType>(addr: address): u64 {
    coin::balance<CoinType>(addr)
}

Fungible Asset Standard (0x1::fungible_asset)

Modern, flexible token standard:

use aptos_framework::fungible_asset::{Self, FungibleAsset, Metadata};
use aptos_framework::primary_fungible_store;

// Create fungible asset metadata
public fun create_fa(creator: &signer): Object<Metadata> {
    let constructor_ref = object::create_named_object(creator, b"MY_FA");

    primary_fungible_store::create_primary_store_enabled_fungible_asset(
        &constructor_ref,
        option::none(), // max supply
        utf8(b"My Token"),
        utf8(b"MTK"),
        8, // decimals
        utf8(b"https://example.com/icon.png"),
        utf8(b"https://example.com"),
    );

    object::object_from_constructor_ref(&constructor_ref)
}

// Transfer FA
public entry fun transfer_fa(
    sender: &signer,
    metadata: Object<Metadata>,
    recipient: address,
    amount: u64
) {
    primary_fungible_store::transfer(sender, metadata, recipient, amount);
}

Object Model (0x1::object)

Composable, transferable objects:

use aptos_framework::object::{Self, Object, ConstructorRef};

struct MyObject has key {
    value: u64
}

// Create object
public fun create(creator: &signer): Object<MyObject> {
    let constructor_ref = object::create_object(signer::address_of(creator));
    let object_signer = object::generate_signer(&constructor_ref);

    move_to(&object_signer, MyObject { value: 42 });

    object::object_from_constructor_ref(&constructor_ref)
}

// Transfer object
public entry fun transfer_object(
    owner: &signer,
    obj: Object<MyObject>,
    recipient: address
) {
    object::transfer(owner, obj, recipient);
}

Token Standards

Digital Asset (NFT) Standard

use aptos_token_objects::collection;
use aptos_token_objects::token;

// Create collection
public entry fun create_collection(creator: &signer) {
    collection::create_unlimited_collection(
        creator,
        utf8(b"My Collection Description"),
        utf8(b"My Collection"),
        option::none(), // royalty
        utf8(b"https://example.com/collection"),
    );
}

// Mint token
public entry fun mint_token(creator: &signer, to: address) {
    let token_constructor_ref = token::create(
        creator,
        utf8(b"My Collection"),
        utf8(b"Token description"),
        utf8(b"Token #1"),
        option::none(), // royalty
        utf8(b"https://example.com/token/1"),
    );

    let transfer_ref = object::generate_transfer_ref(&token_constructor_ref);
    let linear_transfer_ref = object::generate_linear_transfer_ref(&transfer_ref);
    object::transfer_with_ref(linear_transfer_ref, to);
}

Common Patterns

Capability Pattern

struct AdminCap has key, store {}

public fun init_module(deployer: &signer) {
    move_to(deployer, AdminCap {});
}

public entry fun admin_only(admin: &signer) acquires AdminCap {
    assert!(exists<AdminCap>(signer::address_of(admin)), E_NOT_ADMIN);
    // Admin-only logic
}

Resource Account

use aptos_framework::resource_account;

// Create resource account for deterministic addresses
public fun create_resource_account(creator: &signer): signer {
    let (resource_signer, _cap) = resource_account::create_resource_account(
        creator,
        b"seed"
    );
    resource_signer
}

Events

use aptos_framework::event;

#[event]
struct TransferEvent has drop, store {
    from: address,
    to: address,
    amount: u64,
}

public fun emit_transfer(from: address, to: address, amount: u64) {
    event::emit(TransferEvent { from, to, amount });
}

Testing

#[test]
fun test_basic() {
    let x = 1 + 1;
    assert!(x == 2, 0);
}

#[test(account = @0x123)]
fun test_with_signer(account: &signer) {
    let addr = signer::address_of(account);
    assert!(addr == @0x123, 0);
}

#[test]
#[expected_failure(abort_code = E_NOT_FOUND)]
fun test_expected_failure() {
    abort E_NOT_FOUND
}

CLI Commands

# Initialize project
aptos init

# Compile
aptos move compile

# Test
aptos move test

# Publish
aptos move publish --profile mainnet

# Run function
aptos move run --function-id 'addr::module::function'

Gas Optimization

  • Use inline for small frequently-called functions
  • Prefer Table over vector for large collections
  • Minimize storage operations (most expensive)
  • Use SmartTable for parallel execution
  • Batch operations when possible

TypeScript SDK

import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";

const config = new AptosConfig({ network: Network.MAINNET });
const aptos = new Aptos(config);

// Query account balance
const balance = await aptos.getAccountAPTAmount({
    accountAddress: "0x1"
});

// Submit transaction
const txn = await aptos.transaction.build.simple({
    sender: account.accountAddress,
    data: {
        function: "0x1::coin::transfer",
        typeArguments: ["0x1::aptos_coin::AptosCoin"],
        functionArguments: [recipientAddress, amount],
    },
});

const result = await aptos.signAndSubmitTransaction({
    signer: account,
    transaction: txn,
});

Resources

平台分布

Claude Code

27.56%
按下载量换算89

Antigravity

23.23%
按下载量换算75

trae

16.5%
按下载量换算53

OpenCode

11.21%
按下载量换算36

Cursor

7.93%
按下载量换算26

Gemini CLI

3.64%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills