mpga-diagnose

mpga-diagnose is a skill for Claude Code from benrben/MPGA. It costs 26 tokens per session (798 once invoked), scanned A, original, MIT.

A read-only investigation of code that looks for bugs, quality problems, performance concerns, and maintenance risks.

In plain words
What is it for?
Use it to diagnose selected files, recent changes, or the current code area without modifying the code.
Why use it?
It compares implementation with its documented behavior and checks boundary cases, errors, types, and asynchronous code for mistakes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mpga plugin — 18 skills, 26 commands, 3 agents shipped together

Good fit Use it to diagnose selected files, recent changes, or the current code area without modifying the code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/benrben/mpga/diagnose
View source ↗ benrben/MPGA
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.

Any agent
npx skills add benrben/MPGA --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/benrben/MPGA

Made for: Claude Code.

Or install mpga, the plugin that ships this one along with the rest of its 18 skills, 26 commands, 3 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 mpga-diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/benrben/mpga/diagnose/github.svg)](https://agentmods.dev/skills/benrben/mpga/diagnose)
Your own site
<a href="https://agentmods.dev/skills/benrben/mpga/diagnose"><img src="https://agentmods.dev/badge/skills/benrben/mpga/diagnose/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 mpga-diagnose

Your own site · 80×15
<a href="https://agentmods.dev/skills/benrben/mpga/diagnose"><img src="https://agentmods.dev/badge/skills/benrben/mpga/diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 798 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.00026 $0.00798
Opus 5.5 $0.00010 $0.00319
Sonnet 5.5 $0.00005 $0.00160
Haiku 4.5 $0.00003 $0.00080

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

Security

Grade A, and why

mpga-diagnose 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.

mpga-plugin/skills/diagnose/SKILL.md · 92 lines

How it starts

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

diagnose

Find bugs and quality issues by deploying bug-hunter and optimizer agents in parallel.

Trigger: User wants to find bugs, quality issues, or code problems. Also triggered by: "diagnose this code", "find bugs", "what's wrong with this", "quality check", "code health".

Delegation

Deploy bug-hunter + optimizer agents in parallel:

  • bug-hunter agent — checks specifications vs implementation for correctness issues.
  • optimizer agent — checks code quality, performance, and maintainability.

Protocol

  1. Identify target — determine what to diagnose:

    • If user specifies files/directories, use those
    • If git diff has changes, diagnose the changed files
    • If no target specified, diagnose the current scope or most recently changed files
  2. Spawn bug-hunter agent (read-only) to check specifications vs implementation:

    • Compare function behavior against documented specifications
    • Check edge cases and boundary conditions
    • Verify error handling paths
    • Look for logic errors, off-by-one, null/undefined risks
    • Check type safety and contract violations
    • Verify async/await correctness and race conditions
  3. Spawn optimizer agent (read-only) in parallel to check code quality:

    • Cyclomatic complexity analysis
    • Duplicated code detection
    • Dead code identification
    • Performance anti-patterns (N+1 queries, unnecessary re-renders, etc.)
    • Memory leak patterns
    • Dependency coupling analysis
  4. Collect results from both agents and produce unified diagnosis report:

    # DIAGNOSIS REPORT
    
    ## Bugs Found (from bug-hunter)
    | # | File:Line | Severity | Description | Evidence |
    |---|-----------|----------|-------------|----------|
    | 1 | ...       | CRITICAL | ...         | [E] ...  |
    
    ## Quality Issues (from optimizer)
    | # | File:Line | Severity | Description | Evidence |
    |---|-----------|----------|-------------|----------|
    | 1 | ...       | HIGH     | ...         | [E] ...  |
    
    ## Priority-Ranked Fix List
    1. [CRITICAL] ... — estimated effort: Xh
    2. [HIGH] ... — estimated effort: Xh
    3. [MEDIUM] ... — estimated effort: Xh
    
    ## Summary
    - Total findings: N
    - CRITICAL: X | HIGH: Y | MEDIUM: Z | LOW: W
    - Estimated total effort: Xh
    

Read the full file on GitHub · 92 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. 2mo ago First seen · 92 lines · 26 tokens per session scan A 575ff00a1669

Subscribe to this mod's changes

mpga-diagnose is a skill published in the GitHub repository benrben/MPGA (5 stars, last pushed 7mo ago), licensed MIT. It adds 26 tokens to every session and 798 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-08-31.

Related

mpga-diagnose compared with skills from other repositories

mpga-diagnose next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mpga-diagnosebenrben/MPGASkill57mo agoMITA26Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7kyesterdayMITA71Claude Code, Codex
incident-response-incident-responsermyndharis/antigravity-skillsSkill2.0k4d agoMITA36Claude Code, Codex
cwv-optimizeradobe/skillsSkill325todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
diagnosing-missing-recordingsPostHog/posthogSkill41ktodaynoneA76Claude Code, Codex