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 chandrudp29/skillhub --skill python-patternsgit clone --depth 1 https://github.com/chandrudp29/skillhubWrote 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/chandrudp29/skillhub/python-patterns)<a href="https://agentmods.dev/skills/chandrudp29/skillhub/python-patterns"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/python-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/chandrudp29/skillhub/python-patterns"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/python-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.00041 | $0.01531 |
| Opus 5.5 | $0.00016 | $0.00612 |
| Sonnet 5.5 | $0.00008 | $0.00306 |
| Haiku 4.5 | $0.00004 | $0.00153 |
Grade A, and why
python-patterns 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
result = requests.get(url) # blocks the event loop for everyone How it starts
The opening of the file, as written. The whole thing — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Patterns
Modern Python (3.10+) patterns for production code. Specific, opinionated, actionable.
When to Use
- Writing new Python modules or services
- Reviewing Python code for quality
- Modernizing Python 2-era or early Python 3 code
- Debugging subtle Python behavior
Type Hints
Always type hint public functions. It's documentation that tools can check.
# Good — clear what goes in and what comes out
def chunk_text(text: str, max_tokens: int = 512) -> list[str]:
...
# Good — complex types use type aliases
from typing import TypeAlias
JsonDict: TypeAlias = dict[str, "JsonValue"]
JsonValue: TypeAlias = str | int | float | bool | None | list["JsonValue"] | JsonDict
# Good — use | for unions (Python 3.10+), not Optional
def find_user(user_id: int) -> User | None:
...
# Good — use dataclass for structured data, not plain dicts
from dataclasses import dataclass, field
@dataclass
class EmbeddingResult:
text: str
vector: list[float]
model: str
token_count: int
metadata: dict[str, str] = field(default_factory=dict)
Async Patterns
Use async for I/O-bound work. Don't use it for CPU-bound work.
import asyncio
import httpx
# Good — concurrent I/O with asyncio.gather
async def fetch_all(urls: list[str]) -> list[dict]:
async with httpx.AsyncClient() as client:
tasks = [client.get(url) for url in urls]
responses = await asyncio.gather(*tasks, return_exceptions=True)
return [r.json() for r in responses if not isinstance(r, Exception)]
# Good — async context manager for resource cleanup
class DatabasePool:
async def __aenter__(self):
self._conn = await connect()
return self._conn
async def __aexit__(self, *args):
await self._conn.close()
# Good — async generator for streaming
async def stream_llm_response(prompt: str):
async with client.stream("POST", "/completions", json={"prompt": prompt}) as r:
async for chunk in r.aiter_lines():
if chunk:
yield chunk
# BAD — blocking I/O in async code
async def bad_example():
import requests
result = requests.get(url) # blocks the event loop for everyone
What ships with it
1 file 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.
- 3mo ago First seen · 209 lines · 41 tokens per session scan A 8df2c537650e
python-patterns is a skill published in the GitHub repository chandrudp29/skillhub (14 stars, last pushed 5mo ago), licensed MIT. It adds 41 tokens to every session and 1,531 once invoked, about $0.0002 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-08-30.
python-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| python-patternschandrudp29/skillhub | Skill | 14 | 5mo ago | MIT | A | 41 | Claude Code, Codex |
| asyncio-concurrency-patternsmanutej/luxor-claude-marketplace | Skill | 64 | 5mo ago | none | A | 31 | Claude Code |
| fastapiericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 94 | Claude Code, Codex |
| pythonericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 94 | Claude Code, Codex |
| pypi-releasealchemiststudiosDOTai/tunacode | Skill | 124 | 1mo ago | MIT | A | 52 | Claude Code, Codex |
| fastapi-expertpersonamanagmentlayer/pcl | Skill | 46 | 1mo ago | Apache-2.0 | A | 49 | Claude Code |
| plugin-systemellmos-ai/skills | Skill | 10 | yesterday | MIT | A | 99 | Claude Code, Codex |