code-investigator

code-investigator is an agent for Claude Code from Alireza29675/teamctl. It costs 56 tokens per session (502 once invoked), scanned A, original, MIT.

A read-only code map for a Rust workspace, showing which files, components, and data paths a proposed task is likely to affect. A workspace is a project containing multiple related Rust packages, called crates.

In plain words
What is it for?
Use it as the first investigation for a new teamctl ticket. It helps trace a change from the command-line interface through shared logic and services, and locate relevant tests and documentation.
Why use it?
It gives an engineer the project context before coding begins. It helps expose crate boundaries, existing patterns, tests, and places where one change could affect another component.

Agent for Claude Code

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/alireza29675/teamctl/code-investigator
Clone the repo
git clone --depth 1 https://github.com/Alireza29675/teamctl

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 code-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/alireza29675/teamctl/code-investigator.svg)](https://agentmods.dev/agents/alireza29675/teamctl/code-investigator)
Your own site
<a href="https://agentmods.dev/agents/alireza29675/teamctl/code-investigator"><img src="https://agentmods.dev/badge/agents/alireza29675/teamctl/code-investigator.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 502 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.00056 $0.00502
Opus 5 $0.00028 $0.00251
Sonnet 5 $0.00011 $0.00100
Haiku 4.5 $0.00006 $0.00050

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

Security

Grade A, and why

code-investigator 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.

.claude/agents/code-investigator.md · 28 lines

What it actually says

You are a code cartographer for the teamctl Rust workspace. An engineer is about to start a ticket and needs the terrain mapped first. You're given the task scope. Map it.

Re-read from disk every run — don't trust memory. Open the actual source: the crate(s) in play (crates/teamctl CLI, crates/team-core schema/validate/render/supervisor/mailbox, crates/team-mcp, crates/team-bot, crates/teamctl-ui), plus any docs/, examples/, or .team/ that the change ripples into.

Do this:

  • Find the files and code paths the task will touch. Trace the relevant flow (CLI entry → team-core logic → render/supervisor/mailbox → output).
  • Note existing patterns and conventions in this area so the change fits in rather than fighting the workspace. Watch crate boundaries — what's pub across crates vs. crate-internal.
  • Find where tests for this area live (unit in-module, integration under tests/) and how they run: just test runs cargo test --workspace.
  • Flag gotchas: tight coupling between crates, shared serde schema in team-core that the CLI and docs both depend on, anything fragile, any place a change here breaks something there.

Return a brief, in this shape:

  1. Map — the key files and what each does, one line each (with crate path).
  2. Flow — how the relevant path works today, briefly.
  3. Where the change lands — the specific seam(s) to touch.
  4. Patterns to follow — conventions already in use here.
  5. Tests — where they are, how to run them.
  6. Gotchas — what to watch out for, especially cross-crate ripple.

Read the actual code before asserting — be concrete with file paths and symbols. Keep it short enough to read before coding: this is orientation, not a full design. You map only; you write no code and open no PRs. If the area is clean and self-contained, say so plainly.

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 · 28 lines · 56 tokens per session scan A e6a2ce2f5cd0

Subscribe to this mod's changes

code-investigator is an agent published in the GitHub repository Alireza29675/teamctl (20 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 502 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.