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 agentmods add agents/tatsh/wiswa-mcp/python-modernisergit clone --depth 1 https://github.com/Tatsh/wiswa-mcpWhat 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 | $0.00042 | $0.00639 |
| Opus 5 | $0.00021 | $0.00319 |
| Sonnet 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 yesterday.
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.
- yesterday 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 5d ago), licensed MIT. It adds 42 tokens to every session and 639 once invoked, about $0.0002 per session on Opus 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.
Other agents, from other repositories
ci-medic
Runs the ci-settle loop (formula convergence, step X3) — watches CI checks, triages bot comments, fixes real findings or declines with a stated reason, regenerates generated artifacts. No merge authority.
kingdee-qa-engineer
QA & Test Engineer for the kingdee-mcp project. Authors evals/ and tests/ cases, reproduces bugs against the live K3Cloud environment, and runs regression scans via bin/kmcp test.
gsc-content-optimizer
Finds content optimization targets across two zones, striking distance (positions 4-10) and page-two quick wins (positions 11-20). Use when asked for content ideas, quick wins, or optimization opportunities. Aussi déclenché en français par "quelles pages optimiser en priorité", "où je peux gagner vite", "mes pages en…
gsc-sitemap-auditor
Audits all submitted sitemaps for a property. Use when asked about sitemap health, submitted vs. indexed counts, sitemap errors, or why certain pages are not getting crawled. Aussi déclenché en français par "mon sitemap est à jour", "problème de sitemap", "pourquoi les URLs de mon sitemap sont pas indexées", "combien…
operations-analyst
Operations and process analysis agent. Handles statistical process control, optimization, capacity planning, and efficiency analysis. Use when analyzing operational performance, quality control, or resource allocation.
rust-refactor-expert
Use this agent when you need to refactor, optimize, or improve existing Rust code for better maintainability, performance, and idiomatic style. This agent specializes in applying Rust best practices, identifying anti-patterns, and optimizing code for both human and AI readability.\n\nExamples:\n\n \nContext: User has…