- Home
- Skills
- Copyleftdev
- Sk1llz
- Vanrossum
vanrossum_skill
- Python
3
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill copyleftdev/sk1llz --skill vanrossum- SKILL.md5.1 KB
Overview
This skill teaches how to write Python code in the style of Guido van Rossum, emphasizing readability, simplicity, and the Pythonic way. It encodes principles and patterns that prioritize clear communication with future readers and maintainable design. Use it to produce code that follows Python’s design philosophy and PEP 8 conventions.
How this skill works
The skill inspects code structure, naming, and idioms and suggests rewrites that favor explicitness, straightforward abstractions, and standard-library solutions. It recommends concrete replacements (e.g., enumerate/zip, context managers, f-strings, pathlib, collections) and flags anti-patterns like clever one-liners, mutable default arguments, or bare excepts. Outputs include short explanations and code examples demonstrating the preferred Pythonic pattern.
When to use it
- Writing public APIs, libraries, or modules intended for broad consumption
- Refactoring legacy code to improve clarity and maintainability
- Preparing code for code review to match Python community standards
- Teaching or demonstrating Pythonic idioms and best practices
- Choosing implementations that favor readability over micro-optimizations
Best practices
- Prefer descriptive names and small functions that read like prose
- Follow PEP 8 and add docstrings for public functions and classes
- Use standard library primitives before adding dependencies
- Favor explicit control flow and context managers for resource handling
- Avoid clever, terse constructs that obscure intent; prefer clarity
- Use built-in idioms: enumerate, zip, f-strings, pathlib, collections types
Example use cases
- Convert index-based loops to direct iteration or enumerate for readability
- Replace manual resource handling with with-context managers for files and connections
- Refactor string building to use join or f-strings instead of concatenation
- Swap custom dict-of-lists patterns for defaultdict or setdefault
- Simplify conditional checks to use truthy/falsy idioms and is None when appropriate
FAQ
It prefers readability and maintainability over micro-optimizations; suggested changes avoid unnecessary slowdowns but favor clear, idiomatic code. If performance is critical, document and justify exceptions to style.
Does this enforce every PEP 8 rule automatically?
It recommends PEP 8 as the baseline and highlights violations, but it treats conventions pragmatically—some rules may be relaxed with clear rationale and documented exceptions.