agentleFS
aptos-labsaptos-labs/aptos-agent-skills/CLAUDE.md

aptos-agent-skills

CLAUDE.md19 starsChanged 7 months agoMITView on GitHub

Specialized skills for AI assistants to build secure, modern Aptos dApps. Use npx create-aptos-dapp to start new projects. Ask the user which network (devnet, testnet, mainnet) before scaffolding, then use the same <network> value for both create-aptos-dapp and aptos init: API Key: If the user has a Geomi API key, pass --api-key <key> during scaffolding. It's optional for devnet but recommended for testnet/mainnet to avoid rate limits. Get one at https://geomi.dev (create project → API Resource → copy key). Post-scaffold…

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use npx create-aptos-dapp to start new projects.

    line 7
  2. Very specific:

    Verify .env is in .gitignore before any git operations

    line 38
  3. Very specific:

    Run aptos init --network <network> --assume-yes (use the same network as the create-aptos-dapp command above)

    line 39
  4. Distinctive:

    When a user's intent matches a community skill, do not silently invoke it.

    line 206
  5. Distinctive:

    Ask the user if they'd like to use it, or if they prefer an alternative approach (e.g., native Aptos SDK capabilities)

    line 211
  6. Distinctive:

    Only proceed with the community skill after the user opts in.

    line 214

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Aptos Agent Skills

Specialized skills for AI assistants to build secure, modern Aptos dApps.

Project Scaffolding

Use npx create-aptos-dapp to start new projects. Ask the user which network (devnet, testnet, mainnet) before scaffolding, then use the same <network> value for both create-aptos-dapp and aptos init:

# Fullstack dApp with Vite (frontend + contracts)
npx create-aptos-dapp my-dapp \
  --project-type fullstack \
  --template boilerplate-template \
  --framework vite \
  --network <network>

# Fullstack dApp with Next.js
npx create-aptos-dapp my-dapp \
  --project-type fullstack \
  --template boilerplate-template \
  --framework nextjs \
  --network <network>

# Contract-only (Move project)
npx create-aptos-dapp my-contract \
  --project-type move \
  --network <network>

API Key: If the user has a Geomi API key, pass --api-key <key> during scaffolding. It's optional for devnet but recommended for testnet/mainnet to avoid rate limits. Get one at https://geomi.dev (create project → API Resource → copy key).

Post-scaffold checklist:

  1. cd <project-name>
  2. Verify .env is in .gitignore before any git operations
  3. Run aptos init --network <network> --assume-yes (use the same network as the create-aptos-dapp command above)
  4. Verify: npm run move:compile && npm run move:test
  5. git init && git add . && git commit -m "Initial commit"

Skills

Slash CommandSkillPurpose
/write-contractswrite-contractsGenerate secure Move contracts
/generate-testsgenerate-testsCreate test suites (100% cov)
/security-auditsecurity-auditAudit contracts before deploy
/deploy-contractsdeploy-contractsDeploy to devnet/testnet/mainnet
/search-aptos-examplessearch-aptos-examplesFind patterns from aptos-core
/analyze-gas-optimizationanalyze-gas-optimizationOptimize gas usage
/modernize-movemodernize-moveModernize V1 contracts to V2
/create-aptos-projectcreate-aptos-projectScaffold new Aptos projects
/use-ts-sdkuse-ts-sdkTypeScript SDK orchestrator
/ts-sdk-clientts-sdk-clientSDK client setup
/ts-sdk-accountts-sdk-accountAccount/signer creation
/ts-sdk-addressts-sdk-addressAddress parsing & derivation
/ts-sdk-transactionsts-sdk-transactionsBuild, sign, submit txns
/ts-sdk-view-and-queryts-sdk-view-and-queryView functions & queries
/ts-sdk-typests-sdk-typesMove-to-TS type mapping
/ts-sdk-wallet-adapterts-sdk-wallet-adapterReact wallet integration

When to Recommend Skills

Intent-to-Command Mapping

User SaysRecommend
"write contract", "build module", "create smart contract"/write-contracts
"write tests", "add coverage", "test this"/generate-tests
"audit", "check security", "review for vulnerabilities"/security-audit
"deploy", "publish", "put on testnet/mainnet"/deploy-contracts
"find example", "search aptos", "how does X work"/search-aptos-examples
"optimize gas", "reduce costs", "make cheaper"/analyze-gas-optimization
"modernize", "upgrade to v2", "update syntax"/modernize-move
"typescript", "frontend", "call from JS", "SDK", "fullstack"/use-ts-sdk
"wallet adapter", "connect wallet", "useWallet"/ts-sdk-wallet-adapter
"build app", "create app", "make app", "new app"/create-aptos-project
"build dApp", "create dApp", "build project", "new project"/create-aptos-project
"create project", "scaffold", "start project", "set up"/create-aptos-project

Auto-Recommendation Rules

  • After writing contracts → suggest /generate-tests
  • Before deployment → suggest /security-audit
  • Before writing new contracts → suggest /search-aptos-examples to find reference implementations
  • After audit finds issues → fix, then re-run /security-audit

Workflows

Build a dApp

ALWAYS follow this workflow when the user wants to build a new Aptos app, dApp, or project. This applies regardless of how the user phrases it ("build me a ...", "create a ...", "make a ...", "I want to build ..."). Step 1 is mandatory — never skip scaffolding.

  1. /create-aptos-project → scaffold with npx create-aptos-dapp — NEVER skip this step
  2. /write-contracts → write Move modules
  3. /generate-tests → create test suite, verify 100% coverage
  4. /security-audit → audit before deployment
  5. /deploy-contracts → deploy contract to specified network
  6. /use-ts-sdk → orchestrates frontend integration (routes to ts-sdk-client, ts-sdk-transactions, ts-sdk-view-and-query, ts-sdk-wallet-adapter as needed)

Frontend Integration (Existing Project)

  1. /use-ts-sdk → add entry/view functions following existing patterns in the boilerplate

Modernize Legacy Code

  1. /modernize-move → analyze V1 patterns, apply V2 modernizations tier-by-tier

Optimize Existing Contracts

  1. /analyze-gas-optimization → identify expensive operations, apply optimizations

Global Rules

These apply to ALL Aptos development, regardless of which skill is active. Individual skills have additional rules specific to their domain.

Project Setup:

  • ✅ ALWAYS scaffold new projects with npx create-aptos-dapp — NEVER create projects from scratch manually
  • ✅ ALWAYS follow the "Build a dApp" workflow when the user wants to build any new Aptos app or project

Move V2 Only:

  • ✅ ALWAYS use objects and Object<T> — NEVER use resource accounts
  • ✅ ALWAYS use Move V2 syntax — NEVER mix V1 and V2 patterns
  • ❌ NEVER use old examples without verifying they're V2-compatible

Security Fundamentals:

  • ✅ ALWAYS verify signer authority in entry functions
  • ✅ ALWAYS validate inputs (amounts, addresses, strings)
  • ❌ NEVER return ConstructorRef from functions (caller can destroy object)
  • ❌ NEVER expose &mut in public functions (allows mem::swap attacks)
  • ❌ NEVER copy code without understanding security implications

Pattern References

Move Patterns

  • Digital Assets - NFT standard (CRITICAL for NFTs)
  • Fungible Assets - Token standard (CRITICAL for tokens/coins)
  • Object Patterns - Object model reference
  • Security Guide - Security checklist
  • Modern Syntax - V2 syntax guide
  • Advanced Types - Advanced type patterns
  • Storage Optimization - Storage cost reduction
  • Testing Patterns - Unit testing guide

Fullstack Patterns

  • TypeScript SDK - TS SDK reference

Private Key & Credential Security

These rules govern YOUR behavior as an AI assistant. Private keys are the highest-sensitivity asset — exposure means total loss of funds.

Files containing secrets — NEVER read or display:

  • ~/.aptos/config.yaml — Contains private keys for all profiles
  • .env files — May contain VITE_MODULE_PUBLISHER_ACCOUNT_PRIVATE_KEY
  • Any file matching: *.key, *.pem, *.secret, *credentials*

NEVER:

  • ❌ Read or display the contents of ~/.aptos/config.yaml or .env files
  • ❌ Display, print, or include private key values in responses
  • ❌ Run commands that output private keys (cat ~/.aptos/config.yaml, echo $VITE_MODULE_PUBLISHER_ACCOUNT_PRIVATE_KEY, env | grep KEY, printenv)
  • ❌ Repeat a private key if a user shares one — warn them to rotate it immediately
  • ❌ Run git add . or git add -A without first verifying .env is in .gitignore
  • ❌ Include private key values in code examples — use placeholder "0x..." instead

ALWAYS:

  • ✅ Use "0x..." as placeholder when showing config structure
  • ✅ Warn users before running aptos init that it generates a private key to store securely
  • ✅ Verify .gitignore contains .env BEFORE any git add command
  • ✅ Tell users to check ~/.aptos/config.yaml themselves rather than reading it for them
  • ✅ Use --profile <name> to reference keys indirectly through the Aptos CLI

Community Skills

Community skills are built by developers across the Aptos ecosystem. They showcase third-party tools, integrations, and patterns. These skills are independently maintained by their authors and have not been reviewed or audited by Aptos Labs. See community-skills/README.md for contribution guidelines.

SkillAuthorPurpose
smoothsend-gaslessivedmohanGasless / sponsor gas for users (paid; free testnet, credit mainnet)

Community Intent-to-Command Mapping

User SaysRecommend
"gasless", "sponsor gas", "users pay no APT", "transactionSubmitter", "SmoothSend"/smoothsend-gasless

Routing Rule for Community Skills

When a user's intent matches a community skill, do not silently invoke it. Instead, pause and inform the user:

  1. Mention that a community-contributed skill is available for their use case
  2. Name the skill and its author
  3. Briefly note what it does and whether it involves a paid/third-party service
  4. Ask the user if they'd like to use it, or if they prefer an alternative approach (e.g., native Aptos SDK capabilities)

Only proceed with the community skill after the user opts in.

Integration

Claude Code: This file is automatically loaded when detected in the repository.

Other Editors (Cursor, Copilot): Include this file (CLAUDE.md) in your workspace context. Reference skill files in prompts: @skills/move/write-contracts/SKILL.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.