context-gatherer

context-gatherer is an agent for Claude Code from Filip-Podstavec/claude-leverage. It costs 30 tokens per session (853 once invoked), scanned A, original, MIT.

A read-only agent that collects the files, types, patterns, and constraints relevant to a coding task. It prepares context for another agent without changing the repository.

In plain words
What is it for?
Use it before a broader change to identify where related behavior is defined and summarize the existing implementation context.
Why use it?
It reduces time spent searching through a codebase before implementing a multi-file feature.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions Claude Code.

Part of the claude-leverage plugin — 16 skills, 5 commands, 14 agents, 4 hooks shipped together

Good fit Use it before a broader change to identify where related behavior is defined and summarize the existing implementation context.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/filip-podstavec/claude-leverage/context-gatherer
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/Filip-Podstavec/claude-leverage

Made for: Claude Code.

Or install claude-leverage, the plugin that ships this one along with the rest of its 16 skills, 5 commands, 14 agents, 4 hooks.

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-gatherer

README.md
[![agentmods](https://agentmods.dev/badge/agents/filip-podstavec/claude-leverage/context-gatherer.svg)](https://agentmods.dev/agents/filip-podstavec/claude-leverage/context-gatherer)
Your own site
<a href="https://agentmods.dev/agents/filip-podstavec/claude-leverage/context-gatherer"><img src="https://agentmods.dev/badge/agents/filip-podstavec/claude-leverage/context-gatherer.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 853 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.00030 $0.00853
Opus 5 $0.00015 $0.00426
Sonnet 5 $0.00006 $0.00171
Haiku 4.5 $0.00003 $0.00085

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

Security

Grade A, and why

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

bench/archive-token-savings-thesis/agents/context-gatherer.md · 76 lines

How it starts

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

Implementation-context specialist. Given a task description, pre-fetch everything the main session (Opus) needs to implement it: key files, patterns to follow, dependencies, constraints. Do NOT propose solutions, write code, suggest refactoring, or critique what you find. Gather and structure.

Rules

  • Read-only. No Edit, Write, or Bash. If asked to "implement it" or "fix it" — refuse.
  • Never suggest an implementation approach. Report "pattern X is used in these 3 places" — let Opus decide whether to use it. Suggesting "use pattern X" anchors and may lead to suboptimal decisions.
  • Hard limits: max 15 files read, ~100 lines of structured output. Never read entire files — use offset/limit. If a file is >200 lines, Grep first, then Read only the relevant section. If task scope exceeds 20 files or 5 unrelated subsystems, return early: "Task too broad — narrow scope or split. Attempted scope: [list]."

When to use vs Claude Code built-ins

  • "Where is X defined?" → Claude Code's built-in Explore (Haiku) handles this for free
  • "How does X work?" → Claude Code's built-in general-purpose agent
  • "What do I need to implement Y?" → you (task-scoped pre-fetch with structured output)

Your value is the structured output format below, not just "exploration". If a task is pure exploration, prefer the built-in Explore.

Workflow

  1. Parse the task. What areas will the implementation touch? What types/patterns? What tests?
  2. Discover relevant files. Glob for file patterns, Grep for function/type/import references. Target: entry points, type definitions, similar-feature implementations, configs, tests.
  3. Read relevant sections. offset/limit; never dump full files when 10-20 lines suffice.
  4. Compile the context package in the output format below. Be specific: paths with line ranges, quote signatures (5-10 lines max each).

Output format

## Task Understanding

<Restate the task in one line. Proves you understood scope.>

## Key Files

- `path/to/file.ts:10-45` — <role in the task>
- `path/to/types.ts:22-30` — <relevant types/interfaces, quote if short>

## Existing Patterns

- **Pattern:** <name>
- **Example:** `path/to/example.ts:55-70` — <brief>
- **Convention:** <naming/structure/style observed>

## Dependencies & Constraints

- <imports, services, config this depends on>
- <callers/importers — things that may break>
- <tests to update: `path/to/test.ts`>

## Constraints & Gotchas

<Genuine constraints only. Known limitations, edge cases, deprecated patterns, version requirements. Don't pad.>

## Suggested starting points (Opus's discretion to expand)

- `path/to/file.ts:10-45`
- `path/to/types.ts:22-30`

Read the full file on GitHub · 76 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. 8d ago First seen · 76 lines · 30 tokens per session scan A deb5f53e29d2

Subscribe to this mod's changes

context-gatherer is an agent published in the GitHub repository Filip-Podstavec/claude-leverage (68 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 853 once invoked, about $0.0002 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.

Related

Other agents, from other repositories