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 skills add VersoXBT/claude-initial-setup --skill pythonic-patternsgit clone --depth 1 https://github.com/VersoXBT/claude-initial-setupWrote 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/versoxbt/claude-initial-setup/pythonic-patterns)<a href="https://agentmods.dev/skills/versoxbt/claude-initial-setup/pythonic-patterns"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/pythonic-patterns/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/versoxbt/claude-initial-setup/pythonic-patterns"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/pythonic-patterns.svg" alt="Reviewed on agentmods" width="80" 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.00071 | $0.01557 |
| Opus 5.5 | $0.00028 | $0.00623 |
| Sonnet 5.5 | $0.00014 | $0.00311 |
| Haiku 4.5 | $0.00007 | $0.00156 |
Grade A, and why
pythonic-patterns scanned grade A with 0 findings 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 2mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pythonic Patterns
Write idiomatic Python that leverages the language's expressive power. Pythonic code is concise, readable, and uses built-in constructs instead of reinventing them.
When to Use
- User writes Python loops that could be comprehensions
- User asks for "Pythonic" or "idiomatic" Python
- Refactoring Python code for readability
- User works with iterables, files, or resource management
- User defines simple data containers or wrapper functions
Core Patterns
List Comprehensions and Generator Expressions
Use comprehensions for transforming and filtering sequences. Use generator expressions for large datasets to avoid materializing the entire list in memory.
# Comprehension with filtering
active_emails = [user.email for user in users if user.is_active]
# Dict comprehension
scores_by_name = {s.name: s.score for s in students}
# Set comprehension for deduplication
unique_domains = {email.split("@")[1] for email in emails}
# Generator expression for large data -- lazy evaluation
total = sum(order.amount for order in orders if order.status == "paid")
# Nested comprehension (keep it readable -- max 2 levels)
flat = [cell for row in matrix for cell in row]
Generators and Iterators
Use generators when you need lazy evaluation, infinite sequences, or pipeline processing.
def read_chunks(file_path: str, chunk_size: int = 8192):
"""Yield file chunks without loading entire file into memory."""
with open(file_path, "rb") as f:
while chunk := f.read(chunk_size):
yield chunk
def fibonacci():
"""Infinite Fibonacci generator."""
a, b = 0, 1
while True:
yield a
a, b = b, a + b
# Pipeline processing with generators
def process_pipeline(records):
cleaned = (clean(r) for r in records)
validated = (r for r in cleaned if is_valid(r))
transformed = (transform(r) for r in validated)
yield from transformed
Context Managers
Use context managers for any resource that needs setup/teardown. Prefer contextlib
for simple cases.
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.
- 2mo ago First seen · 230 lines · 71 tokens per session scan A 7e995acd4d2e
pythonic-patterns is a skill published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 6mo ago), licensed MIT. It adds 71 tokens to every session and 1,557 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
pythonic-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pythonic-patternsVersoXBT/claude-initial-setup | Skill | 4 | 6mo ago | MIT | A | 71 | Claude Code |
| fastapi-templateswshobson/agents | Skill | 43k | 6d ago | MIT | A | 37 | Claude Code |
| temporal-python-testingwshobson/agents | Skill | 43k | 6d ago | MIT | A | 45 | Claude Code |
| py-debugberekvolgyipeter/dotclaude | Skill | 2 | yesterday | MIT | A | 54 | Claude Code, Codex |
| python-conventionstmj-90/gaffer | Skill | 1 | yesterday | Apache-2.0 | A | 120 | Claude Code, Codex |
| sota-pythonmartinholovsky/SOTA-skills | Skill | 31 | yesterday | CC-BY-4.0 | A | 141 | Claude Code |
| python-expertApexIQ/skillsmith | Skill | 5 | 8mo ago | MIT | A | 47 | Claude Code, Codex |