naming-conventions
Skill20 starsChanged 15 days agoApache-2.0View on GitHub
Use when writing or reviewing Move smart contracts on Sui. Applies to naming structs, error constants, regular constants, events, getter functions, capability types, hot potato types, and dynamic field keys. Use whenever creating new types, functions, or constants in Move code.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- gaia-react/gaiatheir own version, first seen Nov 8, 2026
- gaia-harness/gaiatheir own version, first seen Nov 1, 2026
- murongg/skillstheir own version, first seen Oct 20, 2026
- ChrisAraneo/skillstheir own version, first seen Oct 18, 2026
- Mushfiqur-Rahman-Robin/coding-rulestheir own version, first seen Oct 13, 2026
- 1pedroosilva/databricks-genie-skillstheir own version, first seen Oct 2, 2026
Used with
Projects with it also use tdd.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- zakariaf/Flutter-Skills★ 32same name
- gaia-harness/gaia★ 26same name
- gaia-react/gaia★ 26same name
- wolf5996/agentic-skills★ 10same name
- murongg/skills★ 1same name
- 1pedroosilva/databricks-genie-skills★ 0same name
- abhinaykrupa/claude-skills★ 0same name
- ChrisAraneo/skills★ 0same name
- geril07/skills★ 0same name
- Mushfiqur-Rahman-Robin/coding-rules★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- accessing-dataSkill
- composable-move-functionsSkill
- deepbook-marginSkill
- deepbook-moveSkill
- deepbook-overviewSkill
- deepbook-predictSkill
- deepbook-sdkSkill
- frontend-appsSkill
- generate-sui-agent-configSkill
- kioskSkill
- modern-move-syntaxSkill
- move-securitySkill
- move-unit-testingSkill
- sui-object-modelSkill
- onchain-randomnessSkill
- ptbsSkill
- sui-bridgeSkill
- sui-buildSkill
- sui-clientSkill
- sui-for-ethereumSkill
- sui-installSkill
- sui-move-projectSkill
- sui-moveSkill
- sui-networks-gasSkill
- sui-overviewSkill
- sui-publishSkill
- sui-sdksSkill
- sui-ts-sdk-backendSkill
- walrus-sitesSkill
- zkloginSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
All patterns sourced from https://move-book.com/guides/code-quality-checklist
- Very specific: line 20
Use the #[error] attribute to attach human-readable messages to error constants.
- Very specific: line 38
When using #[error], the constant type is vector<u8> (a byte string message) instead of u64.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
naming-conventions
MCP tool: When available in your environment, also query the Sui documentation MCP server (
https://sui.mcp.kapa.ai) for up-to-date answers. Use it for verification and for details not covered by these reference files.
Overview
Move on Sui has specific naming conventions that differ from what AI agents typically generate from training data. This skill covers every naming pattern from the official code quality checklist.
All patterns sourced from https://move-book.com/guides/code-quality-checklist
Error Constants: EPascalCase with #[error]
Error constants MUST use PascalCase with an E prefix. Do NOT use SCREAMING_SNAKE_CASE.
Use the #[error] attribute to attach human-readable messages to error constants. When an abort occurs, the message is included in the error output, making debugging much easier for users and support.
// WRONG
const NOT_AUTHORIZED: u64 = 0;
const INSUFFICIENT_BALANCE: u64 = 1;
// CORRECT — with #[error] for readable abort messages
#[error]
const ENotAuthorized: vector<u8> = b"Caller is not authorized to perform this action";
#[error]
const EInsufficientBalance: vector<u8> = b"Insufficient balance for this operation";
// Also valid — u64 without #[error] (less informative on abort)
const ENotAuthorized: u64 = 0;
const EInsufficientBalance: u64 = 1;When using #[error], the constant type is vector<u8> (a byte string message) instead of u64. The compiler assigns numeric codes automatically. Prefer #[error] for all new code — it produces clearer error output in explorers, wallets, and logs.
Regular Constants: ALL_CAPS
Non-error constants use uppercase snake_case. This is the opposite of error constants.
// WRONG
const MyConstant: vector<u8> = b"hello";
const feeNumerator: u64 = 3;
// CORRECT
const MY_CONSTANT: vector<u8> = b"hello";
const FEE_NUMERATOR: u64 = 3;Capability Structs: Cap Suffix
Any struct that represents a capability (authorization to perform actions) MUST be suffixed with Cap.
// WRONG
public struct Admin has key, store { id: UID }
public struct MintAuthority has key, store { id: UID }
// CORRECT
public struct AdminCap has key, store { id: UID }
public struct MintCap has key, store { id: UID }Events: Past Tense
Event struct names MUST use past tense to indicate something that already happened.
// WRONG
public struct RegisterUser has copy, drop { user: address }
public struct CreatePool has copy, drop { pool_id: ID }
public struct LevelUp has copy, drop { new_level: u64 }
// CORRECT
public struct UserRegistered has copy, drop { user: address }
public struct PoolCreated has copy, drop { pool_id: ID }
public struct LeveledUp has copy, drop { new_level: u64 }Getter Functions: Field Name, Not get_
Getter functions should be named after the field they return, without a get_ prefix. Mutable getters add _mut suffix.
// WRONG
public fun get_name(u: &User): String { u.name }
public fun get_balance(u: &User): u64 { u.balance }
// CORRECT
public fun name(u: &User): String { u.name }
public fun balance(u: &User): u64 { u.balance }
public fun details_mut(u: &mut User): &mut Details { &mut u.details }Hot Potato Structs: No Potato in Name
Hot potato types (structs with no abilities) should NOT include "Potato" in the name. The absence of abilities already signals the pattern.
// WRONG
public struct FlashLoanPotato {}
public struct PromisePotato {}
// CORRECT
public struct FlashLoanReceipt {}
public struct Promise {}Dynamic Field Keys: Positional Struct with Key Suffix
Dynamic field key types should use positional struct syntax (empty parentheses) with a Key suffix.
// WRONG
public struct DynamicField has copy, drop, store {}
public struct ItemSlot has copy, drop, store { name: String }
// CORRECT
public struct DynamicFieldKey() has copy, drop, store;
public struct ItemKey(String) has copy, drop, store;Quick Reference
| Element | Convention | Example |
| Error constants | E + PascalCase | ENotAuthorized |
| Regular constants | ALL_CAPS | FEE_NUMERATOR |
| Capabilities | Suffix with Cap | AdminCap |
| Events | Past tense | PoolCreated |
| Getters | Field name, no get_ | balance() |
| Mutable getters | Field name + _mut | balance_mut() |
| Hot potatoes | Descriptive, no Potato | FlashLoanReceipt |
| Dynamic field keys | Positional + Key suffix | ItemKey() |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

