python-expert

Write, review, and optimize Python code with type hints and PEP 8 style.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/TrollHeap/dotfiles --skill python-expert-trollheap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-expert
Source: https://github.com/TrollHeap/dotfiles/tree/main/ai-config/.claude/templates/python-script/.claude/skills/python-expert
Command: npx skills add https://github.com/TrollHeap/dotfiles --skill python-expert-trollheap

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Senior Python developer expertise for writing clean, efficient, and well-documented code. Use when: writing Python code, optimizing Python scripts, reviewing Python code for best practices, debugging Python issues, implementing type hints, or when user mentions Python, PEP 8, or needs help with Python data structures and algorithms.

Core Features & Use Cases

  • Writing new Python code (scripts, functions, classes)
  • Reviewing existing Python code for quality and performance
  • Debugging Python issues and implementing type hints and documentation
  • Enforcing PEP 8 style and comprehensive docstrings

Quick Start

Refactor and optimize the following Python function to meet PEP 8 standards, with type hints and comprehensive docstrings.

Frequently Asked Questions about python-expert

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

FAQPage Schema
How do I refactor Python code to meet PEP 8 standards and add type hints?

To refactor Python code to meet PEP 8 standards, you can enforce style guidelines, add type hints for type safety, and generate comprehensive docstrings to improve readability and correctness. This process ensures clean, efficient, and well-documented code.

What is the best way to debug Python scripts and optimize performance?

The best way to debug Python scripts and optimize performance is by conducting an expert-level code review to identify issues, enforce correctness, and refactor for maximum efficiency. This approach solves complex Python coding tasks while maintaining type safety.

How do I write Python functions and classes with proper documentation?

To write Python functions and classes with proper documentation, create new code structures while enforcing PEP 8 style guidelines and adding comprehensive docstrings. This ensures your Python scripts remain clean, well-documented, and efficient.

Can I use this to review existing Python code for best practices and quality?

Yes, you can review existing Python code for best practices and quality by enforcing correctness, type safety, performance, and PEP 8 style requirements. This identifies areas for improvement and refactors the code for better readability.

Why does my Python code fail type safety checks and how can I fix it?

Python code fails type safety checks when type hints are missing or incorrect, which you can fix by implementing proper type hints and enforcing style requirements. This ensures correctness and improves the overall quality of your Python scripts.

When do I need to add type hints and docstrings to my Python data structures?

You need to add type hints and docstrings to Python data structures when writing new scripts, refactoring for readability, or debugging issues. This enforces type safety, improves performance, and ensures comprehensive documentation.