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 Global-mindee/WAY --skill python-best-practicesgit clone --depth 1 https://github.com/Global-mindee/WAYWrote 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/global-mindee/way/python-best-practices)<a href="https://agentmods.dev/skills/global-mindee/way/python-best-practices"><img src="https://agentmods.dev/badge/skills/global-mindee/way/python-best-practices/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/global-mindee/way/python-best-practices"><img src="https://agentmods.dev/badge/skills/global-mindee/way/python-best-practices.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.00024 | $0.01901 |
| Opus 5.5 | $0.00010 | $0.00760 |
| Sonnet 5.5 | $0.00005 | $0.00380 |
| Haiku 4.5 | $0.00002 | $0.00190 |
Grade A, and why
python-best-practices 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 3mo 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 — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Best Practices
Type Hints (3.12+ Syntax)
# Use built-in generics (3.9+), no need for typing.List, typing.Dict
def process_items(items: list[str]) -> dict[str, int]:
return {item: len(item) for item in items}
# Union with | syntax (3.10+)
def find_user(user_id: int) -> User | None:
...
# Type parameter syntax (3.12+)
type Vector[T] = list[T]
type Matrix[T] = list[Vector[T]]
def first[T](items: list[T]) -> T:
return items[0]
# TypedDict for structured dicts
from typing import TypedDict
class UserResponse(TypedDict):
id: int
name: str
email: str
active: bool
Always type function signatures. Use mypy --strict or pyright in CI. Use type: ignore comments sparingly with justification.
Dataclasses vs Pydantic
Dataclasses (internal data, no validation needed)
from dataclasses import dataclass, field
@dataclass(frozen=True, slots=True)
class Point:
x: float
y: float
def distance_to(self, other: "Point") -> float:
return ((self.x - other.x) ** 2 + (self.y - other.y) ** 2) ** 0.5
@dataclass
class Config:
host: str = "localhost"
port: int = 8080
tags: list[str] = field(default_factory=list)
Use frozen=True for immutable value objects. Use slots=True for memory efficiency.
Pydantic (external input, validation required)
from pydantic import BaseModel, Field, field_validator
class CreateUserRequest(BaseModel):
model_config = {"strict": True}
email: str = Field(max_length=255)
name: str = Field(min_length=1, max_length=100)
age: int = Field(ge=13, le=150)
@field_validator("email")
@classmethod
def validate_email(cls, v: str) -> str:
if "@" not in v:
raise ValueError("Invalid email format")
return v.lower()
Rule: Use dataclasses for domain models and internal structs. Use Pydantic for API boundaries, config files, and external data parsing.
Async Patterns
import asyncio
import httpx
async def fetch_user(client: httpx.AsyncClient, user_id: int) -> User:
response = await client.get(f"/users/{user_id}")
response.raise_for_status()
return User(**response.json())
async def fetch_all_users(user_ids: list[int]) -> list[User]:
async with httpx.AsyncClient(base_url="https://api.example.com") as client:
tasks = [fetch_user(client, uid) for uid in user_ids]
return await asyncio.gather(*tasks)
async def process_with_semaphore(items: list[str], max_concurrent: int = 10):
semaphore = asyncio.Semaphore(max_concurrent)
async def bounded_process(item: str):
async with semaphore:
return await process_item(item)
return await asyncio.gather(*[bounded_process(i) for i in items])
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.
- 3mo ago First seen · 283 lines · 24 tokens per session scan A fc78210958dd
python-best-practices is a skill published in the GitHub repository Global-mindee/WAY (11 stars, last pushed 2mo ago), licensed MIT. It adds 24 tokens to every session and 1,901 once invoked, about $0.0001 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.
python-best-practices compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| python-best-practicesGlobal-mindee/WAY | Skill | 11 | 2mo ago | MIT | A | 24 | Claude Code, Codex |
| pennylaneK-Dense-AI/scientific-agent-skills | Skill | 59k | 2d ago | MIT | A | 74 | Claude Code |
| future-self-liteTHU-MAIC/OpenMAIC | Skill | 46k | today | MIT | A | 20 | Claude Code, Codex |
| precisemicroprediction/precise | Skill | 340 | 1mo ago | MIT | A | 76 | Claude Code, Codex |
| python-app-conventionsAratKruglik/claude-sdlc | Skill | 57 | yesterday | MIT | A | 239 | Claude Code |
| python-typing-ops0xDarkMatter/claude-mods | Skill | 86 | 8d ago | MIT | A | 44 | Claude Code |
| r-python-translationbrycewang-stanford/Auto-Empirical-Research-Skills | Skill | 5.4k | yesterday | none | A | 70 | Claude Code, Codex |