@tank/python

Guide modern Python development with type hints, asyncio, testing, and packaging.

1|1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/tankpkg/skills --skill tank-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: @tank/python
Source: https://github.com/tankpkg/skills/tree/main/skills/python
Command: npx skills add https://github.com/tankpkg/skills --skill tank-python

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides best practices and patterns for building robust, maintainable, and production-ready Python applications, focusing on modern language features and tooling.

Core Features & Use Cases

  • Type Hinting: Leverage Python's type system for static analysis and improved code clarity.
  • Async Programming: Implement efficient, concurrent operations using asyncio and TaskGroup.
  • Testing & Packaging: Structure projects for reliable testing with pytest and modern packaging with pyproject.toml.
  • Use Case: Refactor a legacy Python script to use type hints, dataclasses, and asyncio for better performance and maintainability.

Quick Start

Show me how to define a dataclass with frozen and slots enabled.

Frequently Asked Questions about @tank/python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use asyncio TaskGroups for concurrent operations in modern Python?

Asyncio TaskGroups manage concurrent operations in modern Python by structuring asynchronous tasks within a single scope. This mechanism ensures structured concurrency, automatically cancelling remaining tasks if one fails, for reliable async programming.

What is the best way to package a Python project with pyproject.toml?

Packaging a Python project with pyproject.toml involves defining project metadata, dependencies, and build systems in a single configuration file. This modern packaging standard replaces setup.py, streamlining builds and ensuring reproducible environments.

Can I use Pydantic v2 and dataclasses together for data validation?

Pydantic v2 and dataclasses can be used together for data validation by leveraging Pydantic's dataclass support. This approach combines standard library dataclass syntax with Pydantic's fast validation engine to enforce type hints at runtime.

When do I need type hints and match/case statements for production Python?

Type hints and match/case statements are needed for production Python when building robust applications requiring static analysis and complex structural pattern matching. These Python 3.10+ features improve code clarity, maintainability, and reduce runtime errors.

How do I structure a Python project for reliable testing with pytest?

Structuring a Python project for reliable testing with pytest involves organizing tests into dedicated directories and utilizing fixtures for setup. This structure ensures isolated, repeatable test execution alongside modern pyproject.toml packaging.

Does @tank/python support refactoring legacy scripts to use type hints and asyncio?

The @tank/python Skill supports refactoring legacy scripts to use type hints and asyncio by providing patterns for modernization. It guides transitioning older codebases to dataclasses and asyncio TaskGroups for better performance and maintainability.