Create Aptos Project Skill
Purpose
Scaffold new Aptos projects using npx create-aptos-dapp. This is the mandatory first step when a user wants to
build any new Aptos app, dApp, or project — regardless of how they phrase it.
ALWAYS
- Use
npx create-aptos-dapp to scaffold — NEVER create projects from scratch manually
- Ask the user about project type, framework, and network before scaffolding
- Verify
.env is in .gitignore before any git operations
- Use the same network for both
create-aptos-dapp and aptos init
- Follow the full Build a dApp workflow after scaffolding (contracts, tests, audit, deploy, frontend)
NEVER
- Skip scaffolding — even for "simple" projects, always start with
create-aptos-dapp
- Create project structure manually — the boilerplate template handles this
- Display or read private keys — use
"0x..." as placeholder
- Run
git add . or git add -A without first verifying .env is in .gitignore
Decision Tree
Before running the scaffold command, gather these inputs from the user:
1. Project Name
Derive from the user's description or ask directly. Use kebab-case (e.g., habit-tracker, nft-marketplace).
2. Project Type
| Option |
When to Use |
| Fullstack (default) |
User wants a frontend + smart contracts |
| Contract-only |
User only wants Move smart contracts (no frontend) |
3. Framework (fullstack only)
| Option |
When to Use |
| Vite (default) |
Default choice, lighter setup |
| Next.js |
User asks for Next.js or SSR |
4. Network
| Option |
When to Use |
| devnet (default) |
Development and testing |
| testnet |
Pre-production, user explicitly asks |
| mainnet |
Production, user explicitly asks |
5. API Key (optional)
Ask if the user has a Geomi API key. 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).
Scaffolding Commands
# Fullstack dApp with Vite (frontend + contracts)
npx create-aptos-dapp <project-name> \
--project-type fullstack \
--template boilerplate-template \
--framework vite \
--network <network>
# Fullstack dApp with Next.js
npx create-aptos-dapp <project-name> \
--project-type fullstack \
--template boilerplate-template \
--framework nextjs \
--network <network>
# Contract-only (Move project)
npx create-aptos-dapp <project-name> \
--project-type move \
--network <network>
Optional flags:
--api-key <key> — Pass a Geomi API key during scaffolding
--use-surf — Enable Surf for type-safe contract interactions
Post-Scaffold Checklist
After scaffolding, complete these steps in order:
cd <project-name>
- Verify
.env is in .gitignore before any git operations
- Run
aptos init --network <network> --assume-yes (use the same network as above)
- Verify:
npm run move:compile && npm run move:test
git init && git add . && git commit -m "Initial commit"
Build a dApp Workflow
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 ...").
/create-aptos-project -> scaffold with npx create-aptos-dapp (this skill — NEVER skip)
/write-contracts -> write Move modules
/generate-tests -> create test suite, verify 100% coverage
/security-audit -> audit before deployment
/deploy-contracts -> deploy contract to specified network
/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)
What the Boilerplate Includes
Fullstack Template
contract/ — Move smart contract with Move.toml and starter module
frontend/ — React app with Aptos wallet adapter pre-configured
package.json — Scripts for move:compile, move:test, move:publish, dev, build
.env — Environment variables for network, API key, and publisher account
Contract-Only Template
contract/ — Move smart contract with Move.toml and starter module
package.json — Scripts for move:compile, move:test, move:publish
.env — Environment variables for network and publisher account
Troubleshooting
npx create-aptos-dapp command not found
# Auto-confirm the npx package install prompt
npx --yes create-aptos-dapp <project-name> ...
If that still fails, verify Node.js and npm are installed (node -v && npm -v).
Compile failures after scaffold
- Check
contract/Move.toml has correct named addresses
- Run
aptos init --network <network> --assume-yes if not done
- Verify
my_addr is set to "_" in [addresses] section
Named address errors
The boilerplate uses my_addr = "_" which gets resolved from .env at compile time. Ensure
VITE_MODULE_PUBLISHER_ACCOUNT_ADDRESS is set in .env (populated by aptos init).
1---2name: create-aptos-project3description: Scaffolds 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 project', 'new project', 'create project', 'scaffold', 'start project', 'set up project', 'build me a', 'I want to build', 'make me a', 'help me build'.4license: MIT5---6
7# Create Aptos Project Skill
8
9## Purpose
10
11Scaffold new Aptos projects using `npx create-aptos-dapp`. This is the **mandatory first step** when a user wants to
12build any new Aptos app, dApp, or project — regardless of how they phrase it.
13
14## ALWAYS
15
161. **Use `npx create-aptos-dapp`** to scaffold — NEVER create projects from scratch manually
172. **Ask the user** about project type, framework, and network before scaffolding
183. **Verify `.env` is in `.gitignore`** before any git operations
194. **Use the same network** for both `create-aptos-dapp` and `aptos init`
205. **Follow the full Build a dApp workflow** after scaffolding (contracts, tests, audit, deploy, frontend)
21
22## NEVER
23
241. **Skip scaffolding** — even for "simple" projects, always start with `create-aptos-dapp`
252. **Create project structure manually** — the boilerplate template handles this
263. **Display or read private keys** — use `"0x..."` as placeholder
274. **Run `git add .` or `git add -A`** without first verifying `.env` is in `.gitignore`
28
29---
30
31## Decision Tree
32
33Before running the scaffold command, gather these inputs from the user:
34
35### 1. Project Name
36
37Derive from the user's description or ask directly. Use kebab-case (e.g., `habit-tracker`, `nft-marketplace`).
38
39### 2. Project Type
40
41| Option | When to Use |
42| ----------------------- | -------------------------------------------------- |
43| **Fullstack** (default) | User wants a frontend + smart contracts |
44| **Contract-only** | User only wants Move smart contracts (no frontend) |
45
46### 3. Framework (fullstack only)
47
48| Option | When to Use |
49| ------------------ | ----------------------------- |
50| **Vite** (default) | Default choice, lighter setup |
51| **Next.js** | User asks for Next.js or SSR |
52
53### 4. Network
54
55| Option | When to Use |
56| -------------------- | ------------------------------------ |
57| **devnet** (default) | Development and testing |
58| **testnet** | Pre-production, user explicitly asks |
59| **mainnet** | Production, user explicitly asks |
60
61### 5. API Key (optional)
62
63Ask if the user has a Geomi API key. It's optional for devnet but recommended for testnet/mainnet to avoid rate limits.
64Get one at https://geomi.dev (create project -> API Resource -> copy key).
65
66---
67
68## Scaffolding Commands
69
70```bash
71# Fullstack dApp with Vite (frontend + contracts)
72npx create-aptos-dapp <project-name> \
73 --project-type fullstack \
74 --template boilerplate-template \
75 --framework vite \
76 --network <network>
77
78# Fullstack dApp with Next.js
79npx create-aptos-dapp <project-name> \
80 --project-type fullstack \
81 --template boilerplate-template \
82 --framework nextjs \
83 --network <network>
84
85# Contract-only (Move project)
86npx create-aptos-dapp <project-name> \
87 --project-type move \
88 --network <network>
89```
90
91**Optional flags:**
92
93- `--api-key <key>` — Pass a Geomi API key during scaffolding
94- `--use-surf` — Enable Surf for type-safe contract interactions
95
96---
97
98## Post-Scaffold Checklist
99
100After scaffolding, complete these steps in order:
101
1021. `cd <project-name>`
1032. Verify `.env` is in `.gitignore` before any git operations
1043. Run `aptos init --network <network> --assume-yes` (use the **same network** as above)
1054. Verify: `npm run move:compile && npm run move:test`
1065. `git init && git add . && git commit -m "Initial commit"`
107
108---
109
110## Build a dApp Workflow
111
112**ALWAYS follow this workflow when the user wants to build a new Aptos app, dApp, or project.** This applies regardless
113of how the user phrases it ("build me a ...", "create a ...", "make a ...", "I want to build ...").
114
1151. `/create-aptos-project` -> scaffold with `npx create-aptos-dapp` (this skill — NEVER skip)
1162. `/write-contracts` -> write Move modules
1173. `/generate-tests` -> create test suite, verify 100% coverage
1184. `/security-audit` -> audit before deployment
1195. `/deploy-contracts` -> deploy contract to specified network
1206. `/use-ts-sdk` -> orchestrates frontend integration (routes to ts-sdk-client, ts-sdk-transactions,
121 ts-sdk-view-and-query, ts-sdk-wallet-adapter as needed)
122
123---
124
125## What the Boilerplate Includes
126
127### Fullstack Template
128
129- `contract/` — Move smart contract with `Move.toml` and starter module
130- `frontend/` — React app with Aptos wallet adapter pre-configured
131- `package.json` — Scripts for `move:compile`, `move:test`, `move:publish`, `dev`, `build`
132- `.env` — Environment variables for network, API key, and publisher account
133
134### Contract-Only Template
135
136- `contract/` — Move smart contract with `Move.toml` and starter module
137- `package.json` — Scripts for `move:compile`, `move:test`, `move:publish`
138- `.env` — Environment variables for network and publisher account
139
140---
141
142## Troubleshooting
143
144### `npx create-aptos-dapp` command not found
145
146```bash
147# Auto-confirm the npx package install prompt
148npx --yes create-aptos-dapp <project-name> ...
149```
150
151If that still fails, verify Node.js and npm are installed (`node -v && npm -v`).
152
153### Compile failures after scaffold
154
1551. Check `contract/Move.toml` has correct named addresses
1562. Run `aptos init --network <network> --assume-yes` if not done
1573. Verify `my_addr` is set to `"_"` in `[addresses]` section
158
159### Named address errors
160
161The boilerplate uses `my_addr = "_"` which gets resolved from `.env` at compile time. Ensure
162`VITE_MODULE_PUBLISHER_ACCOUNT_ADDRESS` is set in `.env` (populated by `aptos init`).