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.
curl -O https://raw.githubusercontent.com/AtefAndrus/mcp-ripgrep/main/AGENTS.mdgit clone --depth 1 https://github.com/AtefAndrus/mcp-ripgrepWrote 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.
[](https://agentmods.dev/instructions/atefandrus/mcp-ripgrep/agents-md)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00887 | $0.00887 |
| Opus 5 | $0.00443 | $0.00443 |
| Sonnet 5 | $0.00177 | $0.00177 |
| Haiku 4.5 | $0.00089 | $0.00089 |
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 3d 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.
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.
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引数に配列で引数を渡す- 文字列結合やテンプレートリテラルでコマンド文字列を組み立てない
- パターンとパスは
--セパレータの後に配置する (フラグインジェクション防止)
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.
- 3d ago First seen · 47 lines · 887 tokens per session scan A a3ef52b6ebd5
mcp-ripgrep AGENTS.md is an instructions file published in the GitHub repository AtefAndrus/mcp-ripgrep (0 stars, last pushed 6d ago), licensed MIT. It adds 887 tokens to every session, about $0.0044 per session on Opus 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.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.