octocode: Instructions file for Codex

AGENTS.md

octocode AGENTS.md is an instructions file for Codex, OpenCode from Muvon/octocode. It costs 1,909 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Octocode, a Rust command-line tool that indexes code, builds a connected knowledge map, and provides the information to AI assistants through an MCP server. MCP is a standard way for an AI assistant to use external tools and data.

In plain words
What is it for?
Use them when working on Octocode’s Rust codebase, its LanceDB storage, search and graph features, configuration, or MCP integration.
Why use it?
They help an AI assistant understand the project structure, configuration rules, storage, and core components before changing the code.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is Muvon/octocode's own configuration. It tells Codex and OpenCode how to work on octocode 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 octocode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Muvon/octocode. 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/Muvon/octocode/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Muvon/octocode

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/muvon/octocode/agents-md"><img src="https://agentmods.dev/badge/instructions/muvon/octocode/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,909 This file is loaded in full into every session.
When invoked 1,909 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.01909 $0.01909
Opus 5.5 $0.00764 $0.00764
Sonnet 5.5 $0.00382 $0.00382
Haiku 4.5 $0.00191 $0.00191

Measured 26d ago against content hash 85f29d9d1b32, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

octocode 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 26d 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.

AGENTS.md · 83 lines

How it starts

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

Octocode — AGENTS.md

Rust CLI (v0.26.x) that indexes codebases into LanceDB vector stores, builds GraphRAG knowledge graphs, and serves AI assistants over MCP (stdin or HTTP). Stack: Rust + tokio + LanceDB + tree-sitter + octolib. All embedding/LLM/reranker providers live in octolib — never in this repo.

Commands

  • Setup: make setup (clippy, rustfmt, cross-targets) · pre-commit install (fmt/clippy/check hooks) · protoc required for full-feature builds
  • Fast dev build — skips local ONNX model compilation: cargo build --no-default-features · Full: cargo build
  • Run: cargo run -- index · RUST_LOG=debug cargo run -- search "query" · cargo run -- mcp --path . (add --bind 0.0.0.0:12345, --with-lsp rust-analyzer, or --multi/--auto for multi-repo)
  • Fast checks: cargo check --no-default-features --message-format=short · cargo clippy --no-default-features
  • Single test: cargo test --all-features indexer::graphrag::builder_tests::<name>
  • Full local gate: make ci-quick (fmt --check + clippy -D warnings + cargo test)

Where to look

Task Start here
Add CLI command src/commands/{cmd}.rs + mod/pub use in src/commands/mod.rs + variant in main.rs; dispatch lives in TWO places — early return before Store::new() if the command needs no store, else the final match (storeless arms there are unreachable!())
Add/change config config-templates/default.toml (single source of truth; embedded) + struct in src/config.rs + src/config/migrations.rs for versioned migrations
Add language src/indexer/languages/{lang}.rs + sibling {lang}_test.rs + register in get_language() in languages/mod.rs + tree-sitter crate in Cargo.toml
Add MCP tool src/mcp/server.rs (router) — existing providers: semantic_code.rs, structural.rs, graphrag.rs, lsp/provider.rs, multi.rs; per-session directory routing (experimental.session.workdir) wraps both modes in session.rs
Search relevance src/indexer/search.rs pipeline → src/reranker.rs → src/reasoning.rs (LLM re-rank) → src/store/weighted_rrf.rs (fusion)
Structural search engine: src/grep.rs (ast-grep) · CLI: src/commands/grep.rs
GraphRAG src/indexer/graphrag/ (builder.rs, symbols.rs, ai.rs, relationships.rs, runtime.rs) · storage: src/store/graphrag.rs · CLI: src/commands/graphrag.rs
Store internals src/store/mod.rs (block types: code/text/document/commit) · table_ops.rs · batch_converter.rs · auto index tuning: vector_optimizer.rs
Branch delta indexes src/indexer/branch.rs + src/commands/branch.rs
Commit history indexing src/indexer/commits/ + src/indexer/git_utils.rs
Markdown/docs indexing src/indexer/markdown_processor.rs
AI commit/review/release src/commands/{commit,review,release}.rs — git-heavy, shell out to git
EditorConfig formatter src/commands/format/
Paths, locks, state src/storage.rs (per-project hash dir) · src/lock.rs (stale-lock detection) · src/state.rs
Embedding/LLM calls only via wrappers src/embedding/mod.rs and src/llm/mod.rs

Read the full file on GitHub · 83 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. 26d ago Changed · +18 tokens per session 85f29d9d1b32
  2. 1mo ago Changed · -106 lines · -565 tokens per session eb70b0b09873
  3. 1mo ago Changed · +5 tokens per session 76b5f4eb4d13
  4. 2mo ago First seen · 189 lines · 2,451 tokens per session scan A ed126aa6a6da

Subscribe to this mod's changes

octocode AGENTS.md is an instructions file published in the GitHub repository Muvon/octocode (522 stars, last pushed 3d ago), licensed Apache-2.0. It adds 1,909 tokens to every session, about $0.0076 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

octocode AGENTS.md compared with instructions from other repositories

octocode AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
octocode AGENTS.mdMuvon/octocodeInstructions file5223d agoApache-2.0A1,909Codex, OpenCode
repobrain copilot-instructions.mdstudy8677/repobrainInstructions file1.4k14d agoMITA229GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot