cocoindex: Instructions file for Codex

AGENTS.md

cocoindex AGENTS.md is an instructions file for Codex, OpenCode from cocoindex-io/cocoindex. It costs 6,362 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for coding agents working on the CocoIndex project. They cover how to build, test, format, lint, and run checks for its Python and Rust code.

In plain words
What is it for?
Use them when changing CocoIndex code, especially after Rust or Python edits, to run the correct builds, tests, type checks, formatting, linting, and pre-submission checks.
Why use it?
They reduce guesswork about the commands and checks needed after making changes. They also help agents follow the same process as the project’s continuous integration checks.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is cocoindex-io/cocoindex's own configuration. It tells Codex and OpenCode how to work on cocoindex itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cocoindex configures →

About the project

CocoIndex is an incremental data-processing engine that keeps code, documents, messages, PDFs, and videos continuously updated as context for AI agents and language-model applications. Engineers use it to build declarative Python pipelines that process only changed data, and its catalogue skills help coding agents work with CocoIndex correctly.

cocoindex-io/cocoindex · 11,827 stars · on GitHub · cocoindex.io

Reuse

Borrowing it

Nothing to install: this file belongs to cocoindex-io/cocoindex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cocoindex-io/cocoindex/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/cocoindex-io/cocoindex

Made for: Codex, OpenCode.

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 cocoindex AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/cocoindex-io/cocoindex/agents-md/github.svg)](https://agentmods.dev/instructions/cocoindex-io/cocoindex/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/cocoindex-io/cocoindex/agents-md"><img src="https://agentmods.dev/badge/instructions/cocoindex-io/cocoindex/agents-md/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 cocoindex AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,362 This file is loaded in full into every session.
When invoked 6,362 The same file — it is already loaded in full.
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.06362 $0.06362
Opus 5.5 $0.02545 $0.02545
Sonnet 5.5 $0.01272 $0.01272
Haiku 4.5 $0.00636 $0.00636

Measured today against content hash 685d5cf4d025, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 today.

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.

AGENTS.md · 414 lines

How it starts

The opening of the file, as written. The whole thing — 414 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

Python linting and formatting go through prek, which runs the ruff-check and ruff-format hooks from .pre-commit-config.yaml with the exact ruff version and file set CI uses. A ruff from uv run, uvx, or Homebrew is usually a different version than the hook pins, so run the hooks rather than ruff itself.

uv tool install prek                         # one-time; some hooks also need `protoc` (brew install protobuf)
prek run ruff-check ruff-format --all-files  # Lint (applying safe fixes), then format Python code (same as CI)
cargo fmt                                    # Format Rust code
./dev/run_cargo_clippy.sh                    # Lint Rust code other than the Rust SDK and its CLI (same as CI)
./dev/run_cargo_clippy_sdk.sh                # Lint the Rust SDK and its CLI, `rust/cli` (same as CI)

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. Before pushing, run the hooks whose inputs your branch changed, as PR CI does:

prek run --from-ref origin/main --to-ref HEAD

prek run --all-files runs every hook on every file, the Rust SDK hooks (cargo-test-sdk, cargo-clippy-sdk, cargo-test-rust-externs) included. The Rust SDK isn't launched yet, so those hooks run only for a change under rust/sdk/, rust/cli/, examples/rust/ or benchmarks/*/rust/, not for a change to the code the SDK builds on. The Rust SDK Daily workflow runs them on main every day and files an issue when they fail.

Read the full file on GitHub · 414 lines

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. today Changed · +16 lines · +575 tokens per session 685d5cf4d025
  2. yesterday Changed · +1 lines · +334 tokens per session 60d660b30847
  3. 6d ago Changed · +1 lines · +34 tokens per session 46a8d2669bcf
  4. 7d ago Changed · +1 lines · +129 tokens per session 6a1fe80c26ec
  5. 8d ago Changed · +9 lines · +241 tokens per session 32f20fa85a23
  6. 15d ago Changed · +9 lines · +121 tokens per session 12b413be77c2
  7. 21d ago Changed · +10 lines · +177 tokens per session e7e6ca0b40da
  8. 25d ago Changed · -2 lines · -1 tokens per session a70cb3a959b6
  9. 27d ago Changed · +4 lines · +20 tokens per session 557b18677967
  10. 1mo ago First seen · 365 lines · 4,732 tokens per session scan A 4d433f4d59a9

Subscribe to this mod's changes

cocoindex AGENTS.md is an instructions file published in the GitHub repository cocoindex-io/cocoindex (11,827 stars, last pushed yesterday), licensed Apache-2.0. It adds 6,362 tokens to every session, about $0.0254 per session on Opus 5.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.

Related

cocoindex AGENTS.md compared with instructions from other repositories

cocoindex AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cocoindex AGENTS.mdcocoindex-io/cocoindexInstructions file12kyesterdayApache-2.0A6,362Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode