naming-conventions

Enforce Sui Move naming conventions for constants, events, getters, and types.

10|5|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/MystenLabs/skills --skill naming-conventions-mystenlabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: naming-conventions
Source: https://github.com/MystenLabs/skills/tree/main/naming-conventions
Command: npx skills add https://github.com/MystenLabs/skills --skill naming-conventions-mystenlabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Prevents incorrect or inconsistent naming in Sui Move smart contracts so code review, tooling, and collaboration stay aligned with the official code-quality checklist.

Core Features & Use Cases

  • Error constants: Enforces EPascalCase for #[error] constants and clarifies message typing for abort output.
  • Constant conventions: Separates regular constants (ALL_CAPS) from error constants to avoid style drift.
  • Type and API naming: Standardizes capability structs (Cap suffix), event naming (past tense), getter naming (field name, not get_, plus _mut), hot-potato naming, and dynamic field key types (Key suffix with positional struct syntax).

Quick Start

Use the naming-conventions skill to review your Move module and rewrite identifiers to match Sui’s required naming patterns for structs, events, constants, getters, capabilities, and dynamic field keys.

Frequently Asked Questions about naming-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What naming conventions should I use for Sui Move smart contracts?

Sui Move smart contracts require EPascalCase for error constants, ALL_CAPS for regular constants, Cap suffix for capabilities, past-tense event names, and field-based getters with optional _mut suffix to maintain code quality.

How do I name error constants and regular constants in Move?

Error constants in Move must use EPascalCase with an optional #[error] attribute, while regular constants must use ALL_CAPS to separate them and prevent style drift during code review.

What is the correct way to name getter functions in Sui Move?

Getter functions in Sui Move must be named after the field itself, avoiding the get_ prefix, and append _mut for mutable field access to ensure API design consistency.

How should I name dynamic field key structs and capability types?

Dynamic field key structs require a Key suffix with positional struct syntax, and capability types must end with a Cap suffix to standardize type and API naming conventions.

When do I need past-tense event names in Move modules?

Event names in Move modules must always use past tense to standardize event naming and align with the official Sui code-quality checklist for readability and maintainability.

Does Sui Move support hot potato types and how are they named?

Sui Move supports hot potato types, and they must follow specific naming conventions alongside other struct rules to ensure correct API design and adherence to the code quality checklist.