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.01191 |
| Opus 5 | $0.00010 | $0.00596 |
| Sonnet 5 | $0.00004 | $0.00238 |
| Haiku 4.5 | $0.00002 | $0.00119 |
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 5d 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 — 133 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">
Check if the code-analysis plugin is available:
```bash
ls "${HOME}/.claude/plugins/cache/" 2>/dev/null | grep -q "code-analysis"
```
If code-analysis is installed: proceed to step 3a.
If absent: proceed to step 3b.
</step>
<step number="3a" name="Delegate (code-analysis present)">
Map scope to investigation mode:
architecture → mode: architecture, skill: code-analysis:investigate
implementation → mode: implementation, skill: code-analysis:investigate
bug-hunt → mode: bug, skill: code-analysis:investigate
test-audit → mode: test, skill: code-analysis:investigate
comprehensive → skill: code-analysis:deep-analysis (no mode parameter — it has none)
Launch the agent:
Agent(
run_in_background: false,
description: """
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-analysis MCP tools (mcp__plugin_code-analysis_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-analysis:deep-analysis, which takes no
mode) all 4 modes above, synthesized into unified report
with cross-cutting observations.
""",
subagent_type: "code-analysis:detective"
)
</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.
- 5d ago First seen · 133 lines · 20 tokens per session scan A adf1db214fb2
investigate is a command published in the GitHub repository MadAppGang/magus (9 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 1,191 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-04.
Other commands, from other repositories
qa-changes
This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…
doctor
Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…
fix
Universal debugging and fix application with semantic code analysis.
doctor
Badi configuration validation. Checks all Badi components and produces a diagnostic report.
gh-issue-use-cypress
Like /gh-issue-use-browser, but pinned to the Cypress MCP — use when your project runs the Cypress MCP for browser automation. Example — /gh-issue-use-cypress "Composer > Save" saving toasts failure but the record persists.
auditar-cascading
Invoca cascading-failures-auditor — audita serviço para 5 triggers de cascade (sem timeout, retry sem jitter, sem circuit breaker, sem deadline, queue unbounded) e gera CASCADING-AUDIT.md.