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.
git clone --depth 1 https://github.com/pueraeternis/agentic-project-templateWrote 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/rules/pueraeternis/agentic-project-template/10-python-standards)<a href="https://agentmods.dev/rules/pueraeternis/agentic-project-template/10-python-standards"><img src="https://agentmods.dev/badge/rules/pueraeternis/agentic-project-template/10-python-standards/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/rules/pueraeternis/agentic-project-template/10-python-standards"><img src="https://agentmods.dev/badge/rules/pueraeternis/agentic-project-template/10-python-standards.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.00000 | $0.00590 |
| Opus 5.5 | $0.00000 | $0.00236 |
| Sonnet 5.5 | $0.00000 | $0.00118 |
| Haiku 4.5 | $0.00000 | $0.00059 |
Grade A, and why
10-python-standards 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 1mo 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 — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Engineering Standards
These rules apply to Python source code.
Project-specific conventions documented in ENGINEERING.md take precedence over these defaults.
Type Safety
Use type annotations for all public functions, methods, and module-level constants where appropriate.
Prefer explicit types over Any.
Prefer structured domain models over untyped dictionaries.
Prefer:
- explicit return types;
- typed collections;
- dataclasses or Pydantic models where appropriate;
Protocolfor behavioral interfaces.
Avoid unnecessary use of:
Any;dict[str, Any];- untyped containers.
Function Design
Functions should:
- have a single responsibility;
- have explicit inputs and outputs;
- minimize side effects;
- remain reasonably small.
Prefer pure functions whenever practical.
Use descriptive names that express business intent.
Avoid vague names such as:
def process(data):
...
Class Design
Classes should have a single responsibility.
Prefer composition over inheritance.
Prefer dependency injection over hidden global state.
Avoid deep inheritance hierarchies unless clearly justified.
Error Handling
Raise exceptions that accurately describe failures.
Catch only exceptions that can be handled meaningfully.
Never silently ignore exceptions.
Avoid:
except Exception:
pass
Exception messages should help diagnose the problem.
Logging
Use the project's logging framework.
Prefer parameterized logging.
Example:
logger.info("Created task %s", task_id)
Avoid:
logger.info(f"Created task {task_id}")
Never use print() outside CLI utilities or interactive scripts.
Imports
Keep imports at module level.
Avoid:
- circular dependencies;
- import-time side effects;
- unnecessary dynamic imports.
Use TYPE_CHECKING for type-only imports that would otherwise create dependency cycles.
Group imports according to PEP 8.
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.
- 1mo ago First seen · 197 lines · 0 tokens per session scan A 5967ec1bf101
10-python-standards is a cursor rule published in the GitHub repository pueraeternis/agentic-project-template (2 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 590 tokens. 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-31.
Other cursor rules, from other repositories
010-python-tooling
Python tooling and dependency conventions for plugin-eval and tools/.
database-algorithm-rules
Database algorithm rules guide Python applications that store and retrieve data, including containerized services. They cover schema design, indexes, query efficiency, transactions, connection pools, caching, retries, and migrations.
python-django-general
General coding guidance for Python and Django projects, including naming, formatting, modular apps, built-in tools, and maintainable structure. Python is a programming language, and Django is a Python web framework.
python-general-style
Python style rules covering functional code, reusable modules, descriptive names, file naming, and a pattern where a function receives one object and returns one object.
python-general-coding-standards
A set of general standards for Python projects, including type hints, input checking, code style, security, web requests, background work, and tests. It also covers FastAPI-specific tasks such as CORS and authentication.
django-models
A small set of rules for Django models, the Python framework's definitions of database-backed data. It also guides how Django code should access and validate that data.