cohere

cohere is a skill for Claude Code, Codex from ashish7802/awesome-api-skills. It costs 0 tokens per session (606 once invoked), scanned A, original, MIT.

An API for turning text into numerical representations called embeddings, sorting search results by relevance, and generating conversational answers with citations. Embeddings let software compare the meaning of text.

In plain words
What is it for?
Use it to build semantic search, document retrieval for RAG systems, result reranking, and cited question-answering.
Why use it?
It helps search systems find relevant documents even when the query uses different words. Reranking can improve the order of results before they are shown or given to a language model.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build semantic search, document retrieval for RAG systems, result reranking, and cited question-answering.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ashish7802/awesome-api-skills/cohere
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ashish7802/awesome-api-skills --skill cohere
Clone the repo
git clone --depth 1 https://github.com/ashish7802/awesome-api-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cohere

README.md
[![agentmods](https://agentmods.dev/badge/skills/ashish7802/awesome-api-skills/cohere/github.svg)](https://agentmods.dev/skills/ashish7802/awesome-api-skills/cohere)
Your own site
<a href="https://agentmods.dev/skills/ashish7802/awesome-api-skills/cohere"><img src="https://agentmods.dev/badge/skills/ashish7802/awesome-api-skills/cohere/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cohere

Your own site · 80×15
<a href="https://agentmods.dev/skills/ashish7802/awesome-api-skills/cohere"><img src="https://agentmods.dev/badge/skills/ashish7802/awesome-api-skills/cohere.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 606 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00606
Opus 5 $0.00000 $0.00303
Sonnet 5 $0.00000 $0.00121
Haiku 4.5 $0.00000 $0.00061

Measured yesterday against content hash 87b6fd375d7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cohere scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cohere/SKILL.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cohere API Skill

Overview

Cohere provides industry-leading semantic search embeddings (Embed v3), document reranking (Rerank v3), and conversational reasoning with citations (Command R+).

Installation

npm install cohere-ai
pip install cohere

Authentication & Client Setup

import { CohereClient } from 'cohere-ai';

const cohere = new CohereClient({
  token: process.env.COHERE_API_KEY,
});

Core API Operations

1. Embed v3 with Mandatory inputType

// When embedding documents into vector storage:
const docEmbeddings = await cohere.embed({
  model: 'embed-english-v3.0',
  texts: ['PostgreSQL handles ACID transactions', 'Redis is an in-memory cache'],
  inputType: 'search_document', // Required for Embed v3
});

// When embedding user search query:
const queryEmbedding = await cohere.embed({
  model: 'embed-english-v3.0',
  texts: ['how does Postgres ensure data integrity?'],
  inputType: 'search_query', // Required for Embed v3
});

2. Rerank Document Candidates (RAG Optimization)

const reranked = await cohere.rerank({
  model: 'rerank-english-v3.0',
  query: 'How to configure SSL certificates in Nginx?',
  documents: [
    'Nginx is an HTTP and reverse proxy server.',
    'To configure SSL in Nginx, add ssl_certificate and ssl_certificate_key directives in the server block.',
    'Apache HTTP server uses SSLCertificateFile.',
  ],
  topN: 2,
});

console.log(reranked.results);

3. Command R+ Chat with Citations

const response = await cohere.chat({
  model: 'command-r-plus',
  message: 'Explain zero-knowledge rollups.',
  documents: [
    { title: 'ZK Rollups', snippet: 'ZK-rollups bundle transactions into a single cryptographic proof.' },
  ],
});

console.log(response.text);
console.log(response.citations);

AI Pitfalls & Anti-Hallucination Guidelines

  • Missing inputType: Failing to pass inputType: 'search_document' or 'search_query' will result in a 400 validation error in Embed v3.
  • Rerank Format: Ensure documents passed to rerank are either strings or objects with a text property.

Read the full file on GitHub · 81 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 81 lines · 0 tokens per session scan A 87b6fd375d7e

Subscribe to this mod's changes

cohere is a skill published in the GitHub repository ashish7802/awesome-api-skills (13 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 606 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.