sui-architect

Use when planning SUI Move architecture, generating technical specs, or designing object/module structure before writing code. Triggers on "design", "architect", "plan the contracts", "object model", "module structure", "how should I structure", or any SUI system design task. For new projects from scratch, use sui-full-stack (which calls this skill at Phase 1). For ecosystem tool/stack selection (Walrus vs IPFS, zkLogin vs Passkey), use sui-tools-guide.

Best use case

sui-architect is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when planning SUI Move architecture, generating technical specs, or designing object/module structure before writing code. Triggers on "design", "architect", "plan the contracts", "object model", "module structure", "how should I structure", or any SUI system design task. For new projects from scratch, use sui-full-stack (which calls this skill at Phase 1). For ecosystem tool/stack selection (Walrus vs IPFS, zkLogin vs Passkey), use sui-tools-guide.

Teams using sui-architect should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/sui-architect/SKILL.md --create-dirs "https://raw.githubusercontent.com/first-mover-tw/sui-dev-agents/main/skills/sui-architect/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/sui-architect/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How sui-architect Compares

Feature / Agentsui-architectStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when planning SUI Move architecture, generating technical specs, or designing object/module structure before writing code. Triggers on "design", "architect", "plan the contracts", "object model", "module structure", "how should I structure", or any SUI system design task. For new projects from scratch, use sui-full-stack (which calls this skill at Phase 1). For ecosystem tool/stack selection (Walrus vs IPFS, zkLogin vs Passkey), use sui-tools-guide.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# SUI Architect

**Transform ideas into complete SUI Move project architectures and specifications.**

## Overview

This skill guides you from a rough idea to a complete, well-documented architecture through:
- Guided questioning (one question at a time)
- Project type templates (DeFi, NFT, GameFi, DAO, etc.)
- Best practice references from similar projects
- SUI ecosystem tool integration suggestions
- Comprehensive specification document generation

## Quick Start

```bash
# Start architecture planning
sui-architect

# Or called by main orchestrator
sui-full-stack  # → Phase 1: Architecture
```

## SUI Protocol 125 Architecture Considerations (mainnet v1.72.3+, testnet v1.73.0)

When designing architectures, account for these recent platform changes:

- **Protocol Version 125** (mainnet v1.72.3+, testnet v1.73.0, June 2026)
- **Data Access:** gRPC (GA, primary), GraphQL (beta, frontend/indexer), JSON-RPC (**deprecated**, Quorum Driver disabled, permanent deactivation 2026-07-31)
- **Address Balances (Mainnet, P125):** Native address-held balances for supported coin types — PTBs can debit/credit them directly without manual coin select/split/merge. Additive, not a replacement: flows that take `Coin<T>` still need coin objects.
- **Gasless Stablecoin Transfers (Mainnet, P125, rolling out):** Accumulator + coin reservations let users move USDC etc. without holding SUI for gas.
- **Display V2 (Activated):** Display Registry (`0xd`) live on all networks — prioritized over legacy Display v1. Plan new projects around Display V2.
- **Address Aliases (Mainnet):** Human-readable address mappings now live on mainnet.
- **Adaptive Concurrency:** Indexing framework auto-scales workers; `Processor::FANOUT` removed → use `ConcurrencyConfig`.
- **Balance API Split:** `coinBalance` (fungible coins only) and `addressBalance` (all balance types)
- **TxContext Flexible Positioning:** Entry functions no longer require `TxContext` as the last parameter.
- **poseidon_bn254:** Available on all networks for zero-knowledge proof applications.
- **Entry Function Changes:** Signature check disabled; non-public entry functions cannot have hot-potato-entangled arguments.
- **DeepBook Explicit Dependency:** Since v1.47, DeepBook must be added explicitly to `Move.toml`.
- **SDK Naming:** `@mysten/sui` (not `@mysten/sui.js`), `Transaction` (not `TransactionBlock`)

## Core Workflow

### Phase 1: Project Type Identification

Ask user about their project type:
```
What type of project are you building?
  A) DeFi (AMM, Lending, Staking, Derivatives)
  B) NFT (Marketplace, Gaming, Collectibles)
  C) GameFi (On-chain game logic, Asset management)
  D) DAO (Governance, Treasury, Voting)
  E) Infrastructure (Oracle, Bridge, Identity)
  F) Custom (Mixed or innovative type)
```

Then narrow down to specific sub-type based on selection.

### Phase 2: Template Selection

Based on project type, load starter template with:
- Module structure
- Common objects/capabilities
- Recommended SUI tools

Available templates: `nft-marketplace`, `defi-amm`, `gamefi`, `dao`, `infrastructure`

See [templates/](templates/) for all available templates.

### Phase 3: Requirements Exploration

Ask questions one at a time to refine architecture:
- User roles and permissions
- Core features needed
- NFT/token standards (if applicable)
- Payment methods
- Storage strategy (on-chain, Walrus, IPFS)
- Data access pattern (gRPC for current state, GraphQL for frontend queries, custom indexer for historical analytics/aggregation — see `sui-indexer`)
- Upgradeability requirements
- Emergency controls

**Important:** Ask ONE question at a time, wait for answer, then proceed.

### Phase 4: Ecosystem Tool Integration

Suggest relevant SUI tools based on requirements:
- Storage needed → `sui-walrus`
- Authentication → `sui-zklogin` or `sui-passkey`
- NFT trading → `sui-kiosk`
- DEX integration → `sui-deepbook`
- Name service → `sui-suins`
- Cross-chain → `sui-nautilus`
- Custom data pipeline / historical analytics → `sui-indexer`

Query latest integration patterns:
```typescript
// @check:skip
const info = await sui_docs_query({
  type: "docs",
  target: "kiosk",
  query: "Transfer policy implementation"
});
```

### Phase 5: Best Practice References

Query similar projects for patterns:
```typescript
// @check:skip
const references = await sui_docs_query({
  type: "github",
  target: "sui-core",
  query: "NFT marketplace example Kiosk",
  options: {
    include_examples: true
  }
});
```

### Phase 6: Architecture Design Presentation

Present design in small sections (200-300 words each):
1. System Overview
2. Module Architecture
3. Data Structures
4. Core Functions
5. Permission System (Capabilities)
6. Event System
7. Error Handling
8. Security Considerations
9. Tool Integration Plan
10. Data Layer (gRPC vs GraphQL vs Custom Indexer — see decision table in `sui-indexer`)
11. Testing Strategy
12. Deployment Plan
13. Gas Optimization

**After each section, ask:** "Does this look good?"

Wait for confirmation before proceeding to next section.

### Phase 7: Specification Document Generation

Generate comprehensive spec at:
```
docs/specs/YYYY-MM-DD-[project-name]-spec.md
docs/architecture/module-dependency.mmd
docs/architecture/data-flow.mmd
docs/security/threat-model.md
README.md
```

See [examples.md](references/examples.md) for complete specification template.

## Output Files

**Main spec:** `docs/specs/YYYY-MM-DD-project-spec.md`

Contains:
- Executive Summary
- Architecture Overview (with diagrams)
- Module Design
- Data Models
- API Specification
- Security Considerations
- Integration Guide (SUI tools)
- Testing Strategy
- Deployment Plan
- Appendix (references, versions)

**Additional files:**
- `docs/architecture/overview.md` - High-level architecture
- `docs/architecture/module-dependency.mmd` - Mermaid dependency diagram
- `docs/architecture/data-flow.mmd` - Data flow diagram
- `docs/security/threat-model.md` - Threat analysis
- `README.md` - Project overview

## Configuration

`.sui-architect.json`:
```json
{
  "output_dir": "docs/specs",
  "templates": {
    "use_builtin": true,
    "custom_path": null
  },
  "validation": {
    "check_similar_projects": true,
    "query_latest_docs": true,
    "max_questions": 20
  },
  "docs": {
    "generate_mermaid": true,
    "generate_api_docs": true,
    "include_security_analysis": true
  }
}
```

**Configuration options:**
- `output_dir` - Where to save spec documents
- `use_builtin` - Use built-in templates (true) or custom
- `check_similar_projects` - Query GitHub for similar implementations
- `query_latest_docs` - Get latest SUI tool documentation
- `max_questions` - Maximum questions to ask (prevents over-questioning)
- `generate_mermaid` - Generate Mermaid diagrams
- `include_security_analysis` - Include security threat model

## Integration

### Called By
- `sui-full-stack` (Phase 1: Architecture planning)

### Calls
- `sui-docs-query` - Query latest SUI tool documentation and GitHub examples

### Next Step
After architecture complete, suggest:
```typescript
console.log("✅ Architecture and specification complete!")
console.log("Next: Ready to start development with sui-developer?")
```

## Best Practices

### Question Design

**Good questions:**
- "What types of listings do you want?" (specific, actionable)
- "How should royalties work?" (clear options)

**Avoid:**
- "Tell me everything about your project" (too broad)
- "Do you want features?" (vague)

### Progressive Disclosure

1. Start broad (project type)
2. Narrow down (specific features)
3. Deep dive (implementation details)

### Validation Points

After each section, check understanding:
- "Does this match your vision?"
- "Need to adjust anything?"

Don't proceed until user confirms.

## Common Mistakes

❌ **Asking too many questions at once**
- **Problem:** User overwhelmed, provides vague answers
- **Fix:** Ask ONE question at a time, wait for answer before proceeding

❌ **Not validating each section before proceeding**
- **Problem:** Architecture doesn't match user's vision, wasted rework
- **Fix:** After each section (Overview, Modules, etc.), ask "Does this look good?"

❌ **Skipping ecosystem tool integration suggestions**
- **Problem:** User reinvents features already available (Walrus, Kiosk, zkLogin)
- **Fix:** Always query and suggest relevant SUI tools during Phase 4

❌ **Generic template without customization**
- **Problem:** Spec doesn't reflect project's unique requirements
- **Fix:** Use template as starting point, customize based on Q&A responses

❌ **Missing security considerations section**
- **Problem:** Security vulnerabilities discovered late in development
- **Fix:** Always include threat model and security analysis in spec

❌ **Not checking similar projects on GitHub**
- **Problem:** Missed proven patterns, reinventing the wheel
- **Fix:** Query GitHub for similar implementations, reference best practices

❌ **Proceeding without clear project type**
- **Problem:** Wrong template selected, misaligned architecture
- **Fix:** Phase 1 must complete successfully before Phase 2 template selection

## See Also

- [reference.md](references/reference.md) - Template library, security considerations, advanced configuration
- [examples.md](references/examples.md) - Complete Q&A walkthrough, full specification example
- [templates/](templates/) - All project templates (NFT, DeFi, GameFi, DAO)
- [../sui-developer/references/object-model.md](../sui-developer/references/object-model.md) — Read when choosing object ownership for parallel execution (owned/derived parallelize; shared by `&` parallelizes, by `&mut`/value serializes) or derived vs dynamic-field storage

---

**Transform fuzzy ideas into crystal-clear, implementable architectures!**

Related Skills

sui-zklogin

7
from first-mover-tw/sui-dev-agents

Use when implementing zkLogin on SUI — OAuth login (Google, Facebook, Apple, Twitch) with zero-knowledge proofs for privacy-preserving authentication. Triggers on "zkLogin", "social login on SUI", "Google login", "OAuth", "ephemeral keypair", "JWT proof", or any authentication flow that derives a SUI address from an OAuth provider. Also use when the user mentions "login without wallet extension".

sui-walrus

7
from first-mover-tw/sui-dev-agents

Use when storing or retrieving files using Walrus — SUI's decentralized blob storage. Triggers on "Walrus", "blob storage", "upload file to chain", "decentralized storage", "store NFT image", "IPFS alternative on SUI", "where to store NFT metadata", "host a site on-chain", or any off-chain data storage needs on SUI. Also use for Walrus Sites (decentralized web hosting), storing game assets, media files, or when the user asks "where do I put large files on SUI".

sui-wallet

7
from first-mover-tw/sui-dev-agents

Use when performing on-chain transactions (transfer, Move call, publish) through the agent's CLI wallet via MCP tools. Triggers on "transfer SUI", "call Move function", "publish package", "wallet status", "sign transaction", or any agent-driven on-chain operation. This is for headless/backend wallet operations — for browser wallet UI (React/Vue), use sui-frontend instead.

sui-tester

7
from first-mover-tw/sui-dev-agents

Use when writing Move tests, setting up test suites, running gas benchmarks, or planning test strategy for SUI contracts. Triggers on "write tests", "test this module", "#[test]", "test coverage", "gas benchmark", "property-based test", or any Move testing task. Use even for simple "how do I test this function" questions.

sui-suins

7
from first-mover-tw/sui-dev-agents

Use when integrating SuiNS (SUI Name Service) — resolving .sui names to addresses, reverse lookups, or registering names. Triggers on "SuiNS", ".sui name", "name resolution", "reverse lookup", "human-readable address", or any name service integration. Also use when the user wants to display user-friendly names instead of hex addresses.

sui-security-guard

7
from first-mover-tw/sui-dev-agents

Use when setting up security scanning, detecting leaked secrets/API keys, implementing pre-commit hooks, or auditing a Sui Move contract for security/architecture/quality issues. Triggers on "security scan", "detect secrets", "pre-commit hook", "security audit setup", "API key leaked", and on contract-level review requests like "audit this contract", "review access control", "is this Move safe", "check for vulnerabilities", "Move security review" — these load the SEC/DES/PAT/TST/QA/CFG finding registry in references/move-security-findings.md. For offensive/adversarial testing (attack vector discovery, writing exploits/PoCs), use sui-red-team instead. For Move style/idiom quality (non-security), use move-code-quality.

sui-seal

7
from first-mover-tw/sui-dev-agents

Use when implementing data encryption, access control, or secrets management on SUI using the Seal protocol. Triggers on threshold encryption, data privacy, token-gated content, encrypted storage, decryption policies, paywall, gated access, encrypted NFT metadata, private data sharing, or any scenario requiring on-chain access control for off-chain data. Also use when the user mentions Seal, pay-to-decrypt, "only NFT holders can see", or subscriber-only content on SUI.

sui-red-team

7
from first-mover-tw/sui-dev-agents

Use when performing adversarial security testing on SUI Move contracts — generating attack tests for access control bypass, integer overflow, object manipulation, economic exploits, reentrancy, and DoS vectors. Triggers on "red team", "attack test", "find vulnerabilities", "exploit", "pentest", "security test", or when the user wants to stress-test their contract's security. For defensive security setup (scanning, hooks, checklists), use sui-security-guard instead.

sui-passkey

7
from first-mover-tw/sui-dev-agents

Use when implementing WebAuthn passkeys or biometric authentication (Face ID, fingerprint, hardware keys) on SUI. Triggers on "passkey", "WebAuthn", "biometric login", "Face ID", "fingerprint auth", "FIDO2", or passwordless auth that uses device authenticators instead of seed phrases. Different from zkLogin (which uses OAuth providers).

sui-nautilus

7
from first-mover-tw/sui-dev-agents

Use when building verifiable off-chain computation, integrating external APIs with on-chain proof, or running trusted execution environments on SUI. Triggers on Nautilus, off-chain oracle, "verify API data on-chain", "connect external API to Move", "prove off-chain result", trusted compute, AWS Nitro Enclave, attestation, price feed, weather data on-chain, or any scenario requiring cryptographically verified external data. Also use when the user asks "how do I get real-world data into my SUI contract" or needs an oracle-like pattern.

sui-kiosk

7
from first-mover-tw/sui-dev-agents

Use when building NFT marketplaces, enforcing royalties, or managing transfer policies using SUI's Kiosk standard. Triggers on "Kiosk", "NFT marketplace", "transfer policy", "royalty enforcement", "list NFT for sale", "purchase rules", or any NFT commerce on SUI. Also use when the user asks about listing, delisting, or trading NFTs with enforced rules.

sui-install

7
from first-mover-tw/sui-dev-agents

Use when installing or updating the Sui CLI, managing CLI versions with suiup, or resolving environment/setup problems — "install sui", "update sui", "command not found", "sui not found", "client/server api version mismatch", build errors about "old dependencies", switching CLI versions per network, or installing toolchain components (Walrus, MVR, Move Analyzer, site-builder). Also use for first-time client setup, getting faucet tokens, recovering keys from a phrase, or "Cannot find gas coin for signer address". For deploying/upgrading packages use sui-deployer; for on-chain data queries use sui-ts-sdk.