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.
npx agentmods add commands/madappgang/magus/analyzegit 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/analyze)<a href="https://agentmods.dev/commands/madappgang/magus/analyze"><img src="https://agentmods.dev/badge/commands/madappgang/magus/analyze.svg" alt="Measured on agentmods" 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 | $0.00031 | $0.01017 |
| Opus 5 | $0.00015 | $0.00508 |
| Sonnet 5 | $0.00006 | $0.00203 |
| Haiku 4.5 | $0.00003 | $0.00102 |
Grade A, and why
analyze 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 — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mission
Dispatch the code-analysis:detective agent at one question about this codebase. The answer
comes back as file:line locations and the flow between them. Nothing is modified.
Analysis request
$ARGUMENTS
When to use it
- Architecture — how is authentication implemented, what does the data layer look like
- Location — where is the user registration logic, which file handles payments
- Flow — follow a request from endpoint to database
- Bugs — why login fails, where an error originates
- Patterns — where API calls are made, which components use a given store
- Dependencies — what uses this service, what breaks if it changes
Step 1 — read the request
Parse three things out of $ARGUMENTS before dispatching:
- What do they want to understand?
- Which functionality does it concern?
- What is the context — debugging, learning, or refactoring? The same question wants a different answer in each.
A specific question beats a broad one. "Analyze the codebase" buys a tour; "where is the email validation logic" buys a file and a line number. If the request is broad enough that the investigation would be spent on orientation, narrow it first — ask which part matters, or state the narrower question you are about to answer and why.
Step 2 — dispatch the detective
Agent(
subagent_type: "code-analysis:detective",
run_in_background: false,
description: "Investigate [brief description]",
prompt: `
Investigate the following in the codebase:
[the request, restated as one specific question]
Context: [debugging | learning | refactoring]
Working directory: [current working directory]
Return:
1. Exact file:line locations
2. The code at those locations, quoted
3. How the mechanism works
4. Related files and dependencies, inbound and outbound
5. A flow diagram when the path crosses more than two or three hops
Name the method behind each finding, and say what the configured engine could not answer.
`
)
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 · 127 lines · 31 tokens per session scan A 387b1a42bedd
analyze is a command published in the GitHub repository MadAppGang/magus (9 stars, last pushed yesterday), licensed MIT. It adds 31 tokens to every session and 1,017 once invoked, about $0.0002 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-31.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.