Borrowing it
Nothing to install: this file belongs to Everyone-Needs-A-Copilot/claude-copilot. 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/Everyone-Needs-A-Copilot/claude-copilot/main/.claude/skills/code/python-idioms/SKILL.mdgit clone --depth 1 https://github.com/Everyone-Needs-A-Copilot/claude-copilotWrote 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/everyone-needs-a-copilot/claude-copilot/python-idioms)<a href="https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/python-idioms"><img src="https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/python-idioms/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/python-idioms"><img src="https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/python-idioms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00116 | $0.02018 |
| Opus 5.5 | $0.00046 | $0.00807 |
| Sonnet 5.5 | $0.00023 | $0.00404 |
| Haiku 4.5 | $0.00012 | $0.00202 |
Grade A, and why
python-idioms 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 1mo 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.
_cache[key] = fetch(key) How it starts
The opening of the file, as written. The whole thing — 327 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Idioms
Pythonic patterns, anti-patterns, and quality rules for clean Python code.
Core Principles
| Principle | Description |
|---|---|
| Explicit > Implicit | Clear, readable code over clever tricks |
| EAFP | Easier to Ask Forgiveness than Permission |
| Duck Typing | Focus on behavior, not types |
| Flat > Nested | Avoid deep nesting |
Patterns vs Anti-Patterns
List/Dict Comprehensions
# GOOD: List comprehension
squares = [x**2 for x in range(10) if x % 2 == 0]
# BAD: Manual loop for simple transforms
squares = []
for x in range(10):
if x % 2 == 0:
squares.append(x**2)
Context Managers
# GOOD: Context manager for resources
with open('file.txt') as f:
content = f.read()
# BAD: Manual resource management
f = open('file.txt')
try:
content = f.read()
finally:
f.close()
Unpacking
# GOOD: Tuple unpacking
first, *rest, last = items
x, y = point
# BAD: Index access
first = items[0]
last = items[-1]
x = point[0]
y = point[1]
Iteration
# GOOD: Direct iteration
for item in items:
process(item)
# GOOD: Enumerate when index needed
for i, item in enumerate(items):
print(f"{i}: {item}")
# BAD: Range-based iteration
for i in range(len(items)):
process(items[i])
Dictionary Operations
# GOOD: dict.get() with default
value = data.get('key', default_value)
# GOOD: setdefault for initialization
cache.setdefault(key, []).append(item)
# BAD: Check and access
if 'key' in data:
value = data['key']
else:
value = default_value
String Formatting
# GOOD: f-strings (Python 3.6+)
message = f"Hello, {name}! You have {count} items."
# OK: .format() for dynamic templates
template = "Hello, {name}!"
message = template.format(name=name)
# BAD: % formatting or concatenation
message = "Hello, " + name + "!"
message = "Hello, %s!" % name
Boolean Checks
# GOOD: Truthiness
if items: # Not empty
if not items: # Empty
if value is None: # Explicit None check
# BAD: Explicit comparisons
if len(items) > 0:
if items != []:
if value == None:
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 327 lines · 116 tokens per session scan A 6979cde8ab59
python-idioms is a skill published in the GitHub repository Everyone-Needs-A-Copilot/claude-copilot (14 stars, last pushed yesterday), licensed MIT. It adds 116 tokens to every session and 2,018 once invoked, about $0.0005 per session on Opus 5.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-09-04.
Other skills, from other repositories
django-expert
Expert-level Django development for robust Python web applications with ORM, admin, and authentication. Use when the user mentions Python, web, ORM, MVC, or Django REST Framework, or when the task involves Django Architecture.
flask-expert
Expert-level Flask web development, REST APIs, extensions, and production deployment. Use when the user mentions Python, web framework, REST APIs, or Jinja2, or when the task involves Flask Fundamentals or Flask Extensions.
code-reviewer-python
Use when reviewing Python code, Python packaging, or Python-specific correctness and quality.
python-patterns
Python best practices — type hints, async/await, dataclasses, error handling, and performance patterns. Use when writing new Python code, reviewing Python, or modernizing legacy code.
py-clean-arch
Use this skill when the user asks about Clean Architecture in Python — not generic theory, but the specific layer conventions (l1entities, l2usecases, l3interfaceadapters, l4frameworksanddrivers), folder patterns, boundary interfaces, and .importlinter.ini contracts from CJHwong/py-clean-architecture-examples. Fetches…
django-patterns
Django architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps.