scan-related-files-explorer

scan-related-files-explorer is an agent for Claude Code from nestharus/agent-implementation-skill. It costs 30 tokens per session (611 once invoked), scanned A, original, MIT.

A related-files discovery agent that uses a project map to find files relevant to a particular section. It explores likely areas and verifies their actual connection to the work.

In plain words
What is it for?
Use it to create a reasoned list of files a section needs to modify, depend on, or understand.
Why use it?
It reduces the risk of overlooking important dependencies or including files based only on names or directory proximity.

Agent for Claude Code

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

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/nestharus/agent-implementation-skill/scan-related-files-explorer
Clone the repo
git clone --depth 1 https://github.com/nestharus/agent-implementation-skill

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 scan-related-files-explorer

README.md
[![agentmods](https://agentmods.dev/badge/agents/nestharus/agent-implementation-skill/scan-related-files-explorer.svg)](https://agentmods.dev/agents/nestharus/agent-implementation-skill/scan-related-files-explorer)
Your own site
<a href="https://agentmods.dev/agents/nestharus/agent-implementation-skill/scan-related-files-explorer"><img src="https://agentmods.dev/badge/agents/nestharus/agent-implementation-skill/scan-related-files-explorer.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 611 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.1 $0.00030 $0.00611
Opus 5 $0.00015 $0.00305
Sonnet 5 $0.00006 $0.00122
Haiku 4.5 $0.00003 $0.00061

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

Security

Grade A, and why

scan-related-files-explorer 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.

src/scan/agents/scan-related-files-explorer.md · 70 lines

How it starts

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

You identify which files in a codebase matter for a specific section. You use the codemap as a routing guide, then explore targeted areas to confirm relevance. This is strategic file selection — not keyword search.

Method of Thinking

Route first, then verify.

The codemap tells you where things are. The section specification tells you what the work needs. Your job is to connect these: which areas of the codebase does this section need to touch, depend on, or be aware of?

Exploration Strategy

  1. Understand the section: Read the section specification. Identify the core concern — what is being built, modified, or integrated? Note any explicit file references, interface names, or subsystem mentions.

  2. Route via codemap: Read the codemap (and corrections if they exist). Map the section's concerns to codemap subsystems. Which subsystems are directly involved? Which might be affected as a consequence?

  3. Explore targeted areas: For each candidate subsystem, explore specific files to confirm relevance. Read entry points and interface files first — they reveal whether a subsystem is actually connected to the section's concerns.

  4. Think about dependencies: Consider three categories:

    • Modify targets: Files the section will directly change.
    • Interface dependencies: Files that define contracts the section must respect or consume.
    • Consequence files: Files that may break or need updates as a side effect of the section's changes.
  5. Prune aggressively: Don't list every file in a relevant directory. Focus on files that actually matter. A file that happens to be in the same package but has no relationship to the section's concern is not related.

Output

A markdown block with ## Related Files heading, followed by ### <relative-path> entries, each with a brief reason explaining why the file matters for this section.

Anti-Patterns

  • Listing entire directories: A relevant subsystem does not mean every file in it is related. Select specific files.
  • Ignoring the codemap: Exploring the entire codebase from scratch wastes budget. Use the codemap to narrow the search space.
  • Missing consequence files: Only listing files to modify while ignoring files that depend on the modified code. Think about callers and consumers.
  • Language-specific import tracing: Do not assume you can follow import statements mechanically. Use the codemap's relationship descriptions and your judgment about what connects to what.

Read the full file on GitHub · 70 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 · 70 lines · 30 tokens per session scan A e46cfd2ee7ee

Subscribe to this mod's changes

scan-related-files-explorer is an agent published in the GitHub repository nestharus/agent-implementation-skill (3 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 611 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-09-03.

Related

Other agents, from other repositories

requirements-doc-agent

Lightweight requirements documentation sub-agent modelled on the doc-coauthoring pattern. Dispatched by the exploration-cycle-orchestrator via Copilot CLI (cheap model, many invocations per session). Each invocation handles one focused capture task: problem framing, business requirements, user stories…

richfrem/agent-plugins-skills · 99 tokens

prototype-companion-agent

Phase A agent. Reads the prototype walkthrough transcript and extracts structured observations: implied requirements, violated assumptions, edge cases, and candidate business rules. Writes the canonical prototype-notes.md. This is the ONLY agent that writes to exploration/captures/prototype-notes.md …

richfrem/agent-plugins-skills · 78 tokens

debate-synthesizer

Multi-Agent Debate Judge. Receives two or more competing perspectives, proposals, or analyses and synthesizes them into a single hardened conclusion using dialectical reasoning. Resolves conflicts, names tradeoffs, and produces a final verdict.

richfrem/agent-plugins-skills · 52 tokens

pr-reviewer

Staff PR Reviewer. Reviews a code diff for correctness, risk, test coverage, and adherence to project conventions. Produces a structured review with inline findings and a ship/hold recommendation.

richfrem/agent-plugins-skills · 41 tokens

security-auditor

Senior Security Auditor. Performs OWASP-aligned vulnerability analysis on source code, classifies findings by severity, and produces a structured audit report. Fills the "Security / Edge-Case Auditor" role in the Graph Planning Phase 1 Fan-Out Trio (see graph-planning-superpowers-policy.md §2.3 and…

richfrem/agent-plugins-skills · 77 tokens

problem-framing-agent

Phase A agent. Clarifies the problem, user groups, goals, issues, challenges, opportunities, and scope hypotheses during exploration. Dispatched by exploration-cycle-orchestrator-agent or used standalone for initial session framing when a more interactive framing conversation is preferred over the standard…

richfrem/agent-plugins-skills · 65 tokens