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/chandrudp29/skillhub/python-patternsnpx skills add chandrudp29/skillhub --skill python-patternsgit clone --depth 1 https://github.com/chandrudp29/skillhubWhat 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.00041 | $0.01531 |
| Opus 5 | $0.00020 | $0.00766 |
| Sonnet 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 yesterday.
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.
- yesterday First seen · 209 lines · 41 tokens per session scan A 8df2c537650e
python-patterns is a skill published in the GitHub repository chandrudp29/skillhub (13 stars, last pushed 2mo ago), licensed MIT. It adds 41 tokens to every session and 1,531 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
code-review
Performs thorough code reviews with focus on best practices, security, performance, and maintainability. Use this skill when reviewing pull requests, auditing code quality, or getting feedback on implementations.
shark
The Shark Pattern — universal non-blocking execution for any AI coding agent. Spawn remoras for slow tools, keep the main agent swimming. Works with Claude Code, Codex, Gemini CLI, Cursor, Aider, OpenClaw.
python-best-practices
Modern Python 3.12+ patterns your AI agent should use. Type hints, async/await, Pydantic v2, uv, match statements, and project structure.
database-performance
Database access patterns for performance. Separate read/write models, avoid N+1 queries, use AsNoTracking, apply row limits, and never do application-side joins. Works with EF Core and Dapper.
performant-code
Writing efficient code that handles large data and tight constraints.
test-patterns
Applies proven testing patterns — Arrange-Act-Assert (AAA), Given-When-Then, Test Data Builders, Object Mother, parameterized tests, fixtures, spies, and test doubles — to help write maintainable, reliable, and readable test suites. Use when the user asks about writing unit tests, integration tests, or end-to-end…