writing-python

Enforce stdlib-first conventions and comprehensive type hints in Python projects.

7|1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/julianobarbosa/claude-code-skills --skill writing-python-julianobarbosa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-python
Source: https://github.com/julianobarbosa/claude-code-skills/tree/main/skills/writing-python-skill
Command: npx skills add https://github.com/julianobarbosa/claude-code-skills --skill writing-python-julianobarbosa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides Python development best practices, focusing on type hints, robust error handling, and clean design.

Core Features & Use Cases

  • Type hints: Enforce typing across functions and APIs.
  • Patterns: Functional options, context propagation, and clean error handling.
  • Testing: Guidance for pytest-based testing and robust fixtures.

Quick Start

Implement a small Python utility with clear error handling and typing.

Frequently Asked Questions about writing-python

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

FAQPage Schema
How do I write Python code with comprehensive type hints?

Type hints enforce function and API signatures across your codebase. This Skill teaches explicit type annotation patterns using stdlib tools like mypy for validation, ensuring robust APIs and catching errors early without heavy dependencies.

What are Python design patterns for clean error handling?

Clean error handling uses structured patterns like functional options and context propagation to manage failures explicitly. This Skill covers pattern-based approaches that reduce boilerplate and make error flows traceable in services, CLI tools, and libraries.

Can I use pytest and dataclasses for a stdlib-first Python project?

Yes. This Skill focuses on stdlib-first toolchains using uv, ruff, pytest, and mypy with dataclasses and pattern matching. It suits Python 3.14+ projects—CLI tools, scripts, services, and libraries—that minimize external dependencies while maintaining modern language features.

How do I set up robust pytest fixtures for Python testing?

Pytest fixtures provide reusable test infrastructure. This Skill guides fixture design and testing patterns that pair with comprehensive type hints and structured error handling, enabling maintainable test suites for typed Python codebases.

What's the best way to enforce typing conventions across a Python codebase?

Enforce typing by combining explicit type annotations, static analysis with mypy, and linting with ruff. This Skill applies these stdlib tools systematically to enforce idiomatic Python conventions across functions, modules, and APIs without adding framework overhead.