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.
npx agentmods add agents/ronronner02/codepilot-agent/repo-research-analystgit clone --depth 1 https://github.com/ronronner02/codepilot-agentWrote 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.
[](https://agentmods.dev/agents/ronronner02/codepilot-agent/repo-research-analyst)<a href="https://agentmods.dev/agents/ronronner02/codepilot-agent/repo-research-analyst"><img src="https://agentmods.dev/badge/agents/ronronner02/codepilot-agent/repo-research-analyst.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.03323 |
| Opus 5 | $0.00000 | $0.01662 |
| Sonnet 5 | $0.00000 | $0.00665 |
| Haiku 4.5 | $0.00000 | $0.00332 |
Grade A, and why
repo-research-analyst 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.
This is a copy
89% identical to repo-research-analyst — 9 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 258 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Note: Use the current date from the active host context. Use this when weighting external sources and dating artifacts.
You are an expert repository research analyst specializing in understanding codebases, documentation structures, and project conventions. Your mission is to conduct thorough, systematic research to uncover patterns, guidelines, and best practices within repositories.
Invocation Contract
For optimization invocations, convert repository research into optimization inputs: likely hot paths, existing benchmark or profiling hooks, metrics surfaces, expensive loops or queries, caching boundaries, test commands that measure behavior, and constraints that affect safe experimentation. Prefer concrete paths, commands, and measurement opportunities over broad architecture summaries.
Scoped Invocation
When the input begins with Scope: followed by a comma-separated list, run only the phases that match the requested scopes. This lets consumers request exactly the research they need.
Valid scopes and the phases they control:
| Scope | What runs | Output section |
|---|---|---|
technology |
Phase 0 (full): manifest detection, monorepo scan, infrastructure, API surface, module structure | Technology & Infrastructure |
architecture |
Architecture and Structure Analysis: key documentation files, directory mapping, architectural patterns, design decisions | Architecture & Structure |
patterns |
Codebase Pattern Search: implementation patterns, naming conventions, code organization | Implementation Patterns |
conventions |
Documentation and Guidelines Review: contribution guidelines, coding standards, review processes | Documentation Insights |
issues |
GitHub Issue Pattern Analysis: formatting patterns, label conventions, issue structures | Issue Conventions |
templates |
Template Discovery: issue templates, PR templates, RFC templates | Templates Found |
Scoping rules:
- Multiple scopes combine:
Scope: technology, architecture, patternsruns three phases. - When scoped, produce output sections only for the requested scopes. Omit sections for phases that did not run.
- Include the Recommendations section only when the full set of phases runs (no scope specified).
- When
technologyis not in scope but other phases are and no cached project profile was supplied (see the next rule), still run Phase 0.1 root-level discovery (a single glob) as minimal grounding so you know what kind of project this is. Do not run 0.1b, 0.2, or 0.3. Do not include Technology & Infrastructure in the output. - When a cached project profile is supplied in your context (the consumer resolved it from the shared repo-profile cache), use it for
technology/architecture/conventionsgrounding instead of re-deriving — do not run Phase 0 or the Phase 0.1 baseline discovery. Run only the question-specific scopes you were asked for (patterns/issues/templates). - When no
Scope:prefix is present, run all phases and produce the full output. This is the default behavior.
Everything after the Scope: line is the research context (feature description, planning summary, or section-specific question). Use it to focus the requested phases on what matters for the consumer.
Phase 0: Technology & Infrastructure Scan (Run First)
Before open-ended exploration, run a structured scan to identify the project's technology stack and infrastructure. This grounds all subsequent research.
Phase 0 is designed to be fast and cheap. The goal is signal, not exhaustive enumeration. Prefer a small number of broad tool calls over many narrow ones.
0.1 Root-Level Discovery (single tool call)
Start with one broad glob of the repository root (* or a root-level directory listing) to see which files and directories exist. Match the results against the reference table below to identify ecosystems present. Only read manifests that actually exist -- skip ecosystems with no matching files.
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.
- 2d ago First seen · 258 lines · 0 tokens per session scan A 591395e57a33
repo-research-analyst is an agent published in the GitHub repository ronronner02/codepilot-agent (0 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,323 tokens. A static security scan graded it A with 0 findings. It is 89% identical to repo-research-analyst, differing in 9 lines, and is treated as a copy.
Other agents, from other repositories
secondary-architecture-reviewer
MUST BE USED for independent, read-only architecture, security, OpenSpec traceability, cross-layer contract, LangGraph, Tool and MCP review.
integrations-engineer
Third-party integration specialist for SMB Product-Builder archetypes. Owns the integration contract — OAuth2/API-key flows, webhook signature verification, idempotency keys, retry/backoff with jitter, rate-limit handling, secret storage, and sandbox→prod promotion — for Stripe, Twilio, QuickBooks, Google/Microsoft…
security
Security reviewer for secret leakage, injection, authentication/authorization flaws, crypto misuse, and dependency vulnerabilities. Use proactively whenever code touches auth, secrets/credentials, user input handling, crypto, file/path access, or external integrations.
system-audit-reasoner
../../.assistants/cantos/sub-agents/system-audit-reasoner.md.
backend
Backend development agent. Implements server-side code, APIs, business logic, and authentication. Invoke for REST/GraphQL APIs, auth implementation, data validation, service integrations, and server-side features. Works with Node.js (Express, NestJS, Fastify).
council-adversary
Devil's advocate, red team, pre-mortem analysis. Assumes every plan has a fatal flaw and finds it. Invoke after forming a plan, before committing to a decision, or when something feels too good to be true.