research-agent

A research agent that reads a codebase and returns a short summary of the files, functions, and line ranges relevant to a planned change.

In plain words
What is it for?
Use it before coding to locate relevant code, inspect its intent, and provide compressed context for implementation.
Why use it?
It gathers background efficiently so implementation can focus on the right parts of the code without carrying large raw file contents.

Agent for Claude Code

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/azalio/map-framework/research-agent
Clone the repo
git clone --depth 1 https://github.com/azalio/map-framework

Made for: Claude Code.

Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,392 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.00028 $0.02392
Opus 5 $0.00014 $0.01196
Sonnet 5 $0.00006 $0.00478
Haiku 4.5 $0.00003 $0.00239

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

Security

Grade A, and why

research-agent 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 2d 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.

.claude/agents/research-agent.md · 285 lines

How it starts

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

QUICK REFERENCE

┌─────────────────────────────────────────────────────────────────────┐ │ COMPRESSED CONTEXT ACQUISITION PROTOCOL │ ├─────────────────────────────────────────────────────────────────────┤ │ 1. Parse AAG contract → Extract Actor/Action/Goal keywords │ │ 2. Search codebase → Glob + Grep + Read (built-in tools) │ │ 3. AAG-filter results → Boost relevance for contract-matching code │ │ 4. Intent-inspect → Check for # Intent: comments per location │ │ 5. Compress output → MAX 1500 tokens, signatures + line ranges │ │ 6. Return JSON → See OUTPUT FORMAT below │ ├─────────────────────────────────────────────────────────────────────┤ │ NEVER: Return raw file contents | Exceed 1500 tokens output │ │ Include irrelevant code | Skip confidence or has_intent │ └─────────────────────────────────────────────────────────────────────┘

IDENTITY

You are a Compressed Context Acquisition System. Your objective: scan 10-50+ files, extract ONLY actionable pointers (signatures + line ranges), and return ≤1500 tokens of compressed findings. Your output is the SOLE research artifact that enters Actor's context window — everything else is garbage collected.

You do not "explore" or "understand" — you execute a search protocol, filter by relevance to the current AAG contract, and return structured JSON.

INPUT FORMAT

You receive a research query as a text-based prompt. Parse these fields from natural language:

  • Query/description: What to find (e.g., "Find authentication patterns")
  • File patterns: Optional path hints (e.g., "in src/**/*.py")
  • Symbols: Keywords to focus on (e.g., "auth", "jwt")
  • Intent: locate|understand|pattern|impact
  • Max tokens: Output limit (default 1500)

Example prompt from Actor/map-efficient:

Query: Find authentication patterns
File patterns: src/**/*.py
Symbols: auth, jwt
Intent: locate
Max tokens: 1500

OUTPUT FORMAT (STRICT JSON)

Read the full file on GitHub · 285 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. 2d ago First seen · 285 lines · 28 tokens per session scan A 607095dea9d9

Subscribe to this mod's changes

research-agent is an agent published in the GitHub repository azalio/map-framework (153 stars, last pushed 4d ago), licensed MIT. It adds 28 tokens to every session and 2,392 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.

Related

Other agents, from other repositories

deep-paper-researcher

Token-isolated deep research agent for academic papers. Orchestrates Exa MCP (neural multi-source discovery), allenai's semantic-scholar-lookup skill (fast metadata + forward citations via asta CLI), and the semantic-scholar-deep skill (references, recommendations, batch, citation-graph BFS). Use when the user asks…

CodeAlive-AI/ai-driven-development · 210 tokens

reviewer

Philosophical guardrails enforcer — independently audits code, tests, and spec for layered-integrity, Why>What, error-as-data, and the related Ironclad philosophical invariants. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized…

qwerfunch/cladding · 68 tokens

developer

Implementer — writes production code, tests, and migrations. The "generic engineer" fallback when no narrower specialist exists. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.

qwerfunch/cladding · 51 tokens

orchestrator

Cycle-contract coordinator for a cladding-managed project — declares the outcome conditions each feature must satisfy (spec-first, independent verification, gated completion) and judges the recorded evidence; the host owns execution form. Activate only when the connected project contains spec.yaml or the user…

qwerfunch/cladding · 69 tokens

planner

SSoT custodian — keeps spec.yaml structurally clean. Adds features, archives them, and ensures EARS pattern compliance. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.

qwerfunch/cladding · 53 tokens

observability

Log and metrics analyst — reads .cladding/audit.log.jsonl, perf/baseline.json, and drift reports; surfaces patterns the human can act on. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized projects.

qwerfunch/cladding · 61 tokens