write-contracts

write-contracts is a skill for Claude Code from aptos-labs/aptos-agent-skills. It costs 104 tokens per session (3,131 once invoked), scanned A, original, MIT.

A guide for writing smart contracts in Aptos Move V2, the programming language and platform used for blockchain programs. It covers NFT contracts, ownership objects, data storage, and security checks.

In plain words
What is it for?
Use it to create NFT collections, minting systems, marketplaces, and other Aptos blockchain contracts.
Why use it?
It helps avoid deprecated NFT standards, incorrect object handling, weak permission checks, and unsuitable storage choices when building blockchain contracts.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the aptos-agent-skills plugin — 16 skills shipped together

Good fit Use it to create NFT collections, minting systems, marketplaces, and other Aptos blockchain contracts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aptos-labs/aptos-agent-skills/write-contracts
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aptos-labs/aptos-agent-skills --skill write-contracts
Clone the repo
git clone --depth 1 https://github.com/aptos-labs/aptos-agent-skills

Made for: Claude Code.

Or install aptos-agent-skills, the plugin that ships this one along with the rest of its 16 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for write-contracts

README.md
[![agentmods](https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/write-contracts/github.svg)](https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/write-contracts)
Your own site
<a href="https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/write-contracts"><img src="https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/write-contracts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for write-contracts

Your own site · 80×15
<a href="https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/write-contracts"><img src="https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/write-contracts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,131 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00104 $0.03131
Opus 5 $0.00052 $0.01566
Sonnet 5 $0.00021 $0.00626
Haiku 4.5 $0.00010 $0.00313

Measured 9d ago against content hash d1affe1ea642, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

write-contracts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/move/write-contracts/SKILL.md · 317 lines

How it starts

The opening of the file, as written. The whole thing — 317 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Write Contracts Skill

Core Rules

Digital Assets (NFTs) ⭐ CRITICAL

  1. ALWAYS use Digital Asset (DA) standard for ALL NFT-related contracts (collections, marketplaces, minting)
  2. ALWAYS import aptos_token_objects::collection and aptos_token_objects::token modules
  3. ALWAYS use Object<AptosToken> for NFT references (NOT generic Object<T>)
  4. NEVER use legacy TokenV1 standard or aptos_token::token module (deprecated)
  5. See ../../../patterns/move/DIGITAL_ASSETS.md for complete NFT patterns

Object Model

  1. ALWAYS use Object<T> for all object references (NEVER raw addresses)
  2. Generate all refs (TransferRef, DeleteRef) in constructor before ConstructorRef destroyed
  3. Return Object<T> from constructors (NEVER return ConstructorRef)
  4. Verify ownership with object::owner(obj) == signer::address_of(user)
  5. Use object::generate_signer(&constructor_ref) for object signers
  6. Use named objects for singletons: object::create_named_object(creator, seed)

Security

  1. ALWAYS verify signer authority in entry functions: assert!(signer::address_of(user) == expected, E_UNAUTHORIZED)
  2. ALWAYS validate inputs: non-zero amounts, address validation, string length checks
  3. NEVER expose &mut references in public functions
  4. NEVER skip signer verification in entry functions

Modern Syntax

  1. Use inline functions and lambdas for iteration
  2. Use receiver-style method calls: obj.is_owner(user) (define first param as self)
  3. Use vector indexing: vector[index] instead of vector::borrow()
  4. Use direct named addresses: @marketplace_addr (NOT helper functions)

Required Patterns

  1. Use init_module for contract initialization on deployment
  2. Emit events for ALL significant activities (create, transfer, update, delete)
  3. Define clear error constants with descriptive names (E_NOT_OWNER, E_INSUFFICIENT_BALANCE)

Testability

Read the full file on GitHub · 317 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 317 lines · 104 tokens per session scan A d1affe1ea642

Subscribe to this mod's changes

write-contracts is a skill published in the GitHub repository aptos-labs/aptos-agent-skills (19 stars, last pushed 2mo ago), licensed MIT. It adds 104 tokens to every session and 3,131 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

official-sui-skills

Pointer to the official Mysten Labs skills for building on Sui — language fundamentals, object model, PTBs, SDKs, publishing, upgrades, frontend integration, accessing on-chain data. Maintained upstream at github.com/MystenLabs/skills; pinned to the same ref the audit catalog derives from (see…

MystenLabs/sui · 116 tokens

sui-and-move-tools

Use to get bytecode for a deployed Sui package and produce a disassembled working view. One GraphQL call fetches every module's raw bytecode bytes; sui move disassemble (already on the system, running sui prompt) produces .asm files for analysis. Trigger on "fetch this package's bytecode", "get me the .mv for package…

MystenLabs/sui · 105 tokens

web3-audit

Smart contract security audit — 10 DeFi bug classes (accounting desync, access control, incomplete path, off-by-one, oracle, ERC4626, reentrancy, flash loan, signature replay, proxy), pre-dive kill signals (TVL < $500K etc), Foundry PoC template, grep patterns for each class, and real Immunefi paid examples. Use for…

uphiago/recon-skills · 103 tokens

sora-taira-testnet

Work against the SORA Taira testnet through its deployed Torii MCP endpoint for live account, asset, alias, contract, governance, Musubi package-registry, and transaction workflows. Use when Codex needs to inspect or mutate the Taira testnet, verify or add https://taira.sora.org/v1/mcp, prefer the curated iroha. tool…

hyperledger-iroha/iroha · 113 tokens

mochi-local-sandbox

Bring up and use a Mochi-managed local Iroha sandbox plus its local Torii MCP endpoint. Use when Codex needs a reliable local devnet, needs to print or verify the codex mcp add mochi-local --url ... command, or should consume the generated .env.local and .mochi/generated/ bootstrap files for local-only development.

hyperledger-iroha/iroha · 82 tokens

TronScan Data Lookup

Query TRON blockchain data via the TronScan API — accounts, transactions, tokens, blocks, contracts, transfers, and chain statistics.

BofAI/skills · 33 tokens