Borrowing it
Nothing to install: this file belongs to jefflester/claude-skills-supercharged. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/jefflester/claude-skills-supercharged/main/.claude/skills/python-best-practices/SKILL.mdgit clone --depth 1 https://github.com/jefflester/claude-skills-superchargedWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jefflester/claude-skills-supercharged/python-best-practices)<a href="https://agentmods.dev/skills/jefflester/claude-skills-supercharged/python-best-practices"><img src="https://agentmods.dev/badge/skills/jefflester/claude-skills-supercharged/python-best-practices.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.02516 |
| Opus 5 | $0.00018 | $0.01258 |
| Sonnet 5 | $0.00007 | $0.00503 |
| Haiku 4.5 | $0.00004 | $0.00252 |
Grade A, and why
python-best-practices scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
response = requests.get(url, timeout=TIMEOUT_SECONDS) How it starts
The opening of the file, as written. The whole thing — 485 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Best Practices
Purpose
This skill provides guidance on Python development best practices to ensure code quality, maintainability, and consistency across your Python projects.
When to Use This Skill
Auto-activates when:
- Working with Python files (*.py)
- Mentions of "python", "best practices", "style guide"
- Adding type hints or docstrings
- Code refactoring in Python
Style Guidelines
PEP 8 Compliance
Follow PEP 8 style guide for Python code:
- Indentation: 4 spaces per indentation level
- Line Length: Maximum 79 characters for code, 72 for docstrings/comments
- Blank Lines: 2 blank lines between top-level definitions, 1 between methods
- Imports: Always at top of file, grouped (stdlib, third-party, local)
- Naming Conventions:
snake_casefor functions, variables, modulesPascalCasefor classesUPPER_SNAKE_CASEfor constants- Leading underscore
_namefor internal/private
Import Organization
Always organize imports in this order:
# 1. Standard library imports
import os
import sys
from pathlib import Path
# 2. Third-party imports
import requests
import numpy as np
# 3. Local application imports
from myapp.core import MyClass
from myapp.utils import helper_function
Avoid circular imports by using TYPE_CHECKING:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from myapp.other_module import OtherClass
def my_function(obj: "OtherClass") -> None:
"""Function that uses OtherClass only for type hints."""
pass
Type Hints
Always Use Type Hints
Type hints improve code clarity and catch errors early:
def process_data(
items: list[str],
max_count: int | None = None,
verbose: bool = False
) -> dict[str, int]:
"""Process items and return counts.
Parameters
----------
items : list[str]
List of items to process
max_count : int | None, optional
Maximum items to process, by default None
verbose : bool, optional
Enable verbose output, by default False
Returns
-------
dict[str, int]
Dictionary mapping items to counts
"""
result: dict[str, int] = {}
for item in items[:max_count]:
result[item] = result.get(item, 0) + 1
if verbose:
print(f"Processed: {item}")
return result
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 485 lines · 37 tokens per session scan A 45b0a697b9b2
python-best-practices is a skill published in the GitHub repository jefflester/claude-skills-supercharged (42 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 2,516 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
matlab
Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.
pennylane
Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with…
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.
rocm-kernels
Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…
holoscan-install-wheel
Install Holoscan SDK Python wheel via pip into a venv. Use for Python installs; not for native C++/apt or Conda installs.
typing-exclusion-worker
Python typing exclusion worker: remove assigned mypy exclusion modules in small scoped batches, fix typing issues, run validation, and produce a structured completion summary. Use when running parallel typing-debt workers or when asked to remove modules from pyproject mypy exclusion overrides.