ashish7802/awesome-api-skills/cohere

Claude Code and agent skill by ashish7802/awesome-api-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install ashish7802/awesome-api-skills/cohere

SKILL.md

The same SKILL.md was published earlier as ashish7802/awesome-api-skills/cohere.

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

bash
npm install cohere-ai
pip install cohere

Authentication & Client Setup

typescript
import { CohereClient } from 'cohere-ai';
const cohere = new CohereClient({
token: process.env.COHERE_API_KEY,
});

Core API Operations

1. Embed v3 with Mandatory inputType
typescript
// 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)
typescript
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
typescript
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.

Production Verification Checklist

  • [ ] inputType verified across indexing and query pipelines
  • [ ] Cohere Rerank layer integrated after initial vector search
  • [ ] Citations mapped to source document IDs in UI

Last Verified: 2026-07-03

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
13
Repository forks
6
7-day trend score
13

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ashish7802/awesome-api-skills/cohere/badge)](https://verified-skill.com/skills/ashish7802/awesome-api-skills/cohere)

Something wrong with this skill or its page? Tell us.