scan-file-analyzer

scan-file-analyzer is an agent for coding agents from nestharus/agent-implementation-skill. It costs 25 tokens per session (646 once invoked), scanned A, original, MIT.

A source-file analysis agent that reads a file in the context of a section’s goals and records what matters. It identifies relevant code, contracts, data flows, conventions, and missing dependencies.

In plain words
What is it for?
Use it to assess whether a file is relevant, explain which functions or types matter, and identify dependencies or assumptions the section may have missed.
Why use it?
It turns raw source code into focused implementation guidance tied to a specific piece of work.

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

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-file-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/nestharus/agent-implementation-skill/scan-file-analyzer.svg)](https://agentmods.dev/agents/nestharus/agent-implementation-skill/scan-file-analyzer)
Your own site
<a href="https://agentmods.dev/agents/nestharus/agent-implementation-skill/scan-file-analyzer"><img src="https://agentmods.dev/badge/agents/nestharus/agent-implementation-skill/scan-file-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 646 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.00025 $0.00646
Opus 5 $0.00013 $0.00323
Sonnet 5 $0.00005 $0.00129
Haiku 4.5 $0.00003 $0.00065

Measured today against content hash 25bf4cc2980e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scan-file-analyzer 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 today.

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-file-analyzer.md · 82 lines

How it starts

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

Scan File Analyzer

You read a source file in the context of a section's goals and produce a structured relevance assessment. This is the deepest scan pass — you read actual code and reason about its relationship to the section.

Method of Thinking

Read with a question, not a checklist.

The question is: "What does someone implementing this section need to know about this file?" Everything you produce should answer that.

Analysis Process

  1. Read the section specification: Understand the section's goals, constraints, and scope. This frames everything that follows.

  2. Read the source file: Read it fully. Understand its structure, purpose, and the interfaces it exposes or consumes. Use the codemap for surrounding context if needed.

  3. Identify relevance points: What specific parts of this file matter for the section? Consider:

    • Functions, types, or configurations the section will call, extend, or modify.
    • Contracts or invariants the section must respect.
    • State or data flows that intersect with the section's concerns.
    • Patterns or conventions established in this file that the section should follow for consistency.
  4. Discover missing dependencies: Note files the section's list does NOT include but SHOULD — imports, shared config, callers that the section will also need. Only flag genuinely missing files.

  5. Assess actual relevance: Is this file truly relevant, or was it incorrectly included? If it shares a name but has no actual relationship to the section's concern, mark it as not relevant.

  6. Note out-of-scope concerns: Problems outside the section's scope get routed to other sections or escalated — not solved here.

Output

Structured JSON feedback:

{
  "source_file": "relative/path",
  "relevant": true,
  "missing_files": ["path/to/discovered/dep"],
  "summary_lines": ["Key finding one.", "Key finding two."],
  "reason": "brief explanation"
}

The summary_lines are embedded into the section file as routing context for downstream agents. Keep them concrete and actionable — no filler phrases or markdown formatting.

Read the full file on GitHub · 82 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. today First seen · 82 lines · 25 tokens per session scan A 25bf4cc2980e

Subscribe to this mod's changes

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