Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/everyone-needs-a-copilot/claude-copilot/python-idiomsnpx skills add Everyone-Needs-A-Copilot/claude-copilot --skill python-idiomsgit 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.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 | $0.00116 | $0.02018 |
| Opus 5 | $0.00058 | $0.01009 |
| Sonnet 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 today.
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.
- today 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 (13 stars, last pushed 10d ago), licensed MIT. It adds 116 tokens to every session and 2,018 once invoked, about $0.0006 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-09-04.
Other skills, from other repositories
code-reviewer-python
Auto-route to this skill if project contains.
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…
quality-gates
Use when assessing task complexity, before starting complex tasks, when stuck after multiple attempts, or reviewing code against best practices. Provides quality-gates scoring (1-5), escalation workflows, and pattern library management.
flask-werkzeug-attack
Exploit Flask/Werkzeug debugger exposure for traceback and SECRET leaks.
django
Use when building, reviewing, securing, testing or shipping a Django app — models, migrations, QuerySets/managers, FBV/CBV views, forms, the admin, settings split, and Django REST Framework (serializers, ModelViewSet, permissions). NOT async FastAPI/Pydantic services (that is fastapi), NOT Postgres schema/index work…
broker-integration
Integrate a new Indian broker into OpenAlgo, or modify an existing broker plugin. Use when wiring up a broker's auth/login, orders, quotes, depth, history, funds, margin, symbol master, or WebSocket streaming; when a broker does not appear in the login dropdown or fails to load; or when debugging broker-specific…