ptbs

Compose and debug Sui Programmable Transaction Blocks using TypeScript SDK and CLI workflows.

10|5|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/MystenLabs/skills --skill ptbs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ptbs
Source: https://github.com/MystenLabs/skills/tree/main/ptbs
Command: npx skills add https://github.com/MystenLabs/skills --skill ptbs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps you write, verify, and troubleshoot Sui Programmable Transaction Blocks (PTBs) so multiple on-chain actions run atomically with correct input/argument wiring and gas handling.

Core Features & Use Cases

  • PTB construction guidance: routes you to the right reference for PTB fundamentals, the TypeScript Transaction API, or CLI sui client ptb workflows.
  • Correctness-by-design for composition: explains how inputs, command arguments, and result chaining work so you avoid common PTB shape and borrow/consumption mistakes.
  • Execution and failure debugging: maps common PTB errors to concrete causes and fixes, including gas/coin issues, shared-object constraints, and UnusedValueWithoutDrop.

Quick Start

Ask your agent to construct a single Sui PTB in TypeScript that chains the needed Move calls, correctly splits gas when required, and includes the right transfers so the PTB succeeds without runtime PTB errors.

Frequently Asked Questions about ptbs

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

FAQPage Schema
How do I compose a Sui Programmable Transaction Block with multiple Move calls in TypeScript?

To compose a Sui Programmable Transaction Block in TypeScript, use the Sui TypeScript SDK Transaction API to chain MoveCall commands, correctly wire arguments, and handle gas coin splitting so multiple actions execute atomically.

What causes the UnusedValueWithoutDrop error in a Sui PTB?

The UnusedValueWithoutDrop error in a Sui PTB occurs when command results are not properly consumed or transferred. Debugging involves mapping PTB execution errors to concrete causes and fixing argument wiring or result chaining.

How do I split gas coins correctly within a Sui programmable transaction?

Splitting gas coins correctly within a Sui programmable transaction requires using the SplitCoins command in the PTB to divide the gas coin before passing the resulting coin objects as arguments to subsequent Move calls.

Can I use the Sui CLI to build and test programmable transaction blocks instead of TypeScript?

Yes, you can use the Sui CLI to build programmable transaction blocks by utilizing the sui client ptb workflows, which support routing to command references for constructing and validating PTBs without TypeScript.

What are the shared-object constraints when building a Sui PTB?

Shared-object constraints in Sui PTBs determine how shared objects are accessed and borrowed during execution. Troubleshooting these constraints ensures correct argument handling and prevents runtime PTB protocol limit violations.

Why does my Sui PTB fail during execution with incorrect argument wiring?

A Sui PTB fails during execution with incorrect argument wiring when inputs and command results are not properly chained. Reviewing PTB command shapes and borrow rules resolves common composition mistakes.