$npx -y skills add aptos-labs/aptos-agent-skills --skill create-aptos-projectScaffolds new Aptos projects using npx create-aptos-dapp. Supports fullstack (Vite or Next.js) and contract-only templates with network selection and optional API key. Triggers on: 'build app', 'create app', 'make app', 'new app', 'build dApp', 'create dApp', 'new dApp', 'build p
| 1 | # Create Aptos Project Skill |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Scaffold new Aptos projects using `npx create-aptos-dapp`. This is the **mandatory first step** when a user wants to |
| 6 | build any new Aptos app, dApp, or project — regardless of how they phrase it. |
| 7 | |
| 8 | ## ALWAYS |
| 9 | |
| 10 | 1. **Use `npx create-aptos-dapp`** to scaffold — NEVER create projects from scratch manually |
| 11 | 2. **Ask the user** about project type, framework, and network before scaffolding |
| 12 | 3. **Verify `.env` is in `.gitignore`** before any git operations |
| 13 | 4. **Use the same network** for both `create-aptos-dapp` and `aptos init` |
| 14 | 5. **Follow the full Build a dApp workflow** after scaffolding (contracts, tests, audit, deploy, frontend) |
| 15 | |
| 16 | ## NEVER |
| 17 | |
| 18 | 1. **Skip scaffolding** — even for "simple" projects, always start with `create-aptos-dapp` |
| 19 | 2. **Create project structure manually** — the boilerplate template handles this |
| 20 | 3. **Display or read private keys** — use `"0x..."` as placeholder |
| 21 | 4. **Run `git add .` or `git add -A`** without first verifying `.env` is in `.gitignore` |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | ## Decision Tree |
| 26 | |
| 27 | Before running the scaffold command, gather these inputs from the user: |
| 28 | |
| 29 | ### 1. Project Name |
| 30 | |
| 31 | Derive from the user's description or ask directly. Use kebab-case (e.g., `habit-tracker`, `nft-marketplace`). |
| 32 | |
| 33 | ### 2. Project Type |
| 34 | |
| 35 | | Option | When to Use | |
| 36 | | ----------------------- | -------------------------------------------------- | |
| 37 | | **Fullstack** (default) | User wants a frontend + smart contracts | |
| 38 | | **Contract-only** | User only wants Move smart contracts (no frontend) | |
| 39 | |
| 40 | ### 3. Framework (fullstack only) |
| 41 | |
| 42 | | Option | When to Use | |
| 43 | | ------------------ | ----------------------------- | |
| 44 | | **Vite** (default) | Default choice, lighter setup | |
| 45 | | **Next.js** | User asks for Next.js or SSR | |
| 46 | |
| 47 | ### 4. Network |
| 48 | |
| 49 | | Option | When to Use | |
| 50 | | -------------------- | ------------------------------------ | |
| 51 | | **devnet** (default) | Development and testing | |
| 52 | | **testnet** | Pre-production, user explicitly asks | |
| 53 | | **mainnet** | Production, user explicitly asks | |
| 54 | |
| 55 | ### 5. API Key (optional) |
| 56 | |
| 57 | Ask if the user has a Geomi API key. It's optional for devnet but recommended for testnet/mainnet to avoid rate limits. |
| 58 | Get one at https://geomi.dev (create project -> API Resource -> copy key). |
| 59 | |
| 60 | --- |
| 61 | |
| 62 | ## Scaffolding Commands |
| 63 | |
| 64 | ```bash |
| 65 | # Fullstack dApp with Vite (frontend + contracts) |
| 66 | npx create-aptos-dapp <project-name> \ |
| 67 | --project-type fullstack \ |
| 68 | --template boilerplate-template \ |
| 69 | --framework vite \ |
| 70 | --network <network> |
| 71 | |
| 72 | # Fullstack dApp with Next.js |
| 73 | npx create-aptos-dapp <project-name> \ |
| 74 | --project-type fullstack \ |
| 75 | --template boilerplate-template \ |
| 76 | --framework nextjs \ |
| 77 | --network <network> |
| 78 | |
| 79 | # Contract-only (Move project) |
| 80 | npx create-aptos-dapp <project-name> \ |
| 81 | --project-type move \ |
| 82 | --network <network> |
| 83 | ``` |
| 84 | |
| 85 | **Optional flags:** |
| 86 | |
| 87 | - `--api-key <key>` — Pass a Geomi API key during scaffolding |
| 88 | - `--use-surf` — Enable Surf for type-safe contract interactions |
| 89 | |
| 90 | --- |
| 91 | |
| 92 | ## Post-Scaffold Checklist |
| 93 | |
| 94 | After scaffolding, complete these steps in order: |
| 95 | |
| 96 | 1. `cd <project-name>` |
| 97 | 2. Verify `.env` is in `.gitignore` before any git operations |
| 98 | 3. Run `aptos init --network <network> --assume-yes` (use the **same network** as above) |
| 99 | 4. Verify: `npm run move:compile && npm run move:test` |
| 100 | 5. `git init && git add . && git commit -m "Initial commit"` |
| 101 | |
| 102 | --- |
| 103 | |
| 104 | ## Build a dApp Workflow |
| 105 | |
| 106 | **ALWAYS follow this workflow when the user wants to build a new Aptos app, dApp, or project.** This applies regardless |
| 107 | of how the user phrases it ("build me a ...", "create a ...", "make a ...", "I want to build ..."). |
| 108 | |
| 109 | 1. `/create-aptos-project` -> scaffold with `npx create-aptos-dapp` (this skill — NEVER skip) |
| 110 | 2. `/write-contracts` -> write Move modules |
| 111 | 3. `/generate-tests` -> create test suite, verify 100% coverage |
| 112 | 4. `/security-audit` -> audit before deployment |
| 113 | 5. `/deploy-contracts` -> deploy contract to specified network |
| 114 | 6. `/use-ts-sdk` -> orchestrates frontend integration (routes to ts-sdk-client, ts-sdk-transactions, |
| 115 | ts-sdk-view-and-query, ts-sdk-wallet-adapter as needed) |
| 116 | |
| 117 | --- |
| 118 | |
| 119 | ## What the Boilerplate Includes |
| 120 | |
| 121 | ### Fullstack Template |
| 122 | |
| 123 | - `contract/` — Move smart contract with `Move.to |