Agent skill · software engineering · jeremylongshore
canva-sdk-patterns
Implement a narrow typed Canva Connect REST adapter from a pinned OpenAPI contract. Use when generating or hand-writing request types, response validation, error classification, and tenant-safe client boundaries. Trigger with: "Canva SDK pattern", "generate Canva client", "type Canva API".
Why this skill is useful
Adds a production-ready TypeScript and Python client for the Canva API, including automatic token refresh and retry logic, which are not commonly found in public documentation.
What it needs
Requires canva account access. About 2k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Canva Typed REST Adapter Overview Treat the adapter as a transport boundary, not an authorization oracle or official Canva SDK. Keep policy and token rotation outside generic request methods, and tolerate documented non-breaking response additions. Prerequisites Language/runtime, package policy, and required operations Pinned OpenAPI bytes/checksum and generation configuration Authorization, token, data, retry, and test boundaries Instructions Step 1: Select the minimal surface Use Read and Grep to list only required operations, scopes, request/response shapes, async job states, and preview flags. Step 2: Pin generation inputs Store or checksum the OpenAPI contract and generator version. Review endpoint, scope, enum, validation, and preview changes before regeneration. Step 3: Define adapter interfaces Use Write or Edit to expose explicit operation methods, normalized errors, response validation, timeout context, and opaque request/job metadata. Step 4: Keep policy outside Require an already-authorized tenant/resource decision and token lease. Do not let a generic client select roles, broaden scopes, refresh concurrently, or log bodies. Step 5: Handle responses safely Validate required fields, accept additive unknown fields where the contract allows, reject unsafe type/status drift, and model in-progress/success/failed without exhaustive assumptions about preview enums. Step 6: Constrain retries Retry only classified safe reads or reconciled operations under a bounded policy. Return authorization and throttling facts to their owning layers. Step 7: Test contract drift Exercise fixtures for success, provider errors, unknown fields, changed enums, malformed bodies, timeouts, duplicate prevention, and redaction. Authentication Canva Connect calls use Bearer access tokens obtained by a backend through OAuth 2.0 Authorization Code with SHA-256 PKCE. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/canva-sdk-patterns