mvx-project-architecture
Production-grade project structure patterns for MultiversX smart contracts.
Skill by multiversx
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/multiversx-mvx-project-architecture
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/mvx-project-architecture
What's inside
- Skill name
mvx-project-architecture- Description
- Production-grade project structure patterns for MultiversX smart contracts. Use when starting a new contract project, refactoring an existing one, or building multi-contract systems with shared code.
- License
- MIT
- Instructions
- 287 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# MultiversX Project Architecture
Production-tested folder structures and module composition patterns for MultiversX contracts.
## Single Contract Structure
For contracts up to ~1000 lines of business logic:
```
my-contract/
├── Cargo.toml
├── src/
│ ├── lib.rs # #[contract] trait — ONLY trait composition + init/upgrade
│ ├── storage.rs # All #[storage_mapper] definitions
│ ├── views.rs # All #[view] endpoints
│ ├── config.rs # Admin configuration endpoints
│ ├── events.rs # #[event] definitions
│ ├── validation.rs # Input validation helpers
│ ├── errors.rs # Static error constants
│ └── helpers.rs # Pure business logic functions
├── meta/
│ ├── Cargo.toml
│ └── src/main.rs
├── wasm/
│ ├── Cargo.toml
│ └── src/lib.rs
└── tests/
└── integration_test.rs
```
## Multi-Contract Workspace Structure
For protocols with multiple interacting contracts:
```
my-protocol/
├── Cargo.toml # [workspace] members
├── common/ # Shared crate across all contracts
│ ├── Cargo.toml
│ ├── constants/
│ │ ├── Cargo.toml
│ │ └── src/lib.rs # Protocol-wide constants
│ ├── errors/
│ │ ├── Cargo.toml
│ │ └── src/lib.rs # Shared error constants
│ ├── structs/
│ │ ├── Cargo.toml
│ │ └── src/lib.rs # Shared data types
│ ├── math/
│ │ ├── Cargo.toml
│ │ └── src/math.rs # Shared math module trait
│ └── events/
│ ├── Cargo.toml
│ └── src/lib.rs # Shared event definitions
├── contract-a/ # First contract
│ ├── Cargo.toml
│ ├── src/
│ │ ├── lib.rs
│ │ ├── storage/
│ │ │ └── mod.rs # Local + proxy storage
│ │ ├── cache/
│ │ │ └── mod.rs # Drop-based cache
│ │ ├── views.rs
│ │ ├── config.rs
│ │ ├── events.rs
│ │ ├── validation.rs
│ │ └── helpers/
│ │ └── mod.rs
│ ├── meta/
│ ├── wasm/
│ └── tests/
├── contract-b/
│ └── ... # Same structure
└── proxy-definitions/ # Optional: shared proxy traits
├── Cargo.toml
└── src/lib.rs
```
## lib.rs Pattern: Trait Composition Only
The main contract file should ONLY compose modules — no business logic:
```rust
#![no_std]
multiversx_sc::imports!();
pub mod cache;
pub mod config;
pub mod events;
pub mod helpers;
pub mod storage;
pub mod validation;
pub mod views;
#[multiversx_sc::contract]
pub trait MyContract:
storage::StorageModule
+ config::ConfigModule
+ views::ViewsModule
+ events::EventsModule
+ validation::ValidationModule
+ helpers::HelpersModule
+ common_math::SharedMathModule
{
#[init]
fn init(&self, /* params */) {
// Only initialization logic
}
#[upgrade]
fn upgrade(&self) {
// Only upgrade migration logic
}
#[endpoint]
fn main_operation(&self) {
// Delegate to helpers/validation
self.validate_payment(&payment);From multiversx/mx-ai-skills, MIT.
More from multiversx/mx-ai-skills
- 0.544score
mvx-cross-contract-calls
multiversx
Make cross-contract calls in MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-debug-tx
multiversx
Debug and analyze MultiversX transactions.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-property-testing
multiversx
Use property-based testing and fuzzing to find edge cases in smart contract logic.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-deploy-flow
multiversx
Deploy MultiversX smart contracts with pre-flight checks, verification, and post-deployment validation.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-payment-handling
multiversx
Handle payments in MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-audit-onchain
multiversx
Perform a comprehensive on-chain security audit of a deployed MultiversX smart contract.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-blockchain-data
multiversx
Read on-chain state in MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-cache-patterns
multiversx
Gas-optimized cache patterns for MultiversX smart contracts using Drop-based write-back caches.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-clarification-expert
multiversx
Identify ambiguous requirements and ask targeted clarifying questions for MultiversX development.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-test-contract
multiversx
Perform automated on-chain testing of a deployed MultiversX smart contract.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-constant-time
multiversx
Verify cryptographic operations execute in constant time to prevent timing attacks.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-cross-contract-storage
multiversx
Read another contract's storage directly without async calls using storage_mapper_from_address.
SkillCFreshness: C★ 12Claude Code +9
Signals
- Stars
- 12
- Forks
- 4
- Open issues
- 0
- Last commit (this folder)
- Jul 2, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/multiversx/mx-ai-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from multiversx
- 0.544score
mvx-deploy-flow
multiversx
Deploy MultiversX smart contracts with pre-flight checks, verification, and post-deployment validation.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-debug-tx
multiversx
Debug and analyze MultiversX transactions.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-property-testing
multiversx
Use property-based testing and fuzzing to find edge cases in smart contract logic.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-test-contract
multiversx
Perform automated on-chain testing of a deployed MultiversX smart contract.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-payment-handling
multiversx
Handle payments in MultiversX smart contracts.
SkillCFreshness: C★ 12Claude Code +9 - 0.544score
mvx-audit-onchain
multiversx
Perform a comprehensive on-chain security audit of a deployed MultiversX smart contract.
SkillCFreshness: C★ 12Claude Code +9
Cite this page
mvx-project-architecture skill. Agent Mart. https://agentmart.dev/skills/multiversx-mvx-project-architecture (last updated 2026-10-24)