codeindex: Instructions file for Codex

AGENTS.md

codeindex AGENTS.md is an instructions file for Codex, OpenCode from munhq/codeindex. It costs 1,748 tokens per session, scanned A, original, MIT.

Repository instructions for agents working on codeindex, a project that gives AI agents an index of source code. They explain the repository layout, its desk-server workflow, and which commands run changes and checks.

In plain words
What is it for?
Use them when changing codeindex, including its Zig server or JavaScript package and plugin. They guide syncing files, recording changes, sending work to the server, and viewing check results.
Why use it?
They prevent an agent from using the wrong version-control tools or running builds on the owner’s computer. They also define how changes are synced, submitted, and checked.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/munhq/codeindex/agents-md"><img src="https://agentmods.dev/badge/instructions/munhq/codeindex/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,748 This file is loaded in full into every session.
When invoked 1,748 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.01748 $0.01748
Opus 5.5 $0.00699 $0.00699
Sonnet 5.5 $0.00350 $0.00350
Haiku 4.5 $0.00175 $0.00175

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

Security

Grade A, and why

codeindex 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 15d 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 · 101 lines

How it starts

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

AGENTS.md

Notes for an agent that works in this repository.

What the code is

codeindex gives an index of code to AI agents. The server is Zig (zig/). The npm package and the plugin of the AI clients are JavaScript (npm/, plugin/).

The desk server holds the code

The repository lives on the desk server ("store": "server" in .desk/config.json). Do not use git, jj or gh for a change here.

  1. Run desk sync before a change. Merge each .desk-main copy into its file, then delete the copy.
  2. Change the files in the work folder.
  3. Run desk change --intent <issue> with a message of the shape <type>(<scope>): <summary>.
  4. Run desk land. The server merges the change onto main and runs the checks of the repository. Do not push to GitHub, and do not open a pull request.
  5. desk runs list names every check with its run id and its status. desk runs view <id> shows one check.

A test, a lint and a build run on the runners, never on the PC of the owner

The PC of the owner is not a build machine. Do not run a full test suite, a lint or a release build there. The runners of desk do that work.

  1. Use desk try when munhq/desk#234 lands. It runs the checks of the change on the runners.
  2. Until then, run desk pr create to propose the last change. The server runs the checks of the change on the runners, on the tree of the change, and it does not merge the change.
  3. A landing runs the checks with "stage": "land" in .desk/config.json on main. A failed check refuses the landing of the next change, so run desk runs list after a landing.

The checks of the Zig code:

Check Command
zig:fmt /opt/zig-0.16/zig fmt --check src/ main.zig build.zig tests_main.zig
root sh .desk/workflows/buck-base/scripts/buck-run.sh build //:check: the format check, the build and the tests as cached Buck2 actions of the workflow buck-zig (BUCK)
zig:e2e zig build, then zig build e2e — not a check of desk yet: see #9

Read the full file on GitHub · 101 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. 15d ago Changed · +39 lines · +899 tokens per session a538e6399eb6
  2. 16d ago First seen · 62 lines · 849 tokens per session scan A b332c78f48ff

Subscribe to this mod's changes

codeindex AGENTS.md is an instructions file published in the GitHub repository munhq/codeindex (3 stars, last pushed 9d ago), licensed MIT. It adds 1,748 tokens to every session, about $0.0070 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-11-13.

Related

codeindex AGENTS.md compared with instructions from other repositories

codeindex AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codeindex AGENTS.mdmunhq/codeindexInstructions file39d agoMITA1,748Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,303GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file289k2d agoMITA4,393Codex, OpenCode