agents/skills/sui/move-safety-core-directives/SKILL.md
Lightweight core directives for Sui Move always-required skills - injected into every breadth agent. Full methodology lives in the dedicated Move-Safety Agent.
npx skillsauth add plamentsv/plamen move-safety-core-directivesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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)
Enumerate ALL structs. For each:
| Module | Struct | Abilities | Has id: UID? | Is Object? | Transferable? | Notes |
|--------|--------|-----------|----------------|------------|---------------|-------|
Flag for depth review:
copy that holds Balance<T> or represents economic value -> [FLAG:ABILITY-COPY-VALUE]drop that represents an obligation (receipt, hot potato) -> [FLAG:ABILITY-DROP-OBLIGATION]key) with store that should restrict transfers -> [FLAG:ABILITY-EXCESS-STORE]copy + key combination (impossible in Sui; compilation error) -> [FLAG:ABILITY-INVALID-COMBO]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:
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:
Coin<T> or Balance<T> without verifying T matches expected type -> [FLAG:TYPE-COIN-CONFUSION]T and a runtime selector/config/index/object (asset id, pool id, position id) without binding them together -> [FLAG:TYPE-CONFIG-MISMATCH]store constraint where key or specific type is needed -> [FLAG:TYPE-WEAK-CONSTRAINT]init() or not consumed -> [FLAG:TYPE-OTW-LEAK]GREP: Search all .move files for destructuring from mutable references and assignments between destructured names:
let Struct { ... } = <expr returning &mut Struct>&mut destructureleft = limit, remaining = cap, field_ref = other_ref instead of *left = *limitFor each candidate:
| Function | Destructured Ref Fields | Assignment | LHS Dereferenced? | RHS Dereferenced? | Intended Field Written? | |----------|-------------------------|------------|-------------------|-------------------|-------------------------|
Flag for depth review:
* on the LHS when the intent is to update the stored field value -> [FLAG:REF-REASSIGN-WRONG-FIELD]Classify every object (key ability) by ownership model:
| Object | Ownership | Created Via | Has store? | Transfer Restricted? | Dynamic Fields? |
|--------|-----------|-------------|-------------|---------------------|-----------------|
Flag for depth review:
public function returns &mut or exposes borrow_mut/dynamic-field mutable access to internal sensitive state without a capability or public(package) restriction -> [FLAG:OBJ-PUBLIC-MUT-REF]store that should NOT be freely transferable -> [FLAG:OBJ-EXCESS-TRANSFER]object::delete without cleaning up dynamic fields -> [FLAG:OBJ-DELETE-DIRTY]Balance<T> field but no withdrawal function -> [FLAG:OBJ-STRANDED-BALANCE]Before completing analysis, verify you produced inventories for ALL 5 sections above. Missing inventories = missing coverage for Move-specific vulnerability classes.
development
Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project documentation checks. Generates a scored Audit Readiness Report and optionally runs static analysis. Trigger on: "prepare for audit", "audit readiness", "pre-audit check", "audit prep", "NatSpec check", or any request to review a Solidity codebase before a security review.
development
Launch the Plamen deterministic Web3 security audit pipeline
development
Run the Plamen smart-contract audit wizard in Codex
testing
Launch the Plamen deterministic L1 infrastructure audit pipeline