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.
npx agentmods add instructions/pkmdev-sec/cocoindex-claude-code/claude-mdgit clone --depth 1 https://github.com/pkmdev-sec/cocoindex-claude-codeWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00401 | $0.00401 |
| Opus 5 | $0.00200 | $0.00200 |
| Sonnet 5 | $0.00080 | $0.00080 |
| Haiku 4.5 | $0.00040 | $0.00040 |
Grade A, and why
cocoindex-claude-code CLAUDE.md 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 2d ago.
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.
What it actually says
CocoIndex Claude Code
This project provides semantic document search capabilities for Claude Code CLI.
Quick Commands
Search Documents
cd /path/to/cocoindex-claude-code && source .venv/bin/activate && python scripts/query.py "your query"
Index Documents
cd /path/to/cocoindex-claude-code && source .venv/bin/activate && cocoindex update main.py
Start Server
cd /path/to/cocoindex-claude-code && source .venv/bin/activate && cocoindex server main.py -ci
Architecture
- TextEmbedding Flow: OpenAI embeddings (text-embedding-3-small) for vector search
- LLMExtraction Flow: Claude Haiku for metadata extraction
- Database: PostgreSQL with pgvector
MCP Tools
When configured in Claude Code, these tools are available:
| Tool | Description |
|---|---|
cocoindex_search |
Semantic search across indexed documents |
cocoindex_index |
Re-index all documents |
cocoindex_list |
List indexed documents |
cocoindex_metadata |
Get document metadata |
cocoindex_add |
Add new document |
Document Location
Add documents to: data/documents/
Supported formats: .md, .txt, .py
Configuration
- Virtual environment:
.venv/ - Configuration:
.env - API Keys required: OpenAI (embeddings), Anthropic (optional, for extraction)
Key Files
| File | Purpose |
|---|---|
mcp_server.py |
MCP server for Claude Code integration |
main.py |
FastAPI entry point |
flows/text_embedding.py |
Vector search indexing |
flows/llm_extraction.py |
LLM metadata extraction |
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.
- 2d ago First seen · 60 lines · 401 tokens per session scan A 20798515717a
cocoindex-claude-code CLAUDE.md is an instructions file published in the GitHub repository pkmdev-sec/cocoindex-claude-code (2 stars, last pushed 7mo ago), licensed MIT. It adds 401 tokens to every session, about $0.0020 per session on Opus 5. 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-08-31.
Other instructions, from other repositories
pgContext AGENTS.md
Instructions for Evokoa/pgContext, covering agents.md — installing & using pgcontext with an ai agent, what pgcontext is (and why it's worth using), environment facts (pins — do not guess), path a — docker (preferred; zero build, most deterministic) and path b — build from source (when docker is unavailable).
flock copilot-instructions.md
Instructions for dais-polymtl/flock, covering copilot instructions for flock, repository layout, building, setup vcpkg (first time or after clean) and release build.
pdf-brain AGENTS.md
Instructions for joelhooks/pdf-brain, covering pdf-brain agent notes, libsql quirks, ai sdk pattern, key files and docs.
markdown-vdb CLAUDE.md
Instructions for geckse/markdown-vdb, covering markdown vdb, architecture, project structure, core design decisions and key conventions.
MinSync AGENTS.md
Instructions for NomaDamas/MinSync, covering minsync and core principles.
qdrant-codebase-mcp CLAUDE.md
Claude Code instructions for theepicsaxguy/qdrant-codebase-mcp, covering claude.md — qdrant-codebase-mcp, what this project is, commands, architecture and key behaviours to understand.