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 rules/technickai/claude_telemetry/code-style-and-zen-of-pythongit clone --depth 1 https://github.com/TechNickAI/claude_telemetryWhat 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.00003 | $0.00870 |
| Opus 5 | $0.00002 | $0.00435 |
| Sonnet 5 | $0.00001 | $0.00174 |
| Haiku 4.5 | $0.00000 | $0.00087 |
Grade A, and why
code-style-and-zen-of-python 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- code-style-and-zen-of-python — 92% identical, 1 lines differ
How it starts
The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Style and Zen of Python
Line Length
- Max 88 chars (per Ruff config)
Comments
File-Level Comments
Be THOROUGH at the top of files. Explain what the file does, why it exists, and how it fits into the larger system. This helps both humans and AI understand context quickly.
"""User authentication and session management.
Handles user login, logout, token generation, and session validation.
Integrates with external OAuth providers (Google, GitHub) and maintains
local session state in Redis for performance. Session tokens expire after
24 hours but can be refreshed up to 7 days from initial login.
"""
Function Comments
Keep function docstrings USEFUL without redundant fluff. Type hints already document parameters and return types, so focus the docstring on what the function does and why.
# Standard pattern for complex functions - explain the what and why
def create_agent_from_task(self, task_id: str) -> dict:
"""Create a new agent from a ClickUp task description.
Parses task description for agent requirements, generates the .agent
file with system/user prompts, creates PR with the new file, and
returns PR URL for review.
"""
# Simple functions need just one clear line
def validate_email(email: str) -> bool:
"""Check if email format is valid and domain is not blacklisted."""
def process_payment(order_id: str, amount: Decimal) -> Payment:
"""Charge the customer via Stripe and update order status to paid."""
def send_welcome_email(user: User) -> None:
"""Send onboarding email with account setup instructions."""
def calculate_shipping_cost(weight: Decimal, destination: str) -> Decimal:
"""Calculate shipping based on weight and zone rates from ShipStation."""
Avoid restating type hints in Args/Returns sections - they add no value since types are already declared.
Inline Comments
Be SPARSE with inline comments. Only add them when the code is doing something non-obvious or when explaining business logic that isn't clear from the code itself.
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 · 119 lines · 3 tokens per session scan A c8c6e3f8bdd4
code-style-and-zen-of-python is a cursor rule published in the GitHub repository TechNickAI/claude_telemetry (30 stars, last pushed 10mo ago), licensed MIT. It adds 3 tokens to every session and 870 once invoked, about $0.0000 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 cursor rules, from other repositories
python_tests
We use the unit tests to cover internal behavior that can work without the web / backend counterpart. We aim for 95%+ unit test coverage of our Python code in lib/streamlit.
fastapi-production-architecture-cursorrules-prompt-file
Cursor rules for FastAPI services with router/service/repository boundaries, typed provider adapters, bulkhead isolation, idempotency, and domain exceptions.
django
Definitive guidelines for writing maintainable, performant, and secure Django applications, emphasizing modern best practices, clear code organization, and efficient patterns.
sqlmodel
Satisfying the type checker when working with SQLModel.
python
Python开发规则 - Python最佳实践和项目结构 (python, pip, django, flask, fastapi).
backend-python
Cursor rule "backend-python" from coeusyk/inference-x, covering backend python rules, stack assumptions, code style, fastapi conventions and schema conventions.