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 skills add slamer59/mcp-python-refactoring --skill skillgit clone --depth 1 https://github.com/slamer59/mcp-python-refactoringWrote 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/skills/slamer59/mcp-python-refactoring/skill)<a href="https://agentmods.dev/skills/slamer59/mcp-python-refactoring/skill"><img src="https://agentmods.dev/badge/skills/slamer59/mcp-python-refactoring/skill/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/skills/slamer59/mcp-python-refactoring/skill"><img src="https://agentmods.dev/badge/skills/slamer59/mcp-python-refactoring/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00042 | $0.00960 |
| Opus 5.5 | $0.00017 | $0.00384 |
| Sonnet 5.5 | $0.00008 | $0.00192 |
| Haiku 4.5 | $0.00004 | $0.00096 |
Grade A, and why
python-refactoring 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 11d 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 — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Refactoring Assistant
This project ships python-refactor-cli, a CLI that wraps rope, radon, vulture,
pyrefly, mccabe, complexipy, bandit, pip-audit, and refurb into one set of
refactoring-analysis commands. Use it whenever you are about to refactor,
review, or assess the health of Python code in this repository.
Primary usage: CLI
Prefer running the CLI directly via subprocess (e.g. the Bash tool) over starting the MCP server for one-off analysis — it's faster and cheaper:
uv run python-refactor-cli <group> <command> --format json ...
Every analysis command supports --format json for machine-parseable output.
Commands are grouped by capability (file, test, security, package,
repo). Run uv run python-refactor-cli skills to list every command with
examples, or uv run python-refactor-cli <group> <command> --help for full
option details.
Command reference
| Command | Target | Use it to... |
|---|---|---|
file analyze <file> |
file | Full refactoring analysis of a single file |
file long-functions <file> [-t N] |
file | Find functions at/over N lines (candidates for extraction) |
file extraction <file> [-fn NAME] |
file | Get step-by-step guidance for extracting a specific function |
test coverage <source> [-t tests/] |
file/dir | Find files/functions missing test coverage |
test tdd <file> [-fn NAME] |
file | Get Red-Green-Refactor guidance for a function |
security scan <file> |
file | Scan for security vulnerabilities, vulnerable deps, and outdated patterns |
package analyze <path> |
package/dir | Full structural analysis of a package |
package metrics <path> |
package/dir | Complexity, cohesion, coupling, health score |
package issues <path> |
package/dir | Structural issues (god package, circular deps, etc.) |
package dependencies <path> |
package/dir | Dependency graph and circular-dependency detection |
Example:
uv run python-refactor-cli file long-functions src/app.py --line-threshold 30 --format json
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.
- 11d ago Changed · +3 lines 13d2fc4f0126
- 1mo ago First seen · 96 lines · 42 tokens per session scan A 8dd418420edc
python-refactoring is a skill published in the GitHub repository slamer59/mcp-python-refactoring (13 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 960 once invoked, about $0.0002 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-30.
Other skills, from other repositories
mcore-linting-and-formatting
Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.
splitting-oversized-modules
Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…
splitting-oversized-modules
Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…
plankton-code-quality
Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.
coding.make_function_private
Identify private or public functions in a file and rename with underscore.
best-practices
Language-specific best practices, code quality standards, and framework detection rules. Use when executing refactoring workflows, applying code quality rules, detecting frameworks, or checking language-specific patterns for TypeScript, Python, Go, Swift, or React.