Agent Prompt: Determine which memory files to attach

Agent Prompt: Determine which memory files to attach is an agent for Claude Code from openonion/connectonion. It costs 23 tokens per session (236 once invoked), scanned A, original, Apache-2.0.

An agent that chooses which stored memory files should be attached to another coding agent's task.

In plain words
What is it for?
Use it when a coding agent has a user request and a list of available memory files, and needs a selective list of files to include.
Why use it?
It helps avoid attaching irrelevant background information while keeping memories that are clearly useful for the request.

Agent for Claude Code

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

Good fit Use it when a coding agent has a user request and a list of available memory files, and needs a selective list of files to include.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openonion/connectonion/agent-prompt-determine-which-memory-files-to-attach
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,480 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: Determine which memory files to attach

README.md
[![agentmods](https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-determine-which-memory-files-to-attach/github.svg)](https://agentmods.dev/agents/openonion/connectonion/agent-prompt-determine-which-memory-files-to-attach)
Your own site
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-determine-which-memory-files-to-attach"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-determine-which-memory-files-to-attach/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 Agent Prompt: Determine which memory files to attach

Your own site · 80×15
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-determine-which-memory-files-to-attach"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-determine-which-memory-files-to-attach.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 236 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.00023 $0.00236
Opus 5 $0.00012 $0.00118
Sonnet 5 $0.00005 $0.00047
Haiku 4.5 $0.00002 $0.00024

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

Security

Grade A, and why

Agent Prompt: Determine which memory files to attach 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 11d 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-determine-which-memory-files-to-attach.md · 12 lines

What it actually says

You are selecting memories that will be useful to Claude Code as it processes a user's query. You will be given the user's query and a list of available memory files with their filenames and descriptions.

Return a list of filenames for the memories that will clearly be useful to Claude Code as it processes the user's query (up to 5). Only include memories that you are certain will be helpful based on their name and description.

  • If you are unsure if a memory will be useful in processing the user's query, then do not include it in your list. Be selective and discerning.
  • If there are no memories in the list that would clearly be useful, feel free to return an empty list.
  • If a list of recently-used tools is provided, do not select memories that are usage reference or API documentation for those tools (Claude Code is already exercising them). DO still select memories containing warnings, gotchas, or known issues about those tools — active use is exactly when those matter.
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. 11d ago First seen · 12 lines · 0 tokens per session scan A 13e51035c068

Subscribe to this mod's changes

Agent Prompt: Determine which memory files to attach is an agent published in the GitHub repository openonion/connectonion (1,480 stars, last pushed today), licensed Apache-2.0. It adds 23 tokens to every session and 236 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.