Our review
This skill provides guidelines for writing clean and consistent Python code, focusing on imports, formatting, and function parameter definitions.
Strengths
- Encourages imports at the top of the file
- Uses underscores for large numbers
- Enforces keyword-only arguments for multi-parameter functions
- Discourages cluttering __init__.py
Limitations
- Does not cover naming conventions (PEP8)
- Can be overly restrictive for some projects
- Does not address type annotations
Use this skill when creating or modifying Python code and want to adhere to a strict, clear style convention.
Avoid this skill if you are working on a project with its own style guide or if flexibility is preferred.
Security analysis
SafeThis skill contains only Python style and code organization guidelines. There are no executable commands, destructive operations, or any instructions that could pose a security risk.
No concerns found
Examples
Create a new Python file called utils.py. Ensure imports are at the top, use keyword-only arguments for any functions with more than one parameter, and do not add anything to __init__.py.Refactor the following Python code to follow best practices: move all imports to the top, enforce keyword arguments in functions with multiple parameters, and use underscores for large numbers where applicable.Add a function `calculate_tax(*, income: float, rate: float) -> float` that computes tax. Make sure all parameters are keyword-only and required.name: python description: Guidelines when creating, reading, updating, or deleting Python code
Python Guidelines
Instructions
imports
Imports should ALWAYS be at the top of the file. NEVER have local imports unless it is 100% necessary.
formatting
For big numbers, use _ to make numbers more clear
BAD: foo = 1000
GOOD: foo = 1_000
init.py files
Do not add anything inside of __init__.py files unless it is absolutely necessary or you are explicitly asked to.
This includes adding __all__; NEVER add that.
function parameters
Functions with more than 1 parameter should ALWAYS use * to enforce keyword arguments.
BAD: def foo(a, b, c): ...
GOOD: def foo(*, a, b, c): ...
Functions should always use required parameters unless making a parameter optional is absolutely necessary.
Functions should not set defaults for parameters unless it is an EXTREMELY sane default.
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.