init-dapp

A command that creates a new Sui dApp project from an official starter template. A dApp is an application that interacts with a blockchain, such as Sui.

In plain words
What is it for?
Use it to choose a project name, framework, and package manager, then scaffold a React, Next.js, or Vue Sui app.
Why use it?
It avoids setting up the frontend framework, Sui SDK, and wallet connection from an empty folder.

Command

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.

agentmods
npx agentmods add commands/0x-j/sui-stack-claude-code-plugin/init-dapp
Clone the repo
git clone --depth 1 https://github.com/0x-j/sui-stack-claude-code-plugin
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,215 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00017 $0.02215
Opus 5 $0.00009 $0.01107
Sonnet 5 $0.00003 $0.00443
Haiku 4.5 $0.00002 $0.00221

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

Security

Grade A, and why

init-dapp 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 2d 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.

commands/init-dapp.md · 307 lines

How it starts

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

Initialize Sui dApp

Create a new Sui dApp project using the official @mysten/dapp scaffolding tool. This command sets up a complete frontend project with wallet integration, Sui SDK, and your choice of framework.

What This Command Does

  1. Prompts for project configuration (or uses arguments)
  2. Runs npm create @mysten/dapp with selected options
  3. Explains the generated structure
  4. Provides next steps for development

Template Options

The official scaffold supports multiple templates:

  • react-client-dapp - React with Vite (recommended for most dApps)
  • react-e2e-counter - React with Move counter contract example
  • next-client-dapp - Next.js client-side dApp
  • next-server-dapp - Next.js with server actions
  • vue-client-dapp - Vue.js dApp

Instructions

Step 1: Gather Requirements

If arguments not provided, ask user:

  1. Project name - What should the project be called?

    • Use for directory name
    • Default: "my-sui-dapp"
  2. Template choice - Which template to use?

    • Offer options from above
    • Recommend: react-client-dapp (most common, works with Walrus upload relay)
    • Default: react-client-dapp
  3. Package manager - npm, pnpm, or yarn?

    • Default: npm

Step 2: Verify Prerequisites

Check that Node.js is installed:

node --version

Must be v18 or higher. If not installed, inform user to install from https://nodejs.org/

Step 3: Run Scaffold Command

Execute the create command based on gathered info:

npm create @mysten/dapp@latest -- --template [TEMPLATE] [PROJECT_NAME]

Or with pnpm:

pnpm create @mysten/dapp@latest --template [TEMPLATE] [PROJECT_NAME]

Step 4: Explain Generated Structure

After successful creation, explain the project structure:

project-name/
├── src/
│   ├── App.tsx          # Main application component
│   ├── main.tsx         # Entry point with dApp Kit providers
│   └── ...              # Other components
├── package.json         # Dependencies
├── vite.config.ts       # Vite configuration (for React/Vue)
├── next.config.js       # Next.js config (for Next templates)
└── ...

Read the full file on GitHub · 307 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. 2d ago First seen · 307 lines · 17 tokens per session scan A 9bcdb88f8a21

Subscribe to this mod's changes

init-dapp is a command published in the GitHub repository 0x-j/sui-stack-claude-code-plugin (10 stars, last pushed 6mo ago), licensed MIT. It adds 17 tokens to every session and 2,215 once invoked, about $0.0001 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-31.