mcp-ripgrep: Instructions file for Codex

AGENTS.md

mcp-ripgrep AGENTS.md is an instructions file for Codex, OpenCode from AtefAndrus/mcp-ripgrep. It costs 887 tokens per session, scanned A, a copy of mcp-ripgrep CLAUDE.md, MIT.

Project instructions for mcp-ripgrep, a server that lets tools search files with ripgrep.

In plain words
What is it for?
Use them when adding search tools, running tests, checking types, formatting code, or updating the parameter table.
Why use it?
They give contributors the commands, architecture rules, testing approach, and security constraints needed to change the project safely.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 mcp-ripgrep AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/atefandrus/mcp-ripgrep/agents-md"><img src="https://agentmods.dev/badge/instructions/atefandrus/mcp-ripgrep/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 887 This file is loaded in full into every session.
When invoked 887 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 100% 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.1 $0.00887 $0.00887
Opus 5.5 $0.00355 $0.00355
Sonnet 5.5 $0.00177 $0.00177
Haiku 4.5 $0.00089 $0.00089

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

Security

Grade A, and why

mcp-ripgrep 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 2mo 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

100% identical to mcp-ripgrep CLAUDE.md — 47 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 · 47 lines

What it actually says

mcp-ripgrep

ripgrep の検索機能を提供する MCP サーバー。

コマンド

bun install          # 依存関係インストール
bun test             # テスト実行
bun test tests/builder.test.ts  # 単体テストのみ
bun test tests/mcp.test.ts      # MCP 統合テストのみ
bunx tsc --noEmit    # 型チェック
bunx biome check .   # Lint
bunx biome check --write .  # Lint + フォーマット自動修正
bunx tsc             # ビルド (dist/ に出力)
bun run scripts/generate-param-table.ts --write  # README パラメータ対応表を再生成

アーキテクチャ

  • ツール定義は src/tools/ に 1 ファイル 1 ツールで配置。新ツール追加時は既存ツール (例: src/tools/search.ts) をテンプレートとして使い、src/server.ts に register 呼び出しを追加する
  • コマンド構築 (src/rg/builder.ts) と実行 (src/rg/executor.ts) は分離されている。builder は純粋関数で { command, args[] } を返すだけなので、rg バイナリなしで単体テスト可能
  • builder はシェルを介さず spawn("rg", args) 用の引数配列を構築する。この設計はセキュリティ上の要件 (後述) による

テスト

  • bun:test を使用。テストファイルは tests/ 直下に配置
  • builder テスト (tests/builder.test.ts) は rg バイナリ不要。executor テスト以降は rg が必要
  • MCP 統合テスト (tests/mcp.test.ts) は InMemoryTransport + Client でプロトコルレベル検証。新ツール追加時はここにテストケースを追加する
  • テストフィクスチャは tests/fixtures/ に配置

注意事項

  • ツールのパラメータを追加・削除・変更したら bun run scripts/generate-param-table.ts --write を実行して README の対応表を更新する。CI では検証されないため忘れやすい
  • caseSensitive は true/false/undefined の三値で挙動が変わる (builder.ts:10-17)。if (caseSensitive) のような二値判定をすると undefined (smart-case) のパスが壊れる
  • executor.ts の exit code 判定: rg は「マッチなし」を exit code 1 で返す。code 0-1 は正常、2 以上がエラー
  • path-guard.ts は path.resolve() + プレフィックス一致で検証する。fs.realpathSync は意図的に使っていない (symlink は未解決)
  • リリースは git tag vX.Y.Z && git push origin vX.Y.Z で自動公開。publish ワークフローが npm に --provenance 付きで publish する

セキュリティ

このサーバーは MCP 経由でユーザー入力 (検索パターン、パス) をそのまま rg プロセスに渡す。シェルインジェクション防止が最重要。

  • shell: true は絶対に使わない。spawn の第2引数に配列で引数を渡す
  • 文字列結合やテンプレートリテラルでコマンド文字列を組み立てない
  • パターンとパスは -- セパレータの後に配置する (フラグインジェクション防止)
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. 2mo ago First seen · 47 lines · 887 tokens per session scan A a3ef52b6ebd5

Subscribe to this mod's changes

mcp-ripgrep AGENTS.md is an instructions file published in the GitHub repository AtefAndrus/mcp-ripgrep (0 stars, last pushed 2mo ago), licensed MIT. It adds 887 tokens to every session, about $0.0035 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to mcp-ripgrep CLAUDE.md, differing in 47 lines, and is treated as a copy.

Related

mcp-ripgrep AGENTS.md compared with instructions from other repositories

mcp-ripgrep AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-ripgrep AGENTS.mdAtefAndrus/mcp-ripgrepInstructions file02mo agoMITA887Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot