SQLAlchemy and database patterns for Python. Triggers on: sqlalchemy, database, orm, migration, alembic, async database, connection pool, repository pattern, unit of work — from…
Choose between dataclass, NamedTuple, and pydantic, and configure frozen, slots, and validation correctly.
Python アプリケーションのドメインモデル / DTO / API スキーマを Pydantic v2 で設計するとき。BaseModel、field_validator / model_validator、computed_field、model_config (frozen,…
Detect and remove unused Python code using vulture and ruff. Covers unused imports, variables, functions, classes, and unreachable code.
Debug Python scripts with proper error surfacing and working directory verification
Debug Python script execution failures by capturing full tracebacks and verifying working directory
Debug Python script execution failures by capturing full output with exit codes and verifying working directory before file operations
Systematically debug Python code using structured error analysis, logging inspection, and test-driven fixes
Use when debugging Python via pdb or remote debugpy (DAP). Triggers: pdb, debugpy, remote debug python.
负责《Paddle API 对齐 PyTorch 项目》中 Step2:API 代码修改,实施『Python 装饰器』方案。通过 Python 装饰器,在 Python 层为 Paddle API 实现参数名称、参数顺序、参数类型和参数用法的重载,实现 PyTorch 风格的 API 调用,并保持 Paddle API 的向后兼容性。
Write decorators that preserve signatures and compose cleanly, including parameterized and class-applied forms.
Resolves and visualizes Python package dependency graphs using pip, pipdeptree, and the PyPI JSON API.
Use when when setting up a multi-stage bioinformatics workflow (e.g., ENPKG) that calls external tools (MZmine, Sirius, SPARQL engines) and depends on specific Python libraries;…
Use when when setting up a new conda environment for a Python-based bioinformatics pipeline and you need to confirm that all declared dependencies (e.g., pysam >=0.15.4, bx-python…
Use when designing module boundaries, planning refactors, or reviewing architecture in Python codebases.
Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance.
Opinionated Python development setup with uv + ty + ruff + pytest + just. Use when creating new Python projects, setting up pyproject.toml, configuring linting, type checking,…
You are a Python project architecture expert specializing in scaffolding production-ready Python applications.
**UTILITY SKILL** — Python diagram generation: WAF/cost/compliance charts (matplotlib), architecture diagrams (diagrams lib), ERDs, swimlanes, timelines, wireframes (graphviz).
Python documentation conventions — a Google-style docstring on every public module, class, and function, enforced by ruff's pydocstyle (D) rules with the google convention, and…
Extracts and indexes Python module documentation using ast.parse and docstring_parser library. Supports Google, NumPy, and Sphinx docstring formats with type hint…
Handle noisy git diffs from src/*.egg-info generated by editable installs (uv) and decide whether to commit or ignore.
Fast Python environment management with uv (10-100x faster than pip). Triggers on: uv, venv, pip, pyproject, python environment, install package, dependencies.
Use when when you have installed a Python package (e.g., via pip or conda) and need to confirm that the installation succeeded and all expected submodules can be imported.
Use when you are preparing to run Hi-C data normalization or read alignment filtering steps that depend on Python modules (iced, pysam, numpy, scipy) and you need to ensure…
Use when when you have access to a research repository or README documenting a machine learning implementation (e.g., Keras/TensorFlow-based deep learning model) and need to…
Use when you have cloned a scientific repository containing Python code (scripts, Jupyter notebooks, or module imports) and need to execute it locally or on new hardware.
Python environment setup with uv, shared utilities, and script structure guidelines.
Pick an environment manager, pin dependencies with a lockfile, and produce reproducible installs that never touch system Python.
Python error handling patterns including input validation, exception hierarchies, and partial failure handling.
Use when designing error handling, retry policies, timeout behavior, or failure classification in Python.
Four-step recovery workflow for code execution failures when inline Python fails
Fallback method for executing Python when execute_code_sandbox fails with unknown errors
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Python expert for stdlib, packaging, type hints, async/await, and performance optimization
Expert guidance for Python testing that analyzes your existing setup and provides evidence-based recommendations.
Python 3.12+ coding guidelines for APIs, data processing, scripting. Apply when editing `.py` files. Use for async code, type hints, dataclasses, file operations, resource…
When running multi-line Python code or code with quotes, apostrophes, or f-strings via Bash, always use heredoc syntax instead of python -c to avoid shell quoting issues.
Python patterns for system reliability — background jobs and task queues (Celery, async), resilience and recovery (retries, backoff, timeouts, circuit breakers via tenacity), and…
Use when building or reviewing external API integrations in Python — designing client boundaries, defining outbound reliability policy, or structuring contract tests.
Generates Python code with pedagogical explanations comparing syntax to TypeScript. Use when writing Python scripts, learning Python patterns, or comparing Python to…
Teach while coding in Python. Use when the task involves Python code and the user wants explanations, step-by-step reasoning, refactors, testing guidance, data-flow clarity, or…
Set up Python project for PyPI publishing or private GitHub distribution with pyproject.toml, src layout, and optional build scripts.
Generates searchable Python library references using ast module for source parsing and Sphinx autodoc integration.
Checks environment health and guides pre-commit setup. Lint, format, and test run automatically via pre-commit on every git commit.
Expert guidance for Python logging libraries including structlog, standard logging, and log analysis.
Use when choosing or configuring Python logging, especially deciding between stdlib logging and loguru for apps or CLIs.
Python logging with loguru, structlog, and orjson. TRIGGERS - loguru, structlog, structured logging, JSONL logs, log rotation, secret redaction, OTel logging, lightweight logging,…
Use HSP's ty-backed Python route for semantic navigation, diagnostics, references, rename, call hierarchy, formatting, and code actions.
Comprehensive guide to python metaprogramming. Master the concepts, implementation, best practices, and real-world applications of python metaprogramming in professional…
Modern Python patterns for Modal.com serverless platform. PROACTIVELY activate for: (1) Modal function deployment, (2) Type-safe Modal with Pydantic, (3) Async patterns in Modal,…