$npx -y skills add aptos-labs/aptos-agent-skills --skill search-aptos-examplesSearches aptos-core and daily-move for reference implementations before writing contracts. Triggers on: 'search examples', 'find example', 'check aptos-core', 'is there an example', 'reference implementation', 'how does aptos implement', 'similar contract', 'daily-move'.
| 1 | # Search Aptos Examples Skill |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | This skill helps you find relevant examples in official Aptos repositories before writing new contracts. **Always search |
| 6 | examples first** to follow established patterns. |
| 7 | |
| 8 | **Repositories:** |
| 9 | |
| 10 | - **`aptos-labs/aptos-core/aptos-move/move-examples/`** — 53+ official Move examples demonstrating best practices |
| 11 | - **`aptos-labs/daily-move/snippets/`** — 17 curated educational examples covering design patterns, Move 2 features, |
| 12 | composable NFTs, and more |
| 13 | |
| 14 | ## Core Workflow |
| 15 | |
| 16 | ### Step 1: Identify What You're Building |
| 17 | |
| 18 | Categorize your contract: |
| 19 | |
| 20 | - **NFTs/Tokens**: NFT collections, digital assets, collectibles |
| 21 | - **Fungible Assets**: Coins, tokens, currencies |
| 22 | - **DeFi**: DEXs, AMMs, lending, staking |
| 23 | - **Governance**: DAOs, voting, proposals |
| 24 | - **Marketplace**: Trading, escrow, auctions |
| 25 | - **Gaming**: Items, characters, game logic |
| 26 | - **Infrastructure**: Registries, configs, utilities |
| 27 | |
| 28 | ### Step 2: Search Relevant Examples |
| 29 | |
| 30 | **Priority Examples by Category:** |
| 31 | |
| 32 | #### NFTs & Token Objects |
| 33 | |
| 34 | 1. **`token_objects/`** - Modern object-based tokens (V2 pattern) |
| 35 | 2. **`mint_nft/`** - NFT minting patterns |
| 36 | 3. **`nft_dao/`** - NFT-gated governance |
| 37 | 4. **`collection_manager/`** - Collection management |
| 38 | 5. **(daily-move) `composable-nfts/`** - NFTs that contain other NFTs |
| 39 | 6. **(daily-move) `modifying-nfts/`** - Mutable NFT metadata patterns |
| 40 | 7. **(daily-move) `parallel-nfts/`** - Concurrent NFT minting |
| 41 | 8. **(daily-move) `liquid-nfts/`** - Fractionalized/liquid NFTs |
| 42 | |
| 43 | **When to use:** Building NFT collections, digital collectibles, tokenized assets |
| 44 | |
| 45 | #### Fungible Assets |
| 46 | |
| 47 | 1. **`fungible_asset/`** - Modern fungible token standard |
| 48 | 2. **`coin/`** - Basic coin implementation |
| 49 | 3. **`managed_fungible_asset/`** - Controlled fungible assets |
| 50 | 4. **(daily-move) `fa-lockup-example/`** - FA lockup and escrow patterns |
| 51 | 5. **(daily-move) `fractional-token/`** - Fractional token ownership |
| 52 | 6. **(daily-move) `controlled-mint/`** - Controlled minting with access control |
| 53 | |
| 54 | **When to use:** Creating tokens, currencies, reward points |
| 55 | |
| 56 | #### DeFi & Trading |
| 57 | |
| 58 | 1. **`marketplace/`** - NFT marketplace patterns |
| 59 | 2. **`swap/`** - Simple token swap |
| 60 | 3. **`liquidity_pool/`** - AMM pool implementation |
| 61 | 4. **`staking/`** - Staking mechanisms |
| 62 | |
| 63 | **When to use:** Building DEXs, marketplaces, trading platforms |
| 64 | |
| 65 | #### Governance & DAOs |
| 66 | |
| 67 | 1. **`dao/`** - DAO governance patterns |
| 68 | 2. **`voting/`** - Voting mechanisms |
| 69 | 3. **`multisig/`** - Multi-signature accounts |
| 70 | |
| 71 | **When to use:** Building DAOs, governance systems, voting |
| 72 | |
| 73 | #### Basic Patterns |
| 74 | |
| 75 | 1. **`hello_blockchain/`** - Module structure basics |
| 76 | 2. **`message_board/`** - Simple state management |
| 77 | 3. **`resource_account/`** - Resource patterns (legacy - avoid for new code) |
| 78 | 4. **(daily-move) `error-codes/`** - Error code conventions and patterns |
| 79 | 5. **(daily-move) `private-vs-public/`** - Function visibility and access |
| 80 | 6. **(daily-move) `objects/`** - Object model fundamentals |
| 81 | |
| 82 | **When to use:** Learning Move basics, simple contracts |
| 83 | |
| 84 | #### Advanced Patterns |
| 85 | |
| 86 | 1. **`object_playground/`** - Object model exploration |
| 87 | 2. **`capability/`** - Capability-based security |
| 88 | 3. **`upgradeable/`** - Upgradeable contracts |
| 89 | 4. **(daily-move) `design-patterns/`** - Autonomous objects and other design patterns |
| 90 | 5. **(daily-move) `struct-capabilities/`** - Struct-based capability patterns |
| 91 | 6. **(daily-move) `move-2/`** - Move 2 language features and idioms |
| 92 | 7. **(daily-move) `storage/`** - Storage layout and optimization patterns |
| 93 | 8. **(daily-move) `data-structures/`** - Heap data structure implementation |
| 94 | |
| 95 | **When to use:** Complex architectures, security patterns |
| 96 | |
| 97 | #### Gaming |
| 98 | |
| 99 | 1. **(daily-move) `lootbox/`** - Randomized loot box mechanics |
| 100 | |
| 101 | **When to use:** Building games, randomized rewards, loot systems |
| 102 | |
| 103 | ### Step 3: Review Example Code |
| 104 | |
| 105 | **What to look for:** |
| 106 | |
| 107 | 1. **Module Structure:** |
| 108 | - How are imports organized? |
| 109 | - What structs are defined? |
| 110 | - How are error codes structured? |
| 111 | |
| 112 | 2. **Object Creation:** |
| 113 | - How are objects created? |
| 114 | - Which refs are generated? |
| 115 | - How is ownership managed? |
| 116 | |
| 117 | 3. **Access Control:** |
| 118 | - How is signer authority verified? |
| 119 | - How is object ownership checked? |
| 120 | - What roles/permissions exist? |
| 121 | |
| 122 | 4. **Operations:** |
| 123 | - How are transfers handled? |
| 124 | - How are updates secured? |
| 125 | - What validations are performed? |
| 126 | |
| 127 | 5. **Testing:** |
| 128 | - What test patterns are used? |
| 129 | - How is coverage achieved? |
| 130 | |
| 131 | ### Step 4: Adapt Patterns to Your Use Case |
| 132 | |
| 133 | **Don't copy blindly - adapt:** |
| 134 | |
| 135 | 1. **Understand the pattern:** Why is it structur |