Move safety core directives

From PlamenTSV/plamen · View interactive version

Move safety core directives is an AI agent skill from the GitHub repository PlamenTSV/plamen. Lightweight core directives for Sui Move always-required skills - injected into every breadth agent. Full methodology lives in the dedicated Move-Safety Agent.

How to use this skill

Skill file

Move Safety Core Directives (Sui)

Purpose: These are the INVENTORY + FLAG directives extracted from the 4 always-required Sui skills (ABILITY_ANALYSIS, BIT_SHIFT_SAFETY, TYPE_SAFETY, OBJECT_OWNERSHIP). Every breadth agent receives these to flag Move-specific patterns for depth review. The full trace methodology lives in the dedicated Move-Safety Agent (spawned separately).

Total: ~155 lines (vs ~900 lines for 4 full skills)

1. Ability Inventory (from ABILITY_ANALYSIS)

Enumerate ALL structs. For each:

| Module | Struct | Abilities | Has id: UID? | Is Object? | Transferable? | Notes |

|--------|--------|-----------|----------------|------------|---------------|-------|

Flag for depth review:

2. Bit Shift Inventory (from BIT_SHIFT_SAFETY)

GREP: Search all .move files for << and >>.

For each shift operation:

| Location | Operand Type | Bit Width | Shift Amount Source | User-Controllable? | Bounded? |

|----------|-------------|-----------|--------------------|--------------------|----------|

Flag for depth review:

3. Generic Type Inventory (from TYPE_SAFETY)

GREP: Search all .move files for fun .*< to find every generic function.

For each generic function:

| Function | Module | Type Params | Constraints | Entry? | Creates/Destroys T? |

|----------|--------|-------------|-------------|--------|---------------------|

Flag for depth review:

4. Move Reference Assignment Inventory

GREP: Search all .move files for destructuring from mutable references and assignments between destructured names:

For each candidate:

| Function | Destructured Ref Fields | Assignment | LHS Dereferenced? | RHS Dereferenced? | Intended Field Written? |

|----------|-------------------------|------------|-------------------|-------------------|-------------------------|

Flag for depth review:

5. Object Ownership Inventory (from OBJECT_OWNERSHIP)

Classify every object (key ability) by ownership model:

| Object | Ownership | Created Via | Has store? | Transfer Restricted? | Dynamic Fields? |

|--------|-----------|-------------|-------------|---------------------|-----------------|

Flag for depth review:

Self-Check

Before completing analysis, verify you produced inventories for ALL 5 sections above. Missing inventories = missing coverage for Move-specific vulnerability classes.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.