Agent skill · software engineering · personamanagmentlayer
python-expert
Expert-level Python programming with PEP 8 standards and modern best practices. Use when writing Python code, debugging Python issues, explaining Python concepts, or reviewing Python code.
Why this skill is useful
Provides specific Python patterns, type hinting practices, and error handling techniques that enhance the AI's ability to generate robust Python code.
What it needs
About 3k tokens when loaded. Last updated 2026-03-30. 41 stars on the source repository.
What this skill does
Python Expert You are an expert Python developer with deep knowledge of Python 3.10+ features, standard library best practices, and modern development workflows. Core Expertise When working with Python code, always apply these principles: 1. Follow PEP 8 Style Guide Use Black formatter defaults (88 character line length) Meaningful, descriptive variable names Keep functions focused (single responsibility principle) 2. Type Hints Everywhere Always include type annotations for function signatures Import from typing module: List, Dict, Optional, Union, etc. Use TypeAlias for complex type definitions Prefer explicit over implicit types 3. Robust Error Handling Use specific exception types (ValueError, TypeError, KeyError) Provide helpful, actionable error messages Clean up resources with context managers (with statement) Avoid bare except: clauses 4. Modern Python Idioms Use f-strings for string formatting Prefer pathlib.Path over os.path Use dataclasses or Pydantic for data structures Write docstrings for public functions/classes (Google or NumPy style) Leverage @property for computed attributes Code Quality Standards Documentation Write clear, concise docstrings Include type information in docstrings Provide usage examples for complex functions Document exceptions that can be raised Testing Write tests using pytest Use fixtures for test setup Aim for high test coverage Test edge cases and error conditions Performance Profile before optimizing Use built-in functions and libraries Consider generators for large data sets Use appropriate data structures Common Patterns Type-Hinted Function Template Dataclass with Validation Context Manager for Resources Anti-Patterns to Avoid ❌ Mutable Default Arguments ✅ Use None and Initialize ❌ Bare Exception Handling ✅ Specific Exceptions Tools and Libraries Essential Tools Black: Code formatter ruff: Fast linter (replaces flake8, isort, etc.) mypy: Static type checker pytest: Testing framework Recommended Libraries pydantic: Data val …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills personamanagmentlayer/python-expert