Python

From pproenca/dot-skills · View interactive version

Python is an AI agent skill from the GitHub repository pproenca/dot-skills. Python 3.11+ performance optimization guidelines (formerly python-311). This skill should be used when writing, reviewing, or refactoring Python code to ensure optimal performance patterns. Triggers on tasks involving asyncio, data structures, memory management, concurrency, loops, strings, or Pytho

How to use this skill

Skill file

Python 3.11 Best Practices

Comprehensive performance optimization guide for Python 3.11+ applications. Contains 42 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | I/O & Async Patterns | CRITICAL | io- |

| 2 | Data Structure Selection | CRITICAL | ds- |

| 3 | Memory Optimization | HIGH | mem- |

| 4 | Concurrency & Parallelism | HIGH | conc- |

| 5 | Loop & Iteration | MEDIUM | loop- |

| 6 | String Operations | MEDIUM | str- |

| 7 | Function & Call Overhead | LOW-MEDIUM | func- |

| 8 | Python Idioms & Micro | LOW | py- |

Table of Contents

  1. I/O & Async Patterns — CRITICAL
  1. Data Structure Selection — CRITICAL
  1. Memory Optimization — HIGH
  1. Concurrency & Parallelism — HIGH
  1. Loop & Iteration — MEDIUM
  1. String Operations — MEDIUM
  1. Function & Call Overhead — LOW-MEDIUM
  1. Python Idioms & Micro — LOW

References

  1. Python 3.11 Release Notes
  2. PEP 8 Style Guide
  3. Python Wiki - Performance Tips
  4. Real Python - Async IO
  5. Real Python - LEGB Rule
  6. Real Python - String Concatenation
  7. Python Tutorial - Data Structures
  8. CPython Exception Handling
  9. DataCamp - Python Generators
  10. JetBrains - Performance Hacks
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.