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/goldziher/ai-rulez/python-conventionsnpx skills add Goldziher/ai-rulez --skill python-conventionsgit clone --depth 1 https://github.com/Goldziher/ai-rulezWhat 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.00045 | $0.00382 |
| Opus 5 | $0.00023 | $0.00191 |
| Sonnet 5 | $0.00009 | $0.00076 |
| Haiku 4.5 | $0.00005 | $0.00038 |
Grade A, and why
python-conventions 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 3d 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.
What it actually says
- Python 3.10+, type hints on all public APIs, avoid
Any— use precise types, generics, ortyping.Protocol. - Formatting/linting: a fast linter/formatter (e.g., Ruff), zero warnings; strict static type checking (e.g., mypy or pyright). Security: a SAST tool (e.g., Bandit).
- Testing:
pytestwith function-based tests,pytest-cov(80%+),hypothesisfor property-based. - Error handling: specific exceptions only, never bare
except:,contextlib.suppressfor intentional ignoring. - Dataclasses or Pydantic for structured data — avoid raw dicts for known schemas.
pathlib.Pathoveros.pathfor filesystem operations. Google-style docstrings on public APIs.- Async:
async/awaitfor I/O, never mix blocking and async,asyncio.gather()for concurrency. - Package management: a fast, lockfile-based package manager (e.g., uv) with the lockfile committed, build with a PEP 517 backend (e.g., maturin or hatchling).
- Security:
pip-auditfor dependency CVE scanning. Zero tolerance for critical/high vulnerabilities. - Logging: structured logging (key=value / JSON) — never f-strings in log calls.
- Pattern matching (
match/case) for multi-branch type dispatch (3.10+). - Anti-patterns: mutable default args,
import *, global state,time.sleepin async.
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.
- 3d ago First seen · 18 lines · 45 tokens per session scan A c5869959dbe9
python-conventions is a skill published in the GitHub repository Goldziher/ai-rulez (139 stars, last pushed 9d ago), licensed MIT. It adds 45 tokens to every session and 382 once invoked, about $0.0002 per session on Opus 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-08-30.
Other skills, from other repositories
python-testing
Guidelines for writing and running tests in the Agent Framework Python codebase. Use this when creating, modifying, or running tests.
testing-python
Write and evaluate effective Python tests using pytest. Use when writing tests, reviewing test code, debugging test failures, or improving test coverage. Covers test design, fixtures, parameterization, mocking, and async testing.
pytest
Pytest testing patterns for Python. Trigger: When writing or refactoring pytest tests (fixtures, mocking, parametrize, markers). For Prowler-specific API/SDK testing conventions, also use prowler-test-api or prowler-test-sdk.
python-testing
Select and run Python SDK verification with nox, Makefile targets, Ruff, mypy, pytest markers, sanity tests, type inference checks, and build checks. Use when adding Python tests, diagnosing Python CI, or validating Python SDK/provider changes. Do not use for TypeScript-only checks.
pytest-asyncio-httpx-mocking
When masking httpx.AsyncClient with unittest.mock in Pytest, AsyncMock must be used instead of MagicMock for async methods like post/get to prevent TypeError when awaited.
test-writer
How to write pytest tests for modules in this workspace. Load whenever you are about to write or extend tests.