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.
git clone --depth 1 https://github.com/MadAppGang/magusWrote 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.
[](https://agentmods.dev/commands/madappgang/magus/investigate)<a href="https://agentmods.dev/commands/madappgang/magus/investigate"><img src="https://agentmods.dev/badge/commands/madappgang/magus/investigate/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.
<a href="https://agentmods.dev/commands/madappgang/magus/investigate"><img src="https://agentmods.dev/badge/commands/madappgang/magus/investigate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00020 | $0.01334 |
| Opus 5.5 | $0.00008 | $0.00534 |
| Sonnet 5.5 | $0.00004 | $0.00267 |
| Haiku 4.5 | $0.00002 | $0.00133 |
Grade A, and why
investigate 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<user_request>$ARGUMENTS</user_request>
<critical_override> THIS COMMAND OVERRIDES THE CLAUDE.md TASK ROUTING TABLE. WHY: This is a READ-ONLY orchestrator. It must NEVER self-handle investigation work. RULE: ALL investigation must be delegated via Agent tool to the resolved agent. NEVER: Read files, trace code, or analyze architecture inline. NOTE: No autonomy question — investigation is inherently read-only and non-destructive. </critical_override>
question: "What do you want to investigate?"
header: "Investigation Scope"
options:
- label: "Architecture"
description: "How system components connect and why — map the big picture"
- label: "Implementation"
description: "How a specific feature or flow works — trace the code path"
- label: "Bug hunt"
description: "Trace error origins and find where failures occur"
- label: "Test coverage"
description: "What is and isn't tested — find coverage gaps"
- label: "Comprehensive"
description: "Full multi-perspective analysis — all of the above"
Inference rules (skip AskUserQuestion if match is confident):
- "how does X work", "explain", "understand", "trace" → implementation
- "architecture", "design", "components", "structure", "system" → architecture
- "error", "crash", "why does", "broken", "bug", "fail" → bug-hunt
- "test", "coverage", "tested", "untested", "gaps" → test-audit
- "everything", "full", "comprehensive", "deep", "complete" → comprehensive
</step>
<step number="2" name="Plugin Check">
Look for `code-search:analyze` in the Agent tool's list of available agent types.
That list is the only authority: it is what this session actually loaded, after
scope, enablement and version resolution. Do not check the disk instead. The plugin
cache is laid out `cache/<marketplace>/<plugin>/<version>`, and a cached plugin can
be disabled or installed after this session started.
If `code-search:analyze` is listed: proceed to step 3a.
If it is not listed: proceed to step 3b.
</step>
<step number="3a" name="Delegate (code-search:analyze listed)">
Map scope to investigation mode:
architecture → mode: architecture, skill: code-search:investigate
implementation → mode: implementation, skill: code-search:investigate
bug-hunt → mode: bug, skill: code-search:investigate
test-audit → mode: test, skill: code-search:investigate
comprehensive → skill: code-search:deep-analysis (no mode parameter — it has none)
Launch the agent:
Agent(
subagent_type: "code-search:analyze",
run_in_background: false,
description: "Investigate: {target in three or four words}",
prompt: """
Investigate: {$ARGUMENTS}
Investigation mode: {mode}
Load skill: {skill} and use mode={mode}.
RULES:
- This is READ-ONLY analysis. Do not modify any files.
- Use the code-search MCP tools (mcp__plugin_code-search_ca__*) for semantic code navigation.
- Produce a clear investigation report with findings and evidence.
FOCUS BY MODE:
- architecture: system boundaries, component relationships, data flows,
architectural patterns, PageRank analysis of core abstractions.
- implementation: entry points, call chains, data transformations,
exact file/line evidence for each claim.
- bug: error origins, failure conditions, blast radius,
reproduction steps, root cause identification.
- test: what is tested, what is not, coverage gaps,
risky untested paths, test quality assessment.
- (comprehensive scope routes to code-search:deep-analysis, which takes no
mode) all 4 modes above, synthesized into unified report
with cross-cutting observations.
"""
)
</step>
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.
- 2mo ago Changed · -1 lines 0181dbd946f5
- 2mo ago Changed · +8 lines 8287474bd5ac
- 2mo ago Changed 939510d1a521
- 2mo ago First seen · 133 lines · 20 tokens per session scan A adf1db214fb2
investigate is a command published in the GitHub repository MadAppGang/magus (16 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 1,334 once invoked, about $0.0001 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-09-04.
investigate compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| investigateMadAppGang/magus | Command | 16 | today | MIT | A | 20 | Claude Code |
| qa-changesOpenHands/extensions | Command | 190 | today | MIT | A | 63 | Claude Code |
| auditar-cascadingluanpdd/kit-mcp | Command | 5 | yesterday | MIT | A | 54 | Claude Code |
| react-nativegetsentry/toolkit | Command | 977 | yesterday | none | A | 0 | Claude Code |
| doctordoncheli/don-cheli-sdd | Command | 59 | 3mo ago | Apache-2.0 | A | 76 | Claude Code |
| doctorfatihkan/badi | Command | 8 | 1mo ago | MIT | A | 0 | Claude Code |
| fixstefan-jansen/claude-code-toolkit | Command | 101 | 4mo ago | MIT | A | 9 | Claude Code |