mcp2agy-fixer-agent

mcp2agy-fixer-agent is a skill for Claude Code, Codex from uziii2208/mcp2agy. It costs 54 tokens per session (13,172 once invoked), scanned A, original, MIT.

A code-fixing helper that applies minimal patches to confirmed security findings. It works as part of the audit pipeline or through the /fix command.

In plain words
What is it for?
It selects fixes by vulnerability type, checks every affected call site, tests patch atomicity, converts proof-of-concept code into regression tests, and produces a unified diff.
Why use it?
It helps ensure a vulnerability is fixed everywhere it occurs and that the patch does not create unrelated changes or a new timing bug.

Skill for Claude CodeCodex

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 skills/uziii2208/mcp2agy/fixer
Any agent
npx skills add uziii2208/mcp2agy --skill fixer
Clone the repo
git clone --depth 1 https://github.com/uziii2208/mcp2agy

Made for: Claude Code, Codex.

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 mcp2agy-fixer-agent

README.md
[![agentmods](https://agentmods.dev/badge/skills/uziii2208/mcp2agy/fixer.svg)](https://agentmods.dev/skills/uziii2208/mcp2agy/fixer)
Your own site
<a href="https://agentmods.dev/skills/uziii2208/mcp2agy/fixer"><img src="https://agentmods.dev/badge/skills/uziii2208/mcp2agy/fixer.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 13,172 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00054 $0.13172
Opus 5 $0.00027 $0.06586
Sonnet 5 $0.00011 $0.02634
Haiku 4.5 $0.00005 $0.01317

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

Security

Grade A, and why

mcp2agy-fixer-agent scanned grade A with 2 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

import ipaddress, socket, urllib.parse

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(
.agents/plugins/mcp2agy/skills/agents/fixer/SKILL.md · 1,349 lines

How it starts

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

Fixer Subagent

0. Fix Operating Model

PHASE F0: Fix strategy selection (per-CWE fix class + scope analysis)
  ↓
PHASE F1: Per-CWE fix template application (minimal correct fix pattern)
  ↓
PHASE F2: Multi-site completeness verification (fix applied at EVERY call site)
  ↓
PHASE F3: Fix atomicity check (fix itself does not introduce TOCTOU or new side effects)
  ↓
PHASE F4: PoC-as-regression-test harness (original PoC becomes permanent unit test)
  ↓
PHASE F5: Minimal diff generation + scope creep detector
  ↓
PHASE F6: Unified Diff Output (fixes.diff)

⚠️ CRITICAL: MCP Tool Usage Policy

NEVER call call_mcp_tool() or any MCP server tools when running as a subagent. MCP tools (generate_fix, check_fix_completeness, list_fix_templates) are lazy-loaded and require interactive user approval. Calling them from a subagent will block the pipeline.

You MUST use only these native tools:

  • view_file — Read verified findings, source code, and evidence
  • replace_file_content — Apply minimal code patches
  • write_to_file — Generate regression test harnesses and diff files
  • grep_search — Find all call sites for multi-site completeness
  • run_command — Run tests and verify fixes

PHASE F6: GHSA patch verification checklist


**Fix prioritization heuristics:**

| Weight | Fix first when... |
|--------|-------------------|
| 🔴 F0  | Fix closes an unauthenticated RCE or cross-tenant data breach |
| 🔴 F0  | Finding has a chain (both legs must be fixed; fixing only one leg is insufficient) |
| 🟠 F1  | Fix closes a race condition (must use atomic primitives, not check-then-act) |
| 🟠 F1  | Fix closes a path traversal (must use realpath + prefix at EVERY call site) |
| 🟡 F2  | Fix closes a permission leak (must harden BOTH directory AND file creation) |
| 🟡 F2  | Fix closes a ReDoS (must validate the regex pattern itself, not just input length) |
| 🟢 F3  | Fix closes a configuration disclosure or header hygiene issue |

---

## 1. Phase F0 — Fix Strategy Selection

### F0.1 Fix Class Matrix

Every confirmed CWE maps to a fix class. Select the fix class FIRST, then apply the
template from §F1. Do not improvise a fix pattern — use the template.

| CWE | Vuln class | Fix class | Template |
|-----|-----------|-----------|----------|
| CWE-78/88 | Shell context injection | Context-aware sanitizer per embedding site | §F1.1 |
| CWE-400 | Resource exhaustion / stream OOM | Hard cap + graceful discard | §F1.2 |
| CWE-611 | XXE via unsafe parser | defusedxml / equivalent | §F1.3 |
| CWE-22/73 | Path traversal (all variants) | realpath + prefix assertion | §F1.4 |
| CWE-362 | Race condition / double-spend | Atomic primitive / transaction | §F1.5 |
| CWE-377/732 | Insecure temp file | O_CREAT\|O_EXCL + 0o600 | §F1.6 |
| CWE-276/732 | Session permission leak | chmod 0o700 + O_CREAT\|O_WRONLY\|0o600 | §F1.7 |
| CWE-310/755 | Stream cipher desync | Propagate fatal TransportError | §F1.8 |
| CWE-116/78 | Polyglot string escape collapse | Calibrated escape helper per stage | §F1.9 |
| CWE-193/754 | Trailer off-by-one | Exact boundary constant | §F1.10 |
| CWE-117/150 | ANSI/terminal injection | Comprehensive strip_ansi() | §F1.11 |
| CWE-269/284 | AI agent capability escalation | Immutable capability ceiling | §F1.12 |
| CWE-22/284 | MCP path traversal | realpath sandbox per tool handler | §F1.13 |
| CWE-1321 | Prototype pollution | hasOwnProperty / Object.create(null) | §F1.14 |
| CWE-400/ReDoS | ReDoS | Safe regex pattern + input limit | §F1.15 |
| CWE-918 | SSRF | Allowlist + DNS rebinding mitigation | §F1.16 |

### F0.2 Scope Analysis

Before writing a single line of fix code:

```bash

Read the full file on GitHub · 1,349 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. 3d ago First seen · 1,349 lines · 54 tokens per session scan A 805599001b79

Subscribe to this mod's changes

mcp2agy-fixer-agent is a skill published in the GitHub repository uziii2208/mcp2agy (1 stars, last pushed 5d ago), licensed MIT. It adds 54 tokens to every session and 13,172 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens