Individual skill
python
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 Python idioms.
skills/.curated/python/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: codex
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENTS.mddoc · 192 bytesSKILL.mdcore · 8,423 bytesSKILL.mdcore · 8,423 bytesassets/templates/_template.mddoc · 1,066 bytesmetadata.jsonasset · 1,260 bytesreferences/_sections.mddoc · 1,837 bytesreferences/conc-asyncio-for-io.mddoc · 1,460 bytesreferences/conc-multiprocessing-cpu.mddoc · 1,812 bytesreferences/conc-queue-communication.mddoc · 1,712 bytesreferences/conc-taskgroup.mddoc · 1,724 bytesreferences/conc-threadpool-blocking.mddoc · 1,686 bytesreferences/ds-bisect-sorted.mddoc · 1,429 bytesreferences/ds-defaultdict.mddoc · 1,510 bytesreferences/ds-deque-for-queue.mddoc · 1,303 bytesreferences/ds-dict-for-lookup.mddoc · 1,334 bytesreferences/ds-frozenset-for-hashable.mddoc · 1,456 bytesreferences/ds-set-for-membership.mddoc · 1,394 bytesreferences/func-keyword-only.mddoc · 1,495 bytesreferences/func-lru-cache.mddoc · 1,665 bytesreferences/func-partial.mddoc · 1,649 bytesreferences/func-reduce-calls.mddoc · 1,338 bytesreferences/io-aiofiles.mddoc · 1,545 bytesreferences/io-async-gather.mddoc · 1,510 bytesreferences/io-connection-pooling.mddoc · 1,772 bytesreferences/io-defer-await.mddoc · 1,611 bytesreferences/io-semaphore.mddoc · 1,899 bytesreferences/io-uvloop.mddoc · 1,310 bytesreferences/loop-any-all.mddoc · 1,402 bytesreferences/loop-comprehension.mddoc · 1,401 bytesreferences/loop-dict-items.mddoc · 1,243 bytesreferences/loop-enumerate.mddoc · 1,412 bytesreferences/loop-hoist-invariants.mddoc · 1,692 bytesreferences/loop-itertools.mddoc · 1,442 bytesreferences/mem-array-for-numeric.mddoc · 1,375 bytesreferences/mem-generators.mddoc · 1,592 bytesreferences/mem-intern-strings.mddoc · 1,721 bytesreferences/mem-slots.mddoc · 1,363 bytesreferences/mem-weak-references.mddoc · 1,652 bytesreferences/py-dataclass.mddoc · 1,560 bytesreferences/py-lazy-import.mddoc · 1,686 bytesreferences/py-local-variables.mddoc · 1,432 bytesreferences/py-match-statement.mddoc · 1,982 bytesreferences/py-walrus-operator.mddoc · 1,378 bytesreferences/py-zero-cost-exceptions.mddoc · 1,599 bytesreferences/str-fstring.mddoc · 1,294 bytesreferences/str-join-concatenation.mddoc · 1,276 bytesreferences/str-startswith-tuple.mddoc · 1,209 bytesreferences/str-translate.mddoc · 1,625 bytes
Read excerpt
# 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:
- Writing new Python async I/O code
- Choosing data structures for collections
- Optimizing memory usage in data-intensive applications
- Implementing concurrent or parallel processing
- Reviewing Python code for performance issues
## Rule Categories by Priority