type-safety

Audit Sui Move modules for generic type and OTW safety risks.

276|56|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/PlamenTSV/plamen --skill type-safety-plamentsv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-safety
Source: https://github.com/PlamenTSV/plamen/tree/main/agents/skills/sui/type-safety
Command: npx skills add https://github.com/PlamenTSV/plamen --skill type-safety-plamentsv

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the risk of unsafe generic type usage in Sui Move modules by providing a structured analysis workflow that identifies misused type parameters, phantom type misuse, and One-Time Witness (OTW) handling weaknesses during module initialization and currency-related logic.

Core Features & Use Cases

  • Generic function inventory across modules to surface all type parameters.
  • Constraint analysis to detect under- or over-constrained type parameters and their practical implications.
  • Phantom type correctness checks to ensure phantom params do not affect runtime behavior.
  • Witness pattern audit and OTW verification to prevent forgery or misuse of one-time authorities.
  • Coin/Balance type safety review to maintain strict type distinctions and accounting integrity.

Quick Start

Review the Sui Move modules for type-parameter misuse and OTW handling to begin a safety assessment.

Frequently Asked Questions about type-safety

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

FAQPage Schema
How do I audit Sui Move modules for generic type parameter misuse?

To audit Sui Move modules for generic type parameter misuse, inventory all generic functions and analyze their constraints to detect under- or over-constrained type parameters that could lead to runtime vulnerabilities.

What is the One-Time Witness pattern in Sui Move and how do I verify it?

The One-Time Witness (OTW) pattern in Sui Move prevents the forgery of one-time authorities during module initialization. You verify it by auditing witness architectures and OTW handling to ensure no misuse occurs in currency-related logic.

How do I check phantom type correctness in Sui Move?

To check phantom type correctness in Sui Move, you review phantom parameters to ensure they do not affect runtime behavior. This prevents phantom type misuse which can compromise the strict type distinctions required for module safety.

Does this type safety review cover Coin and Balance integrity in Sui Move?

Yes, this type safety review covers Coin and Balance integrity in Sui Move. It performs a strict type safety review to maintain type distinctions and accounting integrity for all currency-related logic within your modules.

What are the limitations of using a structured audit workflow for Sui Move security?

The structured audit workflow for Sui Move security focuses exclusively on type-parameter abuse, phantom misuse, and insecure OTW handling. It does not cover unrelated smart contract vulnerabilities outside of generic type usage and module visibility.