Toolverse
All skills

python-type-safety

by wshobson

Python type safety with type hints, generics, protocols, and strict type checking. Use when adding type annotations, implementing generic classes, defining structural interfaces, or configuring mypy/pyright.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
wshobson
Category
Backend
Views
22

About this skill

Python type safety with type hints, generics, protocols, and strict type checking. Use when adding type annotations, implementing generic classes, defining structural interfaces, or configuring mypy/pyright.

How to use

  1. Zainstaluj skill python-type-safety w swoim środowisku agenta — dodaj go do konfiguracji pluginów python-development.

  2. Zaznacz wszystkie publiczne sygnatury funkcji i metod adnotacjami typów. Dla każdej funkcji określ typy parametrów i wartości zwracanej, np. def get_user(user_id: str) -> User | None:.

  3. Gdy pracujesz z kodem, który może zwrócić None lub wiele typów, użyj type narrowing — dodaj warunkowe sprawdzenia (if user is None), aby zawęzić typ w danym bloku kodu.

  4. Dla kodu wielokrotnego użytku zastosuj generyki — napisz klasy i funkcje, które zachowują informacje o typach dla różnych danych, np. BatchResult[ProcessedItem].

  5. Definiuj interfejsy strukturalne za pomocą protokołów zamiast dziedziczenia — pozwala to na duck typing z bezpieczeństwem typów.

  6. Skonfiguruj mypy lub pyright w swoim projekcie i uruchom je regularnie — narzędzia te automatycznie walidują adnotacje i wyłapują niezgodności typów przed testowaniem.

Related skills

humanizer

by davila7

Remove signs of AI-generated writing from text. Use when editing or reviewing\ntext to make it sound more natural and human-written. Based on Wikipedia's\ncomprehensive \

Backend
2873

supabase-operations

by elevanaltd

Supabase operational knowledge for migrations, RLS optimization, MCP tool benchmarks, and ADR-003 compliance. Use when validating database migrations, optimizing Row-Level Security policies, checking MCP tool performance, or ensuring Supabase operational standards. Triggers on:

Backend
27109

architecture-decision-records

by wshobson

Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

Backend
29130

sql-optimization-patterns

by wshobson

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

Backend
40163

video-downloader

by ComposioHQ

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

Backend
50173

postgresql-psql

by timelessco

Comprehensive guide for PostgreSQL psql - the interactive terminal client for PostgreSQL. Use when connecting to PostgreSQL databases, executing queries, managing databases/tables, configuring connection options, formatting output, writing scripts, managing transactions, and

Backend
34173