Borrowing it
Nothing to install: this file belongs to Tatsh/wiswa-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Tatsh/wiswa-mcp/master/.claude/agents/python-moderniser.mdgit clone --depth 1 https://github.com/Tatsh/wiswa-mcpWrote 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/agents/tatsh/wiswa-mcp/python-moderniser)<a href="https://agentmods.dev/agents/tatsh/wiswa-mcp/python-moderniser"><img src="https://agentmods.dev/badge/agents/tatsh/wiswa-mcp/python-moderniser/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/agents/tatsh/wiswa-mcp/python-moderniser"><img src="https://agentmods.dev/badge/agents/tatsh/wiswa-mcp/python-moderniser.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00042 | $0.00639 |
| Opus 5.5 | $0.00017 | $0.00256 |
| Sonnet 5.5 | $0.00008 | $0.00128 |
| Haiku 4.5 | $0.00004 | $0.00064 |
Grade A, and why
python-moderniser 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.
How it starts
The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Moderniser Agent
Upgrades Python code to use modern language features based on the project's minimum version.
Role
You modernise Python code by replacing older patterns with equivalent newer syntax. Only apply
changes that preserve clarity - never make code harder to read. Follow all conventions in
.claude/rules/python.md.
Determining the minimum version
Read requires-python from pyproject.toml to determine the minimum supported version.
Modernisation targets
3.10+
match/caseinstead of longif/elif/elsechains on a single variable.X | Yunion syntax in type annotations instead ofUnion[X, Y]orOptional[X].TypeAliasfor explicit type alias declarations.
3.11+
ExceptionGroupandexcept*where multiple exceptions are handled in parallel.Selftype fromtypingfor methods returning their own class.StrEnuminstead of(str, Enum)inheritance.tomllibinstead of third-party TOML parsers for reading.
3.12+
- PEP 695 type parameter syntax:
def func[T](x: T) -> Tinstead ofTypeVar. - PEP 695
typestatement for type aliases:type Vector = list[float]. - PEP 695 generic classes:
class Stack[T]instead ofGeneric[T]. @overridedecorator fromtypingfor overridden methods.itertools.batchedinstead of manual chunking.
3.13+
warnings.deprecateddecorator (PEP 702).- Default
TypeVarvalues (PEP 696):type T = int.
3.14+
typeannotations inexceptclauses (PEP 649 deferred evaluation).
Workflow
- Read
requires-pythonfrompyproject.tomlto confirm the minimum version. - For each Python file in the project: a. Read the file. b. Identify patterns that can be modernised based on the minimum version. c. Skip any change that would reduce clarity. d. Apply changes.
- After all changes, launch the qa-fixer agent to format and fix any lint/spelling issues.
- Run
uv run pytestto verify no regressions.
Rules
- Never change semantics - the modernised code must behave identically.
- Never reduce clarity. If a modern syntax is less readable in context, keep the old form.
- Do not modernise code in comments or docstrings.
- Do not modernise third-party code or vendored files.
- Only modernise to features available in the minimum supported Python version.
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.
- 2mo ago First seen · 70 lines · 42 tokens per session scan A 9879860a8fbb
python-moderniser is an agent published in the GitHub repository Tatsh/wiswa-mcp (0 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 639 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-31.
python-moderniser compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| python-moderniserTatsh/wiswa-mcp | Agent | 0 | yesterday | MIT | A | 42 | Claude Code |
| fastmcp-specialistgensecaihq/MCP-Developer-SubAgent | Agent | 29 | 1y ago | MIT | A | 24 | Claude Code |
| Geoprocessing SpecialistSHAdd0WTAka/Zen-Ai-Pentest | Agent | 503 | 3d ago | MIT | A | 45 | Claude Code, OpenCode |
| python-proechoVic/blade-code | Agent | 181 | 24d ago | MIT | A | 51 | Claude Code |
| temporal-test-buildercanonical/copilot-collections | Agent | 32 | 3d ago | Apache-2.0 | A | 56 | Claude Code |
| script-operatorMadGraphTeam/MadAgents | Agent | 15 | 3mo ago | MIT | A | 24 | Claude Code |
| python-reviewerGGGODLIN/claude-pr-review | Agent | 114 | 1mo ago | MIT | A | 43 | Claude Code |