Agent skill · creative production · jeremylongshore
runway-sdk-patterns
Implement a typed Runway SDK boundary that survives timeouts, restarts, throttling, and task failures. Use when consolidating production client behavior. Trigger with: "Runway SDK pattern", "wrap Runway client", "recover Runway task".
Why this skill is useful
Adds specific implementation patterns and error handling for the Runway SDK that the AI wouldn't reliably generate on its own.
What it needs
Requires pip:runwayml installed locally. Requires runway account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Recoverable Runway SDK Client Pattern Overview A production client must separate request acceptance, provider task execution, and output persistence. The SDK removes protocol boilerplate, but the application still owns operation identity, deadlines, cancellation, state recovery, observability, and business decisions. Prerequisites Pinned official Node or Python SDK and reviewed API contract Durable operation and provider-task persistence Injected timeout, retry, logging, and output-storage adapters Instructions Step 1: Create one client factory Construct the SDK once per process from server-side configuration. Expose reviewed timeouts, retry policy, and user agent; do not scatter raw client creation across handlers. Step 2: Define typed commands and results Represent create intent, accepted task ID, provider state, terminal result, and stored asset separately. Prevent callers from treating an accepted create response as output. Step 3: Persist before waiting Write operation ID, normalized request hash, and provider task ID transactionally before calling a wait helper. On restart, retrieve the task and resume rather than creating again. Step 4: Bound waiting Use waitForTaskOutput or waitfortaskoutput with a deadline and cancellation signal. A local abort or timeout stops waiting only; call the task cancellation endpoint when policy requires provider cancellation. Step 5: Classify failures Map HTTP responses, TaskFailedError, timeout, cancellation, and malformed output into distinct application errors. Retry only documented transient HTTP classes; never retry safety failures automatically. Step 6: Store and observe Copy output to owned storage, emit queue, run, and download timings, and record SDK version, API version, model, task ID, and redacted request fingerprint. Authentication The factory reads RUNWAYMLAPISECRET from a server secret provider. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/runway-sdk-patterns--6f5887