Agent skill · software engineering · jeremylongshore

clari-sdk-patterns

Build and validate a typed local Clari REST client with bounded retries, job polling, pagination, and redaction. Use when standardizing application code around public contracts. Trigger with: "build a Clari client", "wrap the Clari API", "type Clari responses".

Why this skill is useful

Adds production-ready Python and TypeScript client patterns for the Clari v4 API, enabling reusable client implementations and export pipelines that the AI cannot generate on its own.

What it needs

Requires python, typescript installed locally. Requires clari account access. About 2k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Typed Clari REST Client Patterns Overview Wrap only the endpoints the application owns instead of inventing a broad unofficial SDK. Keep Revenue, v2 ingestion, and Copilot clients separate so their base URLs, headers, limits, schemas, and mutation policies cannot bleed across boundaries. Prerequisites Endpoint inventory and pinned first-party contract fingerprint Language-native HTTP and schema-validation libraries Defined timeout, retry, logging, and secret-redaction policies Instructions Step 1: Split clients by surface Create separate Revenue, ingestion, and Copilot transports with immutable base URLs and header builders. Step 2: Model request and response types Represent identifiers, timestamps, pagination, export job states, error bodies, and optional fields explicitly; reject unknown destructive actions by default. Step 3: Centralize transport policy Set connect and response timeouts, user-agent identity, bounded retries for eligible transient failures, and correlation metadata without logging credentials or payloads. Step 4: Implement job primitives Expose queue, status, cancel, and result operations as an explicit state machine; do not hide long-running work behind an unbounded method. Step 5: Validate at the boundary Schema-check provider responses before domain mapping and preserve the redacted original error ID when validation fails. Step 6: Prove compatibility Run offline contract tests, one non-production read smoke test, and a rollback test against the previously pinned client version. Authentication Construct apikey, partnerkey, X-Api-Key, and X-Api-Password headers only inside the matching transport. Accept secret references rather than literal values and guarantee header redaction in errors, traces, and snapshots. Tool Discipline Use Read and Grep to inspect configuration, provider contracts, fixtures, logs, schemas, and existing tests before proposing a change. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/clari-sdk-patterns

View the source on GitHub

Browse the @skills marketplace