Implement a typed Cohere v2 provider boundary with timeouts, bounded retries, streaming, and response validation.

MITAuto-check passedBackend & APIs

Install Cohere SDK Patterns

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill cohere-sdk-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace cohere-sdk-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/cohere-sdk-patterns .claude/skills/cohere-sdk-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cohere-sdk-patterns
GitHub stars
2.8k
Token cost
~1.1k tokens
SKILL.md length
453 words
Files
2 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Implement a typed Cohere v2 provider boundary with timeouts, bounded retries, streaming, and response validation.

  • Works in 6 steps: Inventory current direct SDK calls and… → Define typed request and result… → Centralize timeout, redaction, retry… → …
  • Standardizing production SDK usage
  • SKILL.md covers Overview, Prerequisites, Tool Discipline and Current Contract, plus 7 more sections
  • Needs CO_API_KEY

What it does

Cohere SDK Patterns is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement a typed Cohere v2 provider boundary with timeouts, bounded retries, streaming, and response validation. Use when standardizing production SDK usage. Trigger with "Cohere SDK patterns", "Cohere client wrapper", or "refactor Cohere client".

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/official-docs.md`). Compatibility notes: Designed for Claude Code; live verification requires network access and an approved Cohere API key

It sits in Backend & APIs. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Standardizing production SDK usage
  • With Cohere SDK patterns
  • Cohere client wrapper
  • Refactor Cohere client

Example prompts

  • “Cohere SDK patterns”
  • “Cohere client wrapper”
  • “refactor Cohere client”
  • “/cohere-sdk-patterns”

Requirements

  • Python 3
  • A credential in CO_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code; live verification requires network access and an approved Cohere API key
  • Pre-approved tools (allowed-tools): Read, Glob, Grep, WebFetch, Write, Edit

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Inventory current direct SDK calls and group them by Chat, Embed, Rerank, and model discovery.
  2. Define typed request and result contracts that expose only application-required fields.
  3. Centralize timeout, redaction, retry eligibility, and model resolution.
  4. Implement streaming as an async iterator with cancellation and terminal-event validation.
  5. Add contract fixtures for success, partial stream, timeout, limit, and schema drift.
  6. Migrate one call site at a time and delete direct SDK access only after parity tests pass.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Glob
    • Grep
    • WebFetch
    • Write
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • CO_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code; live verification requires network access and an approved Cohere API key

    From compatibility in the SKILL.md frontmatter.

Context cost

Cohere SDK Patterns loads about 1.1k tokens when it runs, and up to ~1.9k if it reads all its reference files. Until then it costs about 67 tokens; SKILL.md has 453 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 453 words, ~1,093 tokens.

Download SKILL.mdSave it as .claude/skills/cohere-sdk-patterns/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
cohere-sdk-patterns
description
Implement a typed Cohere v2 provider boundary with timeouts, bounded retries, streaming, and response validation. Use when standardizing production SDK usage. Trigger with "Cohere SDK patterns", "Cohere client wrapper", or "refactor Cohere client".
allowed-tools
Read, Glob, Grep, WebFetch, Write, Edit
compatibility
Designed for Claude Code; live verification requires network access and an approved Cohere API key
argument-hint
[repository-path] [typescript|python]
version
1.6.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
saas, cohere, sdk
model
inherit
effort
high

Cohere SDK Integration Patterns

Overview

Wrap generated SDK clients behind a small application contract so model changes, provider errors, and migrations stay localized.

Prerequisites

  • The target repository, runtime, environment, and accountable owner
  • An approved Cohere team and key for any live verification
  • Current quality, security, privacy, capacity, and change-control requirements

Tool Discipline

Use Read, Glob, and Grep to inspect code, configuration, and evidence. Use WebFetch only for current Cohere primary documentation. Use Write or Edit only when the user requested implementation and the exact target files are known; never write credentials or customer content.

Current Contract

  • Instantiate one configured v2 client per runtime process unless tenancy requires a separate credential boundary.
  • Require callers to supply an operation purpose, bounded timeout, and resolved model ID.
  • Retry only transient transport, 429, and eligible 5xx failures with jitter and a total-attempt ceiling.
  • Normalize Chat content, citations, tool calls, Embed vectors, Rerank scores, usage, and provider request metadata at the boundary.

Authentication

Use an environment-specific key injected from an approved secret manager. Never print, persist, commit, or place CO_API_KEY in an example. Confirm access with the least costly bounded operation appropriate to the task, and treat key creation, rotation, revocation, role changes, and production-capacity requests as owner-approved actions.

Instructions

  1. Inventory current direct SDK calls and group them by Chat, Embed, Rerank, and model discovery.
  2. Define typed request and result contracts that expose only application-required fields.
  3. Centralize timeout, redaction, retry eligibility, and model resolution.
  4. Implement streaming as an async iterator with cancellation and terminal-event validation.
  5. Add contract fixtures for success, partial stream, timeout, limit, and schema drift.
  6. Migrate one call site at a time and delete direct SDK access only after parity tests pass.
Show full SKILL.md (168 more words)Show less

Approval Boundaries

Do not expose or rotate keys, change Cohere Team roles, accept commercial terms, enable sensitive production data, increase spend or capacity, switch production models, send a support bundle, or execute model-proposed side effects without the accountable owner's approval. Keep diagnosis read-only unless implementation was requested.

Output

Return the resolved API and model contract, files or settings inspected, evidence collected, validation result, remaining risk, owner, and rollback or next action. Redact keys, authorization headers, prompts, retrieved documents, embeddings, customer identifiers, and unrestricted environment output.

Error Handling

ConditionResponse
Unknown eventPreserve it in diagnostics and fail the affected stream safely.
Retry stormEnforce jitter, an attempt ceiling, and a shared concurrency budget.
Type driftUpdate the adapter against the pinned SDK and add a fixture.
Empty contentTreat it as an invalid result unless the operation expected tool calls.

Examples

Use this compact handoff shape to keep the selected scope, validation evidence, and operational result reviewable.

Input:

text
operations=chat,embed,rerank; timeout=15s; retries=2; stream-cancel=true

Expected handoff:

text
adapter=typed; direct-sdk-calls=0; fixtures=pass; retry-budget=bounded

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/.curated/cohere-sdk-patterns of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/official-docs.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Cohere SDK Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cohere SDK Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cohere SDK Patterns this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT
Nestjs Best Practicesrolling-scopes/rsschool-app10k6 repos~1.2kAutomated safety check: PassMIT
ToolJet Marketplace Plugin BuilderToolJet/ToolJet41k—~2.1kAutomated safety check: PassAGPL-3.0
Payloadpayloadcms/payload45k5 repos~6.2kAutomated safety check: PassMIT
Infer Conventionsanonaddy/anonaddy4.9k5 repos~3.1kAutomated safety check: PassMIT
RuView CLI, API and WASMruvnet/RuView97k—~1.2kAutomated safety check: NotesMIT

Similar skills

  • Nestjs Best Practices

    rolling-scopes/rsschool-app

    NestJS best practices and architecture patterns for building production-ready applications.

    10k GitHub starsUsed in 6 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Turns an API description, such as an OpenAPI file or a Postman collection, into a connector plugin for ToolJet's marketplace and checks it with the repo's validator.

    41k GitHub stars~2.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Payload

    payloadcms/payload

    A skill your agent uses when working with Payload projects (payload.config.ts, collections, fields, hooks, access control, Payload API).

    45k GitHub starsUsed in 5 repos~6.2k tokens
    Backend & APIsAuto-check passed
  • Infer Conventions

    anonaddy/anonaddy

    A skill your agent uses to analyze how a Laravel application is actually written and record its conventions as shared rules.

    4.9k GitHub starsUsed in 5 repos~3.1k tokens
    Backend & APIsAuto-check passed
  • Covers the RuView `wifi-densepose` command line binary, its Axum REST API and the WebAssembly builds for browsers and ESP32, for embedding or scripting RuView.

    97k GitHub stars~1.2k tokensUpdated today
    Backend & APIsAuto-check: notes
  • Contributor guide for step three of adding a syncable entity to the Twenty server: write the validator, the migration action builder and the orchestrator wiring.

    58k GitHub stars~3.3k tokensUpdated today
    Backend & APIsAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Cohere SDK Patterns

What does Cohere SDK Patterns do?

Implement a typed Cohere v2 provider boundary with timeouts, bounded retries, streaming, and response validation. Cohere SDK Patterns is an agent skill from jeremylongshore/tons-of-skills-marketplace. Implement a typed Cohere v2 provider boundary with timeouts, bounded retries, streaming, and response validation.

When should I use Cohere SDK Patterns?

Cohere SDK Patterns fits situations like: standardizing production SDK usage; with Cohere SDK patterns; cohere client wrapper; refactor Cohere client.

How do I install Cohere SDK Patterns in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cohere-sdk-patterns -a claude-code`. Or copy the skill folder (skills/.curated/cohere-sdk-patterns in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/cohere-sdk-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Cohere SDK Patterns in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cohere-sdk-patterns -a codex`. Or copy the skill folder (skills/.curated/cohere-sdk-patterns in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/cohere-sdk-patterns in your project. Codex loads it when a task matches its description.

Can I use Cohere SDK Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cohere-sdk-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cohere-sdk-patterns, .gemini/skills/cohere-sdk-patterns, .github/skills/cohere-sdk-patterns and .opencode/skills/cohere-sdk-patterns in your project.

What does Cohere SDK Patterns need to run?

Going by SKILL.md and its folder, Cohere SDK Patterns needs credentials named CO_API_KEY. Our summary lists: Python 3; A credential in CO_API_KEY. Its frontmatter pre-approves these tools: Read, Glob, Grep, WebFetch, Write, Edit. Compatibility (from SKILL.md): Designed for Claude Code; live verification requires network access and an approved Cohere API key.

Does Cohere SDK Patterns access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Cohere SDK Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cohere SDK Patterns use?

Cohere SDK Patterns is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cohere SDK Patterns use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 820 tokens, read only when the agent opens those files.

What are the alternatives to Cohere SDK Patterns?

Skills that share tags, products or a category with Cohere SDK Patterns: Nestjs Best Practices (rolling-scopes/rsschool-app, 10k stars), ToolJet Marketplace Plugin Builder (ToolJet/ToolJet, 41k stars), Payload (payloadcms/payload, 45k stars) and Infer Conventions (anonaddy/anonaddy, 4.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cohere SDK Patterns?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.