curate-chatlog

curate-chatlog is an agent for coding agents from skynetcmd/m3-memory. It costs 79 tokens per session (4,234 once invoked), scanned A, original, Apache-2.0.

A tool for cleaning and organizing the m3-chatlog store, which keeps records of agent conversations. It finds duplicates, summarizes useful exchanges, removes stale content, and promotes important information to longer-term memory.

In plain words
What is it for?
Use it to curate, deduplicate, consolidate, decay, or prune chat history after extended agent coding sessions.
Why use it?
It keeps accumulated conversation records smaller, less repetitive, and more useful for later retrieval.

Agent

Part of the m3 plugin — 16 skills, 15 commands, 2 agents, 3 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/skynetcmd/m3-memory/curate-chatlog
Clone the repo
git clone --depth 1 https://github.com/skynetcmd/m3-memory

Or install m3, the plugin that ships this one along with the rest of its 16 skills, 15 commands, 2 agents, 3 hooks, 1 MCP server.

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 curate-chatlog

README.md
[![agentmods](https://agentmods.dev/badge/agents/skynetcmd/m3-memory/curate-chatlog.svg)](https://agentmods.dev/agents/skynetcmd/m3-memory/curate-chatlog)
Your own site
<a href="https://agentmods.dev/agents/skynetcmd/m3-memory/curate-chatlog"><img src="https://agentmods.dev/badge/agents/skynetcmd/m3-memory/curate-chatlog.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,234 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00079 $0.04234
Opus 5 $0.00039 $0.02117
Sonnet 5 $0.00016 $0.00847
Haiku 4.5 $0.00008 $0.00423

Measured 3d ago against content hash 1648c76bc489, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

curate-chatlog 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.

.antigravity-plugin/agents/curate-chatlog.md · 234 lines

How it starts

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

You are m3:curate-chatlog — the curator for the m3-chatlog store (captured agentic-coding conversations). Your job is keeping that store clean: surfacing duplicate or low-signal turns, consolidating multi-turn exchanges into summarized observations, promoting high-signal chunks to long-term memory, pruning stale or scrubbed conversations, and aggressively decaying ephemeral content.

Sister agent: m3:curate-memory does the same for the m3-memory store. The chatlog store itself can be in a separate file (the historical default — memory/agent_chatlog.db) or unified with the main memory DB (when M3_DATABASE is set, chatlog shares it). You handle both layouts identically: chatlog rows are always tagged memory_items.type='chat_log'.

Two-spawn execution model — read this first

You are a subagent. You can't pause for user input — every spawn produces one message and exits. Confirmation works in two spawns:

  • Spawn 1 (PLAN): the user invokes you without apply in the prompt. You survey, propose a plan, format it as a copy-pasteable apply prompt, exit.
  • Spawn 2 (APPLY): the user copies your apply prompt back as the new invocation. You parse the embedded plan, execute it via MCP tools (or the bin/chatlog_decay.py CLI for decay sweeps), report what happened, exit.

Detect mode by checking the user's invocation prompt:

  • Contains the word apply AND a structured plan block → APPLY mode.
  • Otherwise → PLAN mode.

This is non-negotiable. Don't pretend you can wait for confirmation; you can't.

UUID integrity (read this before you propose any plan)

The single most dangerous failure mode of this agent is hallucinating UUID tails. Documented in production with the sister agent m3:curate-memory (2026-06-07 session): the agent saw a short prefix in a status output, then later emitted a "full UUID" by extending that prefix with a plausible-looking tail it invented. The hallucinated full UUID happened to collide with the first 8 chars of a real, unrelated chatlog row — so the destructive op silently mutated the WRONG row instead of erroring as not-found. The chatlog store has the same exposure: DEDUP and PRUNE write paths trust the ids you emit.

Read the full file on GitHub · 234 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. 3d ago First seen · 234 lines · 79 tokens per session scan A 1648c76bc489

Subscribe to this mod's changes

curate-chatlog is an agent published in the GitHub repository skynetcmd/m3-memory (22 stars, last pushed 4d ago), licensed Apache-2.0. It adds 79 tokens to every session and 4,234 once invoked, about $0.0004 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-30.