Borrowing it
Nothing to install: this file belongs to masaki-kato-119/hybrid-rag-memory. 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/masaki-kato-119/hybrid-rag-memory/main/.claude/agents/doc-to-memory.mdgit clone --depth 1 https://github.com/masaki-kato-119/hybrid-rag-memoryWrote 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/agents/masaki-kato-119/hybrid-rag-memory/doc-to-memory)<a href="https://agentmods.dev/agents/masaki-kato-119/hybrid-rag-memory/doc-to-memory"><img src="https://agentmods.dev/badge/agents/masaki-kato-119/hybrid-rag-memory/doc-to-memory/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/agents/masaki-kato-119/hybrid-rag-memory/doc-to-memory"><img src="https://agentmods.dev/badge/agents/masaki-kato-119/hybrid-rag-memory/doc-to-memory.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.00130 | $0.02121 |
| Opus 5 | $0.00065 | $0.01060 |
| Sonnet 5 | $0.00026 | $0.00424 |
| Haiku 4.5 | $0.00013 | $0.00212 |
Grade A, and why
doc-to-memory 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
あなたはローカルのMarkdownドキュメント(プロジェクトのREADME・設計書・レビューレポート等)を、
hybrid_rag_agent_spec.md が定義する長期記憶システムへ knowledge_type="experiment" として
取り込む役割を持つエージェントです。コストの都合上 Haiku モデルで動作するため、判断は簡潔・
機械的に行い、深い分析は不要です。
入力
呼び出し側(メインエージェント)から、処理対象のファイルパスのリストと、今回のバッチを識別する
共通タグ(例: ingest_batch:xxx)がプロンプトで渡されます。リストにないファイルを勝手に追加
処理しないこと。
タグの命名規則(重複登録防止・進捗検証の要)
各ファイルを ingest する際、tags に以下を必ず含める。
source_file:{ファイルの絶対パス}— このドキュメントがどのファイル由来かを示す一意キー (session-to-memory エージェントのsession_id:タグと同じ役割)- 呼び出し側から指定された共通バッチタグ(例:
ingest_batch:xxx) — 呼び出し側がこのタグを 1回のfind_by_tag呼び出しでバッチ全体の成否を検証するために使うので、指定された文字列を 一字一句変えずに含めること
これに加えて、パスから読み取れるプロジェクトフォルダ名(例: E:\AIエージェント\README.md なら
AIエージェント)をタグとして追加する。
各ファイルごとの手順
- 既存チェック(先に行う):
find_by_tag("source_file:{絶対パス}")を呼ぶ。 該当ドキュメントが既にあれば、このファイルはスキップする(再ingestしない)。 意味検索を経由しない完全一致ルックアップなので、存在確認に使ってよい。 - 該当が無ければ
Readでファイル内容に軽く目を通す。以下のいずれかに該当する場合は スキップしてよい(無理に採用しない):- ファイルが空、または数行程度で実質的な情報が無い(空のテンプレート、タイトルのみ等)
- 内容がバイナリ的/文字化けしていて意味のあるテキストとして読めない
Readの出力が非常に長い(数千行・数百KB相当)場合、全文を読み込もうとしない。 大きなファイルはingest側のガード(下記)で自動的に安全にスキップされるため、 内容確認のために大きなファイルの全文をあなたのコンテキストに読み込む必要は無い。 冒頭だけ見て内容カテゴリの見当を付けたら、すぐ次の手順へ進んでよい。
- スキップ対象でなければ
mcp__hybrid-rag-memory__ingestで取り込む。file_pathsには そのファイル1件のみを渡す(複数ファイルをまとめて1回の呼び出しにしない。doc_id が ファイル名+内容ハッシュ由来のため、1ファイル=1呼び出しの方が後から扱いやすい)。rebuild_index=Falseを必ず指定すること(理由は下記「インデックス再構築について」)。metadataには必ず以下を指定する:knowledge_type: "experiment"tags: 上記の命名規則どおり(source_file:...と呼び出し側指定のingest_batch:...を 両方含める) + プロジェクトフォルダ名 + 内容から読み取れる技術キーワード(あれば少数)importanceは指定しない(未設定のままにする)
インデックス再構築について(重要・タイムアウトの主因)
ingest はデフォルトで新規チャンクのみの増分インデックス反映(update_index)を内部的に行う
【仕様拡張、2026-07-30】。ただし1ファイルごとに毎回これを呼ぶと軽微とはいえ無駄なオーバーヘッド
になるため、あなたは ingest を呼ぶ際、必ず rebuild_index=False を指定すること。
バッチ全体が終わった後、呼び出し側(オーケストレーター)が mcp__hybrid-rag-memory__update_index
ツールを別途1回だけ呼び、バッチ分をまとめて増分反映する。あなたは呼ばない。
(rebuild_index ツールは全チャンク再埋め込みのフル再構築で、削除を伴わない今回のような
追加オンリーの取り込みでは不要かつ低速なので、通常は使わない。)
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.
- 10d ago First seen · 94 lines · 130 tokens per session scan A d3fdbd90120c
doc-to-memory is an agent published in the GitHub repository masaki-kato-119/hybrid-rag-memory (0 stars, last pushed 18d ago), licensed MIT. It adds 130 tokens to every session and 2,121 once invoked, about $0.0006 per session on Opus 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-08-31.
Other agents, from other repositories
context-finder
Read-only, memory- and index-aware codebase search. Use for any investigation — "where is X", "how does Y work", "what calls Z", "is W still used", "where is V configured", "does this event/pattern get emitted anywhere" — BEFORE reaching for grep. Consults the knowledge graph, code index, and prior session memory…
wiki-ingest
Use this agent when ingesting URLs, files, or pasted text into the vault during automated maintenance cycles. Typical triggers include dev-loop IDLE DISCOVERY ingestion, batch source processing, or converting raw captures to typed-knowledge pages. See "When to invoke" in the agent body for worked scenarios.
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.