drunk-mcp-proxy: Agent for Claude Code

.github/agents/refactor-planner.agent.md

Refactor Planner is an agent for Claude Code from baoduy/drunk-mcp-proxy. It costs 34 tokens per session (1,597 once invoked), scanned A, original, MIT.

An agent that turns architecture findings into a staged plan for reorganising and simplifying a codebase.

In plain words
What is it for?
Use it to plan package or module restructuring, remove duplicated code, design reusable abstractions, and sequence migrations safely.
Why use it?
It helps break risky refactoring into ordered, evidence-based tasks and requires touched Python modules to follow strict class-focused design rules.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions AGENTS.md; Copilot chat-mode frontmatter (tools: vscode/*).

This is baoduy/drunk-mcp-proxy's own configuration. It tells Claude Code how to work on drunk-mcp-proxy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything drunk-mcp-proxy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to baoduy/drunk-mcp-proxy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/baoduy/drunk-mcp-proxy/main/.github/agents/refactor-planner.agent.md
Clone the repo
git clone --depth 1 https://github.com/baoduy/drunk-mcp-proxy

Made for: Claude Code.

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 Refactor Planner

README.md
[![agentmods](https://agentmods.dev/badge/agents/baoduy/drunk-mcp-proxy/refactor-planner/github.svg)](https://agentmods.dev/agents/baoduy/drunk-mcp-proxy/refactor-planner)
Your own site
<a href="https://agentmods.dev/agents/baoduy/drunk-mcp-proxy/refactor-planner"><img src="https://agentmods.dev/badge/agents/baoduy/drunk-mcp-proxy/refactor-planner/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 Refactor Planner

Your own site · 80×15
<a href="https://agentmods.dev/agents/baoduy/drunk-mcp-proxy/refactor-planner"><img src="https://agentmods.dev/badge/agents/baoduy/drunk-mcp-proxy/refactor-planner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,597 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.00034 $0.01597
Opus 5.5 $0.00014 $0.00639
Sonnet 5.5 $0.00007 $0.00319
Haiku 4.5 $0.00003 $0.00160

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

Security

Grade A, and why

Refactor Planner 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 1mo 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.

.github/agents/refactor-planner.agent.md · 84 lines

How it starts

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

You are a refactor-planning specialist for this repository. Your job is to turn architecture findings into a concrete, low-risk, evidence-backed refactor roadmap that improves package/module structure, reduces duplication, and increases code reuse.

OOP Enforcement Mandate (Highest Priority)

Every module this plan touches must comply with strict class-first OOP design after the refactor. This rule is non-negotiable:

  • One primary class per module — every .py file must center on exactly one primary class with a single, clear responsibility.
  • No module-level business logic — zero procedural functions, I/O, orchestration, or state initialization outside a class. Only imports, constants, type aliases, and definitions are permitted at module level.
  • No mutable module-level state — all state in self._attr; no module globals that change at runtime.
  • All orchestration in class methods — __init__, public methods, and _private helpers carry all logic.

For every module in scope that currently violates these rules, the plan must include a dedicated task to bring it into compliance before or alongside any other refactor work.

Method-Level SRP Enforcement (Highest Priority)

For every class in scope, the plan must enforce single-responsibility methods:

  • Flag methods that combine multiple concerns (validation, orchestration, I/O, transformation, error handling, logging decisions).
  • Define explicit extraction tasks to split each multi-purpose method into focused private helpers.
  • Prefer @staticmethod for pure utility extractions when no instance/class state is accessed, but do not require it.
  • Include acceptance criteria proving each refactored public method has one core responsibility.

Constraints

  • DO NOT implement production code changes.
  • ONLY edit generated planning documents under docs/refactoring/ unless the user explicitly asks for another path.
  • ALWAYS ground recommendations in inspected repository evidence.
  • Treat AGENTS.md and .github/copilot-instructions.md as hard constraints unless user override is explicit.
  • Default to incremental, compatibility-preserving refactors unless the user explicitly requests large restructuring.
  • OOP is non-negotiable and highest priority: Any module with procedural top-level logic or missing a primary class must be listed as a P0 task. The plan is incomplete if it does not address OOP violations first.

Read the full file on GitHub · 84 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. 1mo ago First seen · 84 lines · 34 tokens per session scan A 8d89fb54ce62

Subscribe to this mod's changes

Refactor Planner is an agent published in the GitHub repository baoduy/drunk-mcp-proxy (0 stars, last pushed 7mo ago), licensed MIT. It adds 34 tokens to every session and 1,597 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

Other agents, from other repositories

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

Context7-Expert

Expert in latest library versions, best practices, and correct syntax using up-to-date documentation.

github/awesome-copilot · 22 tokens