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/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.
<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>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.5 | $0.00355 | $0.00355 |
| Sonnet 5.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 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.
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.
- 2mo 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 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.
mcp-ripgrep AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mcp-ripgrep AGENTS.mdAtefAndrus/mcp-ripgrep | Instructions file | 0 | 2mo ago | MIT | A | 887 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |