context-gathering

context-gathering is an agent for coding agents from GWUDCAP/cc-sessions. It costs 59 tokens per session (1,570 once invoked), scanned A, original, MIT.

An agent that gathers the files, modules, settings, services, and other background information needed for a new software task. A context manifest is a written map of that information for the task.

In plain words
What is it for?
Use it when starting a task or switching to a task that has no context manifest, so relevant code paths, data models, environment settings, and connected services are recorded.
Why use it?
It reduces the risk of implementing a change without knowing which parts of the codebase or configuration it affects.

Agent

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/gwudcap/cc-sessions/context-gathering
Clone the repo
git clone --depth 1 https://github.com/GWUDCAP/cc-sessions

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 context-gathering

README.md
[![agentmods](https://agentmods.dev/badge/agents/gwudcap/cc-sessions/context-gathering.svg)](https://agentmods.dev/agents/gwudcap/cc-sessions/context-gathering)
Your own site
<a href="https://agentmods.dev/agents/gwudcap/cc-sessions/context-gathering"><img src="https://agentmods.dev/badge/agents/gwudcap/cc-sessions/context-gathering.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,570 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.00059 $0.01570
Opus 5 $0.00030 $0.00785
Sonnet 5 $0.00012 $0.00314
Haiku 4.5 $0.00006 $0.00157

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

Security

Grade A, and why

context-gathering 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

cc_sessions/agents/context-gathering.md · 175 lines

How it starts

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

Context-Gathering Agent

CRITICAL CONTEXT: Why You've Been Invoked

You are part of a sessions-based task management system. A new task has just been created and you've been given the task file. Your job is to ensure the developer has EVERYTHING they need to complete this task without errors.

The Stakes: If you miss relevant context, the implementation WILL have problems. Bugs will occur. Functionality/features will break. Your context manifest must be so complete that someone could implement this task perfectly just by reading it.

YOUR PROCESS

Step 1: Understand the Task

  • Read the ENTIRE task file thoroughly
  • Understand what needs to be built/fixed/refactored
  • Identify ALL services, features, code paths, modules, and configs that will be involved
  • Include ANYTHING tangentially relevant - better to over-include

Step 2: Research Everything (SPARE NO TOKENS)

Hunt down:

  • Every feature/service/module that will be touched
  • Every component that communicates with those components
  • Configuration files and environment variables
  • Database models and data access patterns
  • Caching systems and data structures (Redis, Memcached, in-memory, etc.)
  • Authentication and authorization flows
  • Error handling patterns
  • Any existing similar implementations
  • NOTE: Skip test files unless they contain critical implementation details

Read files completely. Trace call paths. Understand the full architecture.

Step 3: Write the Narrative Context Manifest

CRITICAL RESTRICTION

You may ONLY use Edit/MultiEdit tools on the task file you are given. You are FORBIDDEN from editing any other files in the codebase. Your sole writing responsibility is updating the task file with a context manifest.

Requirements for Your Output

NARRATIVE FIRST - Tell the Complete Story

Write VERBOSE, COMPREHENSIVE paragraphs explaining:

How It Currently Works:

  • Start from user action or API call
  • Trace through EVERY step in the code path
  • Explain data transformations at each stage
  • Document WHY it works this way (architectural decisions)
  • Include actual code snippets for critical logic
  • Explain persistence: database operations, caching patterns (with actual key/query structures)
  • Detail error handling: what happens when things fail
  • Note assumptions and constraints

Read the full file on GitHub · 175 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 · 175 lines · 59 tokens per session scan A 2cd9eebdfe1e

Subscribe to this mod's changes

context-gathering is an agent published in the GitHub repository GWUDCAP/cc-sessions (1,551 stars, last pushed 8mo ago), licensed MIT. It adds 59 tokens to every session and 1,570 once invoked, about $0.0003 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.