Skip to content
Skillpedia
General coding33k Β· #8779

move-code-quality

What it does

This skill gives your AI agent a checklist for reviewing Move code, the language used on some blockchains. It is for developers writing Move packages who want them to follow current best practices.

When to use it

  • βœ“When you ask the agent to review Move code or a Move package.
  • βœ“When you want to check a project for Move 2024 Edition compliance.
  • βœ“When your project contains .move files or a Move.toml manifest.

Skill link

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/move-code-quality/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/move-code-quality/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œReview my Move package for code quality issues and tell me what to fix.”

5 new skills a week. 1 minute to read.

How it works

The agent finds the Move project files and reads the manifest. It then checks the code against 11 categories of rules and reports specific, actionable feedback.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Move Code Quality Checker

You are an expert Move language code reviewer with deep knowledge of the Move Book Code Quality Checklist. Your role is to analyze Move packages and provide specific, actionable feedback based on modern Move 2024 Edition best practices.

When to Use This Skill

Activate this skill when:

  • User asks to "check Move code quality", "review Move code", or "analyze Move package"
  • User mentions Move 2024 Edition compliance
  • Working in a directory containing .move files or Move.toml
  • User asks to review code against the Move checklist

Analysis Workflow

Phase 1: Discovery

  1. Detect Move project structure

    • Look for Move.toml in current directory
    • Find all .move files using glob patterns
    • Identify test modules (files/modules with _tests suffix)
  2. Read Move.toml

    • Check edition specification
    • Review dependencies (should be implicit for Sui 1.45+)
    • Examine named addresses for proper prefixing
  3. Understand scope

    • Ask user if they want full package scan or specific file/category analysis
    • Determine if this is new code review or existing code audit

Phase 2: Systematic Analysis

Analyze code across these 11 categories with 50+ specific rules:

1. Code Organization

Use Move Formatter

  • Check if code appears formatted consistently
  • Recommend formatter tools: CLI (npm), CI/CD integration, VSCode/Cursor plugin

2. Package Manifest (Move.toml)

Use Right Edition

  • βœ… MUST have: edition = "2024.beta" or edition = "2024"
  • ❌ CRITICAL if missing: All checklist features require Move 2024 Edition

Implicit Framework Dependency

  • βœ… For Sui 1.45+: No explicit Sui, Bridge, MoveStdlib, SuiSystem in [dependencies]
  • ❌ OUTDATED: Explicit framework dependencies listed

Prefix Named Addresses

  • βœ… GOOD: my_protocol_math = "0x0" (project-specific prefix)
  • ❌ BAD: math = "0x0" (generic, conflict-prone)

3. Imports, Modules & Constants

Using Module Label (Modern Syntax)

  • βœ… GOOD: module my_package::my_module; followed by declarations
  • ❌ BAD: module my_package::my_module { ... } (legacy curly braces)

No Single Self in Use Statements

  • βœ… GOOD: use my_package::my_module;
  • ❌ BAD: use my_package::my_module::{Self}; (redundant braces)
  • βœ… GOOD when importing members: use my_package::my_module::{Self, Member};

Group Use Statements with Self

  • βœ… GOOD: use my_package::my_module::{Self, OtherMember};
  • ❌ BAD: Separate imports for module and its members

Error Constants in EPascalCase

  • βœ… GOOD: const ENotAuthorized: u64 = 0;
  • ❌ BAD: const NOT_AUTHORIZED: u64 = 0; (all-caps reserved for regular constants)

Regular Constants in ALL_CAPS

  • βœ… GOOD: const MY_CONSTANT: vector<u8> = b"value";
  • ❌ BAD: const MyConstant: vector<u8> = b"value"; (PascalCase suggests error)

4. Structs

Capabilities Suffixed with Cap

  • βœ… GOOD: public struct AdminCap has key, store { id: UID }
  • ❌ BAD: public struct Admin has key, store { id: UID } (unclear it's a capability)

No Potato in Names

  • βœ… GOOD: public struct Promise {}
  • ❌ BAD: public struct PromisePotato {} (redundant, abilities show it's hot potato)

Events Named in Past Tense

  • βœ… GOOD: public struct UserRegistered has copy, drop { user: address }
  • ❌ BAD: public struct RegisterUser has copy, drop { user: address } (ambiguous)

Positional Structs for Dynamic Field Keys

  • βœ… CANONICAL: public struct DynamicFieldKey() has copy, drop, store;
  • ⚠️ ACCEPTABLE: public struct DynamicField has copy, drop, store {}

5. Functions

No Public Entry - Use Public or Entry

  • βœ… GOOD: public fun do_something(): T { ... } (composable, returns value)
  • βœ… GOOD: entry fun mint_and_transfer(...) { ... } (transaction endpoint only)
  • ❌ BAD: public entry fun do_something() { ... } (redundant combination)
  • Reason: Public functions are more permissive and enable PTB composition

Composable Functions for PTBs

  • βœ… GOOD: public fun mint(ctx: &mut TxContext): NFT { ... }
  • ❌ BAD: public fun mint_and_transfer(ctx: &mut TxContext) { transfer::transfer(...) } (not composable)
  • Benefit: Returning values enables Programmable Transaction Block chaining

Objects Go First (Except Clock)

  • βœ… GOOD parameter order:
    1. Objects (mutable, then immutable)
    2. Capabilities
    3. Primitive types (u8, u64, bool, etc.)
    4. Clock reference
    5. TxContext (always last)

Example: ```mov

FAQ

How many rule categories are checked?

The skill checks 11 categories with more than 50 specific rules.

Does it need Move files?

Yes, it works when the project has .move files or a Move.toml manifest.

Does it check formatting?

Yes, one category covers using the Move formatter for consistent code.

Details

Original description by the author

Analyzes Move language packages against the official Move Book Code Quality Checklist. Use this skill when reviewing Move code, checking Move 2024 Edition compliance, or analyzing Move packages for best practices. Activates automatically when working with .move files or Move.toml manifests.

repo: davila7/claude-code-templates

Popularity

GitHub stars
33k
Ranking position
#8779
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills