md2idx AGENTS.md

md2idx AGENTS.md is an instructions file for Codex, OpenCode from oubakiou/md2idx. It costs 295 tokens per session, scanned A, a copy of mdxg-redline AGENTS.md, MIT.

Instructions for working on md2idx, a tool that turns Markdown into indexed JSON so large documents can be split and given to an AI agent selectively. They define temporary-file, TypeScript, linting, and comment conventions.

In plain words
What is it for?
Developing md2idx, managing temporary files, choosing const in TypeScript when appropriate, writing only useful comments, and completing a self-review before committing.
Why use it?
They reduce accidental changes to the project’s development practices and encourage agents to preserve important reasoning before disabling checks or changing code style.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/oubakiou/md2idx/agents-md
Clone the repo
git clone --depth 1 https://github.com/oubakiou/md2idx

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/oubakiou/md2idx/agents-md.svg)](https://agentmods.dev/instructions/oubakiou/md2idx/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/oubakiou/md2idx/agents-md"><img src="https://agentmods.dev/badge/instructions/oubakiou/md2idx/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 295 This file is loaded in full into every session.
When invoked 295 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 88% copy Near-identical to another mod 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 $0.00295 $0.00295
Opus 5 $0.00148 $0.00148
Sonnet 5 $0.00059 $0.00059
Haiku 4.5 $0.00030 $0.00030

Measured 4d ago against content hash 91bd2781f4bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

md2idx 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 4d 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.

Origin

This is a copy

88% identical to mdxg-redline AGENTS.md — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 10 lines

What it actually says

@README_ja.md @docs/design/development.md

  • エージェントが作業中に一時的なファイルやディレクトリを作成する場合は、必ず .temp/ 配下に作成する
  • linterを無効化する場合は、その前に無効化しない対応を検討し、対応が難しいまたはデメリットがある場合にはコメントで理由を記述する
  • TypeScriptにおいては明確な理由がなければletではなくconstを利用する
  • コメントは WHY が非自明な場合(隠れた制約、見落としやすい invariant、特定バグの workaround、読み手が驚く挙動)のみ書く。識別子で表現できる WHAT は書かない
  • 現在のタスク・修正経緯・呼び出し元への言及("X 用に追加"、"Y フローで使う"、"issue #123 対応" 等)はコメントに書かない。これらは PR description / commit message に属し、コードベースが進化するうちに rot する
  • コミット前にサブエージェントでセルフレビューを行うかユーザーにAskUserQuestionで確認する
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. 4d ago First seen · 10 lines · 295 tokens per session scan A 91bd2781f4bb

Subscribe to this mod's changes

md2idx AGENTS.md is an instructions file published in the GitHub repository oubakiou/md2idx (12 stars, last pushed 24d ago), licensed MIT. It adds 295 tokens to every session, about $0.0015 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to mdxg-redline AGENTS.md, differing in 3 lines, and is treated as a copy.

Related

Other instructions, from other repositories