.skill/skills/modern-python/SKILL.md
Modern Python tooling and best practices using uv, ruff, ty, and pytest. Covers project setup with pyproject.toml (PEP 735), src layout, linting/formatting with ruff, type checking with ty, testing with pytest and coverage, pre-commit with prek, and security (pip-audit, detect-secrets, actionlint). Use when setting up or working on Python projects, replacing pip/virtualenv with uv, replacing flake8/black/mypy with ruff/ty, adding pre-commit or security scanning, or when the user mentions uv, ruff, ty, pytest, or cookiecutter-python patterns.
npx skillsauth add antoinebou12/uml-mcp modern-pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Modern Python tooling and practices: uv for dependencies, ruff for lint/format, ty for type checking, pytest for tests. Use for this project and when setting up or refactoring Python codebases.
Prefer uv over raw python/pip. When about to run legacy commands, use:
| Legacy command | Use instead |
|----------------|-------------|
| python | uv run python |
| python script.py | uv run script.py |
| pip install pkg | uv add pkg or uv run --with pkg |
| pip uninstall pkg | uv remove pkg |
| pip freeze | uv export |
| python -m pip install | uv add / uv sync |
Commands that already use uv run (e.g. uv run pytest) do not need changing.
src/ layout (package under src/<package_name>/). This project uses top-level packages (mcp_core, tools); when adding new packages, keep them at repo root or under a clear namespace.pyproject.toml at repo root.requires-python in pyproject.toml).pyproject.toml under [tool.ruff] and [tool.ruff.format].Run:
uv run ruff check .uv run ruff format .Fix auto-fixable issues: uv run ruff check --fix .
pyproject.toml under [tool.ty] if needed.Run: uv run ty check
tests/ at repo root; use conftest.py for shared fixtures.pytest-cov. Enforce a minimum coverage threshold so CI fails when coverage drops.Run:
uv run pytestuv run pytest --cov=mcp_core --cov=tools --cov-report=term-missinguv run pytest -v tests/Good practices:
@pytest.fixture for setup/teardown and shared state.@pytest.mark.parametrize for multiple inputs/outputs.uv run pip-audit or use in CI.pyproject.toml with clear requires-python and dependency groupspip install in instructionstools
Create and validate diagrams with the uml-mcp MCP server (generate_uml, validate_uml, list_diagram_types, generate_uml_batch). Use for UML, Mermaid, D2, Graphviz, Kroki URLs, or diagram_type questions.
tools
Creates diagrams via the uml-mcp MCP server (generate_uml, validate_uml, list_diagram_types, generate_uml_batch) and returns shareable Kroki URLs plus optional playground links. Use when the user wants a diagram, asks for PlantUML/Mermaid/D2/UML, wants a URL instead of a saved file, or mentions uml-mcp, Kroki, or diagram_type.
tools
Produces Mermaid or PlantUML diagram code from user specifications for UML, architecture, and flow diagrams. Use when the user asks for a diagram (sequence, class, activity, use case, component, state, deployment), diagram code, or when generating diagram script for documentation, design, or the generate_uml MCP tool. Supports Kroki-renderable output.
tools
Create and extend MCP (Model Context Protocol) servers in Python using FastMCP and the official SDK. Covers tools, resources, prompts, STDIO vs HTTP transports, logging rules for STDIO, and production best practices. Use when building or modifying MCP servers in Python, adding tools/resources/prompts, debugging MCP servers, or choosing transport and client config.