detective

detective is an agent for Claude Code from nxtg-ai/forge-plugin. It costs 473 tokens per session (3,774 once invoked), scanned A, original, MIT.

A codebase health auditor that examines testing, security, documentation, architecture, and Git practices, then produces an evidence-backed report with scores and recommendations.

In plain words
What is it for?
Use it to assess an unfamiliar project, find quality gaps, and prioritize improvements using file paths, line numbers, and metrics.
Why use it?
It helps you see which problems matter most instead of sorting through separate tool outputs without context.

Agent for Claude Code

Written for Claude Code: background in frontmatter. Also seen: model in frontmatter; names the TodoWrite tool; positional $N argument.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit Use it to assess an unfamiliar project, find quality gaps, and prioritize improvements using file paths, line numbers, and metrics.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/nxtg-ai/forge-plugin/detective
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.

Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 commands, 33 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 detective

README.md
[![agentmods](https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/detective/github.svg)](https://agentmods.dev/agents/nxtg-ai/forge-plugin/detective)
Your own site
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/detective"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/detective/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for detective

Your own site · 80×15
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/detective"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/detective.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 473 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,774 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00473 $0.03774
Opus 5.5 $0.00189 $0.01510
Sonnet 5.5 $0.00095 $0.00755
Haiku 4.5 $0.00047 $0.00377

Measured 1mo ago against content hash 30ae349e45bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

detective 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 1mo 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/nxtg-forge/agents/detective.md · 502 lines

How it starts

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

Forge Detective Agent

You are the Forge Detective - the master analyzer for NXTG-Forge 2.0, specializing in project understanding, gap analysis, and health assessment.

Orchestrator MCP Integration

Enrich your analysis with forge-orchestrator data when available:

  • forge_get_health — Orchestrator's governance health check (docs, architecture, task health, knowledge, drift). L2 only.
  • forge_get_tasks — Task board state for project activity assessment
  • forge_get_knowledge — Past findings, decisions, and patterns
  • forge_check_drift — Vision alignment analysis
  • forge_capture_knowledge — Record your analysis findings (category: "research")

If the orchestrator (forge binary) is not available, fall back to the plugin's always-available Node MCP tool forge_get_governance_health for the 0-100 health score, then proceed with local analysis (drift will be unavailable).

Your Role

You are Sherlock Holmes for codebases. Your mission is to:

  • Detect project structure and technology stacks
  • Perform comprehensive gap analysis
  • Identify health issues and opportunities
  • Provide actionable insights with clear recommendations
  • Surface hidden patterns and potential problems

When You Are Invoked

You are activated by the Forge Orchestrator when:

  • User selects Option 4: Health Check
  • User selects Option 3: Soundboard for project analysis
  • Initial project activation (technology detection)
  • Ad-hoc analysis requests

Your Analysis Framework

1. Project Structure Analysis

Examine the codebase structure:

# Get project layout
find . -type f -name "*.py" -o -name "*.js" -o -name "*.ts" -o -name "*.go" | head -50

# Analyze directory structure
tree -L 3 -I "node_modules|venv|__pycache__|.git"

# Check for standard files
ls -la | grep -E "(README|LICENSE|setup.py|package.json|go.mod|Cargo.toml)"

Report:

  • Primary language(s)
  • Framework(s) detected
  • Project structure pattern (monolith, microservices, modular)
  • Build system
  • Dependency management

Read the full file on GitHub · 502 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. 1mo ago Changed · +370 lines · +473 tokens per session 30ae349e45bb
  2. 1mo ago First seen · 132 lines · 0 tokens per session scan A 1d3343ad405d

Subscribe to this mod's changes

detective is an agent published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 2d ago), licensed MIT. It adds 473 tokens to every session and 3,774 once invoked, about $0.0019 per session on Opus 5.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-31.

Related

Other agents, from other repositories

code-archaeologist

Expert in legacy code, refactoring, and understanding undocumented systems.

nth5693/gemini-kit · 19 tokens

skeptic

Verifies factual claims in tech-spec or tasks against actual codebase. Detects mirages: non-existent files, functions, dependencies, patterns, name mismatches. Orchestrator specifies feature path. Agent reads documents and checks every claim in code. Use during tech-spec validation (phase 2, step 5) and task…

stepanenkoviktor0110-boop/ai-dev-methodology-codex · 95 tokens

build-failure-analyst

Expert build-failure analyst for .NET / MSBuild repositories. Invoke when a build produced a binary log (.binlog) and you need to identify the root cause(s) of failure, group related errors, and propose concrete fixes. Queries the binlog live through the binlog-mcp MCP server (containerised — see the calling…

dotnet/skills · 108 tokens

predictive-analyst

Precognition agent. Analyzes code changes to predict impact, regressions, and conflicts BEFORE they happen. Uses dependency graphs and historical data.

softspark/ai-toolkit · 35 tokens

code-reviewer-bug

name: code-reviewer-bug description: Specialized code reviewer for bug patterns — null safety, race conditions, resource leaks, logic and error-handling defects. Returns scored findings (severity × impact × confidence). skills: code-review model: inherit.

zxpmail/ReqForge · 0 tokens

silent-failure-hunter

Error handling review agent for CI: identifies silent failures, empty catch blocks, swallowed errors, overly broad exception handling, and missing user feedback in PR diffs.

rube-de/cc-skills · 38 tokens