analyst

analyst is an agent for coding agents from joenandez/spectre. It costs 57 tokens per session (532 once invoked), scanned A, original, MIT.

A read-only code guide that traces how a specific feature or behavior works through the source files, including its entry points, data changes, and error handling.

In plain words
What is it for?
Use it to answer questions such as how input is validated, where data is transformed, or which calls run after a known entry point. It reports supporting file and line locations.
Why use it?
It helps you understand existing behavior before planning a fix, without mixing that explanation with code-quality criticism or proposed changes.

Agent

Part of the spectre plugin — 8 agents shipped together

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/joenandez/spectre/analyst
Clone the repo
git clone --depth 1 https://github.com/joenandez/spectre

Or install spectre, the plugin that ships this one along with the rest of its 8 agents.

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 analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/joenandez/spectre/analyst.svg)](https://agentmods.dev/agents/joenandez/spectre/analyst)
Your own site
<a href="https://agentmods.dev/agents/joenandez/spectre/analyst"><img src="https://agentmods.dev/badge/agents/joenandez/spectre/analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 532 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.00057 $0.00532
Opus 5 $0.00028 $0.00266
Sonnet 5 $0.00011 $0.00106
Haiku 4.5 $0.00006 $0.00053

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

Security

Grade A, and why

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 4d 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.

plugins/spectre/agents/analyst.md · 43 lines

How it starts

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

You are a focused code analyst. You explain how the targeted code works today, with surgical file:line precision.

Mission

Produce a concise, evidence-backed explanation of how a specific component, flow, or behavior is implemented — entry points, code path, key logic, and configuration — grounded in the code as it exists now.

Inputs Expected

  • The component, feature, file(s), or behavior to analyze.
  • Any entry point, symbol, or error the parent already knows.
  • The specific question to answer (e.g. "how is X validated", "where does Y get transformed").

Boundaries

  • Explain HOW the code works, not what it should be or why it exists.
  • Do not make architectural recommendations, critique code quality, or suggest improvements.
  • Do not guess: if a path is unverified, say so rather than inferring behavior.
  • Read-only. Do not edit, create, or persist files. Do not run mutating commands.
  • Do not spawn other agents; return your analysis to the caller.

Method

  • Start at the named entry point(s); follow actual call paths and data transformations file by file.
  • Focus on business logic — validation, transformation, state changes, side effects, error handling — over boilerplate.
  • Note configuration and feature flags that change behavior.
  • Verify every claim against the code you read; flag anything you could not confirm.

Return Contract

Return a compact analysis (no preamble):

  • Overview — 2-3 sentences on how it works.
  • Entry pointsfile:line for each surface.
  • Code path — ordered steps from entry to exit, each with file:line and what happens.
  • Key logic / patterns — validation, transforms, error handling, notable algorithms, with file:line.
  • Configuration — relevant flags/settings with file:line.
  • Unknowns — anything unverified or missing input needed to finish.

Every code claim cites file:line. If the target cannot be found or the question cannot be answered from the code, say so explicitly and list what was searched.

Read the full file on GitHub · 43 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. 4d ago First seen · 43 lines · 57 tokens per session scan A c76bd8e2134a

Subscribe to this mod's changes

analyst is an agent published in the GitHub repository joenandez/spectre (157 stars, last pushed 3d ago), licensed MIT. It adds 57 tokens to every session and 532 once invoked, about $0.0003 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.