Agent Prompt: Recent Message Summarization

Agent Prompt: Recent Message Summarization is an agent for Claude Code from openonion/connectonion. It costs 18 tokens per session (673 once invoked), scanned A, original, Apache-2.0.

A prompt for condensing the newest part of a conversation into a detailed summary. It tells the agent to cover requests, decisions, code details, errors, fixes, and user feedback.

In plain words
What is it for?
Use it to summarize recent coding-agent conversations, including changed files, code patterns, technical decisions, and completed work.
Why use it?
It helps preserve what happened recently when an earlier conversation is kept as context but the newest work still needs to be recorded.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to summarize recent coding-agent conversations, including changed files, code patterns, technical decisions, and completed work.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openonion/connectonion/agent-prompt-recent-message-summarization
About the project

ConnectOnion is an open-source, template-first toolkit for building, debugging, deploying, and operating AI agents. Developers use its command-line tools and Python runtime to create agents, add tools, connect services, deploy them, and make them callable by other agents, while the catalogue entries are related agents, skills, and instructions.

openonion/connectonion · 1,479 stars · on GitHub · docs.connectonion.com

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.

Clone the repo
git clone --depth 1 https://github.com/openonion/connectonion

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 Agent Prompt: Recent Message Summarization

README.md
[![agentmods](https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-recent-message-summarization.svg)](https://agentmods.dev/agents/openonion/connectonion/agent-prompt-recent-message-summarization)
Your own site
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-recent-message-summarization"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-recent-message-summarization.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 673 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.00018 $0.00673
Opus 5 $0.00009 $0.00336
Sonnet 5 $0.00004 $0.00135
Haiku 4.5 $0.00002 $0.00067

Measured 8d ago against content hash 5c95f55f042a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

Agent Prompt: Recent Message Summarization 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 8d 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.

connectonion/useful_prompts/cc_prompt/prompts/agents/agent-prompt-recent-message-summarization.md · 78 lines

What it actually says

Your task is to create a detailed summary of the RECENT portion of the conversation — the messages that follow earlier retained context. The earlier messages are being kept intact and do NOT need to be summarized. Focus your summary on what was discussed, learned, and accomplished in the recent messages only.

${`Before providing your final summary, wrap your analysis in tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process:

  1. Analyze the recent messages chronologically. For each section thoroughly identify:
    • The user's explicit requests and intents
    • Your approach to addressing the user's requests
    • Key decisions, technical concepts and code patterns
    • Specific details like:
      • file names
      • full code snippets
      • function signatures
      • file edits
    • Errors that you ran into and how you fixed them
    • Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.
  2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.`}

Your summary should include the following sections:

  1. Primary Request and Intent: Capture the user's explicit requests and intents from the recent messages
  2. Key Technical Concepts: List important technical concepts, technologies, and frameworks discussed recently.
  3. Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Include full code snippets where applicable and include a summary of why this file read or edit is important.
  4. Errors and fixes: List errors encountered and how they were fixed.
  5. Problem Solving: Document problems solved and any ongoing troubleshooting efforts.
  6. All user messages: List ALL user messages from the recent portion that are not tool results.
  7. Pending Tasks: Outline any pending tasks from the recent messages.
  8. Current Work: Describe precisely what was being worked on immediately before this summary request.
  9. Optional Next Step: List the next step related to the most recent work. Include direct quotes from the most recent conversation.

Here's an example of how your output should be structured:

  1. Key Technical Concepts:

    • [Concept 1]
    • [Concept 2]
  2. Files and Code Sections:

    • [File Name 1]
      • [Summary of why this file is important]
      • [Important Code Snippet]
  3. Errors and fixes:

    • [Error description]:
      • [How you fixed it]
  4. Problem Solving: [Description]

  5. All user messages:

    • [Detailed non tool use user message]
  6. Pending Tasks:

    • [Task 1]
  7. Current Work: [Precise description of current work]

  8. Optional Next Step: [Optional Next step to take]

Please provide your summary based on the RECENT messages only (after the retained earlier context), following this structure and ensuring precision and thoroughness in your response.

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. 8d ago First seen · 78 lines · 0 tokens per session scan A 5c95f55f042a

Subscribe to this mod's changes

Agent Prompt: Recent Message Summarization is an agent published in the GitHub repository openonion/connectonion (1,479 stars, last pushed today), licensed Apache-2.0. It adds 18 tokens to every session and 673 once invoked, about $0.0001 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.