python

Apply type safety, dependency injection, and Result pattern to Python code.

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/lciacci/tessera --skill python-lciacci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python
Source: https://github.com/lciacci/tessera/tree/main/skills/python
Command: npx skills add https://github.com/lciacci/tessera --skill python-lciacci

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers write maintainable, type-safe Python while avoiding common implementation and design mistakes.

Core Features & Use Cases

  • Type-Safe APIs: Apply type hints consistently to function signatures and use appropriate typing constructs for complex values.
  • Maintainable Design: Use dependency injection, functional patterns, and simple functions to reduce coupling and unnecessary complexity.
  • Robust Error Handling: Model expected failures with a Result pattern and avoid unsafe practices such as bare exception handlers, mutable defaults, wildcard imports, unexplained type ignores, and global state.
  • Use Case: Apply these guidelines when adding or refactoring Python files to improve readability, testability, and reliability.

Quick Start

Use the Python skill to review the current Python changes for type-safety issues, dependency-coupling problems, and listed anti-patterns.

Frequently Asked Questions about python

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

FAQPage Schema
How do I improve Python code quality and avoid common anti-patterns?

To improve Python code quality, apply consistent type hints, use dependency injection, and avoid unsafe anti-patterns like bare exception handlers and mutable defaults. Refactoring with these practices ensures safer, clearer, and more maintainable code.

What is the Result pattern in Python and how does it handle errors?

The Result pattern in Python models expected failures explicitly without relying on exceptions. It improves robust error handling by avoiding unsafe practices like bare exception handlers, ensuring clear function signatures and reduced coupling.

How do I refactor Python code to use type hints and dependency injection?

Refactor Python code by adding consistent type hints to function signatures and using appropriate typing constructs. Implement dependency injection and functional patterns with simple functions to reduce coupling and unnecessary complexity.

What are unsafe Python anti-patterns to avoid during refactoring?

Unsafe Python anti-patterns to avoid include bare exception handlers, mutable defaults, wildcard imports, unexplained type ignores, and global state. Avoiding these improves readability, testability, and reliability in your Python files.

Does using simple functions over classes improve Python type safety?

Preferring simple functions over unnecessary classes improves Python type safety by reducing coupling and complexity. Combined with type hints and explicit result handling, this approach yields clearer, more testable APIs.