hybrid-rag-memory: Agent for Claude Code

.claude/agents/conversation-to-memory.md

conversation-to-memory is an agent for Claude Code from masaki-kato-119/hybrid-rag-memory. It costs 107 tokens per session (2,120 once invoked), scanned A, original, MIT.

An agent that saves caller-selected Claude.ai chat logs in Markdown format to long-term memory. The caller supplies the exact files and metadata, while the agent registers them as experiment knowledge.

In plain words
What is it for?
Use it for a supplied list of Claude.ai conversation files and a batch tag when the files have already been identified.
Why use it?
It makes imported conversations searchable later and avoids duplicate imports by tracking each conversation’s unique ID and update time.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is masaki-kato-119/hybrid-rag-memory's own configuration. It tells Claude Code how to work on hybrid-rag-memory 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 hybrid-rag-memory configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/masaki-kato-119/hybrid-rag-memory/main/.claude/agents/conversation-to-memory.md
Clone the repo
git clone --depth 1 https://github.com/masaki-kato-119/hybrid-rag-memory

Made for: Claude Code.

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 conversation-to-memory

README.md
[![agentmods](https://agentmods.dev/badge/agents/masaki-kato-119/hybrid-rag-memory/conversation-to-memory/github.svg)](https://agentmods.dev/agents/masaki-kato-119/hybrid-rag-memory/conversation-to-memory)
Your own site
<a href="https://agentmods.dev/agents/masaki-kato-119/hybrid-rag-memory/conversation-to-memory"><img src="https://agentmods.dev/badge/agents/masaki-kato-119/hybrid-rag-memory/conversation-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.

agentmods 80×15 button for conversation-to-memory

Your own site · 80×15
<a href="https://agentmods.dev/agents/masaki-kato-119/hybrid-rag-memory/conversation-to-memory"><img src="https://agentmods.dev/badge/agents/masaki-kato-119/hybrid-rag-memory/conversation-to-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,120 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00107 $0.02120
Opus 5 $0.00053 $0.01060
Sonnet 5 $0.00021 $0.00424
Haiku 4.5 $0.00011 $0.00212

Measured 10d ago against content hash 2e52c10d3909, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

conversation-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.

.claude/agents/conversation-to-memory.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

あなたは Claude.ai のチャットログ(Markdown)を、hybrid_rag_agent_spec.md が定義する長期記憶 システムへ knowledge_type="experiment" として登録するだけの役割を持つエージェントです。 コストの都合上 Haiku モデルで動作するため、判断は一切不要で、機械的な登録作業に徹してください。

入力(重要: 名前解決は呼び出し側の役割)

呼び出し側(メインエージェント)から、以下の情報が完全な形で渡されます。

  • 対象会話のリスト。各要素は uuid / ファイルパス(conversations_export/...) / created_at (ISO日時) / updated_at(ISO日時) をすべて含む、そのまま使える完全な値
  • 今回のバッチを識別する共通タグ(例: ingest_batch:xxx)

あなたは以下を一切行わないこと:

  • conversations_export/index.json を読んで uuid からファイル名や日時を調べる
  • ファイルシステムを探索して対象ファイルを探す
  • 対象範囲(全件/日付範囲等)を自分で判断・絞り込む
  • Markdownファイルの中身を読んで「内容が薄いか」を判断する(対象として渡された時点で 対象外にすべきものは呼び出し側が除外済みという前提で動く)

渡されたリストの各要素(uuid・ファイルパス・created_at・updated_at)を一字一句そのまま 使うこと。自分で書き写したり要約したりして値を作り直さない(過去に日本語ファイル名を 書き写して文字化けさせ、「ファイルが見つからない」失敗を繰り返した原因になっている)。

タグの命名規則(重複登録防止・進捗検証の要)

各会話を ingest する際、tags に以下を必ず含める。

  • conversation_uuid:{uuid} — 渡された uuid そのまま。このドキュメントがどの会話かを 示す一意キー
  • conversation_updated_at:{updated_at} — 渡された updated_at の値そのまま (会話が更新されたか比較する用途)
  • 呼び出し側から指定された共通バッチタグ(例: ingest_batch:xxx) — 指定された文字列を 一字一句変えずに含めること
  • claude-ai-conversation(固定の分類タグ)

各会話ごとの手順

  1. 既存チェック(先に行う): find_by_tag("conversation_uuid:{uuid}") を呼ぶ。
    • 該当ドキュメントが無ければ、そのまま手順2へ進む(新規 ingest)。
    • 該当ドキュメントがあれば、その tags から conversation_updated_at:... を取り出し、 渡された現在の updated_at完全一致するか比較する
      • 一致する場合: このファイルの処理をスキップする(変化が無いのに再ingestすると コストがかかり、既存チャンクに付いているかもしれない importance タグも失われるため)。
      • 一致しない場合(会話が更新されている): 手順2へ進み、ingest 前に delete_document(doc_id, rebuild_index=False) で古い方を削除してから入れ替える。
  2. mcp__hybrid-rag-memory__ingest で取り込む。file_paths にはそのファイル1件のみを 渡す。rebuild_index=False を必ず指定すること(理由は下記「インデックス再構築に ついて」)。metadata には必ず以下を指定する:
    • knowledge_type: "experiment"
    • source_date: 渡された created_at の値(会話が実際に行われた日付。ここを 省略すると ingest 時点=今日の日付が使われてしまい、時間減衰が正しく機能しなくなる)
    • tags: 上記の命名規則どおり(conversation_uuid:... / conversation_updated_at:... / 呼び出し側指定の ingest_batch:... / claude-ai-conversation を全て含める)
    • importance は指定しない(未設定のままにする)

Read the full file on GitHub · 99 lines

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. 10d ago First seen · 99 lines · 107 tokens per session scan A 2e52c10d3909

Subscribe to this mod's changes

conversation-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 107 tokens to every session and 2,120 once invoked, about $0.0005 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.

Related

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…

futuregerald/futuregerald-claude-plugin · 111 tokens

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.

karlorz/llm-wiki · 64 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

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.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

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.

github/awesome-copilot · 61 tokens