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/cocoindex-io/cocoindex/agents-mdgit clone --depth 1 https://github.com/cocoindex-io/cocoindexWrote 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.
[](https://agentmods.dev/instructions/cocoindex-io/cocoindex/agents-md)<a href="https://agentmods.dev/instructions/cocoindex-io/cocoindex/agents-md"><img src="https://agentmods.dev/badge/instructions/cocoindex-io/cocoindex/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.04372 | $0.04372 |
| Opus 5 | $0.02186 | $0.02186 |
| Sonnet 5 | $0.00874 | $0.00874 |
| Haiku 4.5 | $0.00437 | $0.00437 |
Grade A, and why
cocoindex AGENTS.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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 357 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file provides guidance to coding agents working with code in this repository.
Claude Code compatibility is kept through CLAUDE.md, which imports this file.
Build and Test Commands
This project uses uv for Python project management.
Building
uv run maturin develop # Build Rust code and install Python package (required after Rust changes)
Testing
cargo test # Run Rust tests
uv run mypy # Type check Python code
uv run pytest python/ # Run Python tests (use after both Rust and Python changes)
Code Formatting and Linting
uv run ruff format . # Format Python code
uv run ruff format --check . # Check formatting without making changes (same as CI)
uv run ruff check . # Lint Python code
cargo fmt # Format Rust code
Pre-submission Checks
CI enforces the full pre-commit hook suite from .pre-commit-config.yaml, which
covers more than the commands above — notably regenerating the CLI docs
(docs/src/content/docs/cli.mdx) whenever cli.py changes. Run it locally
before pushing:
uv tool install prek # one-time; some hooks also need `protoc` (brew install protobuf)
prek run --all-files
Workflow Summary
| Change Type | Commands to Run |
|---|---|
| Rust code only | uv run maturin develop && cargo test |
| Python code only | uv run mypy && uv run pytest python/ |
| Both Rust and Python | Run all commands from both categories above |
| Python formatting | uv run ruff format . |
| Before pushing | prek run --all-files |
Code Structure
cocoindex/
├── rust/ # Rust crates (workspace)
│ ├── core/ # Core engine crate
│ │ └── src/
│ │ ├── engine/ # Core engine
│ │ ├── state/ # States of the core engine
│ │ └── inspect/ # Database inspection utilities
│ ├── py/ # Python bindings (PyO3)
│ ├── py_utils/ # Python-Rust utility helpers (error, convert, future)
│ ├── utils/ # General utilities: error, batching, fingerprint, etc.
│ └── ops_text/ # Text processing operations (splitter, language detection)
│
├── python/
│ ├── cocoindex/ # Python package
│ │ ├── __init__.py # Package entry point
│ │ ├── cli.py # CLI commands
│ │ ├── _internal/ # Internal implementation for the core engine
│ │ │ ├── api.py # Public API: mount, use_mount, mount_each, map, mount_target, App, fn, start/stop
│ │ │ ├── app.py # App base implementation
│ │ │ ├── context_keys.py # ContextKey and ContextProvider
│ │ │ ├── environment.py # Environment and lifespan handling
│ │ │ ├── function.py # @coco.fn decorator implementation
│ │ │ ├── component_ctx.py # ComponentContext and component_subpath
│ │ │ ├── target_state.py # Target state implementation
│ │ │ └── core.pyi # Type stubs for the Rust extension module (update when PyO3 APIs change)
│ │ ├── connectors/ # External system connectors (localfs, postgres, qdrant, lancedb, google_drive)
│ │ ├── connectorkits/ # Connector building utilities
│ │ ├── resources/ # Abstractions: file.py (FileLike), chunk.py (Chunk), schema.py
│ │ └── ops/ # Operations: text.py (RecursiveSplitter), sentence_transformers.py
│ └── tests/ # Python tests
│
├── examples/ # Example applications
├── docs/ # Documentation
└── dev/ # Development utilities
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.
- 3d ago First seen · 357 lines · 4,372 tokens per session scan A a0d01a200bb8
cocoindex AGENTS.md is an instructions file published in the GitHub repository cocoindex-io/cocoindex (11,448 stars, last pushed 2d ago), licensed Apache-2.0. It adds 4,372 tokens to every session, about $0.0219 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-30.
Other instructions, from other repositories
ast-mcp-server AGENTS.md
Instructions for yailPeralta/ast-mcp-server, covering agent skills, issue tracker and domain docs.
apm architecture.instructions.md
Single canonical owner discipline: one authority per durable decision, guarded by a regression test + a static boundary check.
apm python.instructions.md
Python development guidelines.
packmind packmind-frontend-error-management.instructions.md
Instructions for PackmindHub/packmind: A global error boundary is already configured at the root level (in root.tsx) that automatically catches all page crashes, 404s, and loader failures. This standard defines when and how to use explicit... .
Commit Message
Comprehensive Conventional Commits guidelines for openwebui-extensions.
cli CLAUDE.md
Instructions for archcore-ai/cli, covering claude.md, search priority, archcore operations, managed blocks and build and test commands.