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/juandoroteoflesiauni-lang/Market-options-stocks-ScannerWrote 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/juandoroteoflesiauni-lang/market-options-stocks-scanner/01-backend-python)<a href="https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/01-backend-python"><img src="https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/01-backend-python/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/juandoroteoflesiauni-lang/market-options-stocks-scanner/01-backend-python"><img src="https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/01-backend-python.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.00029 | $0.01208 |
| Opus 5.5 | $0.00012 | $0.00483 |
| Sonnet 5.5 | $0.00006 | $0.00242 |
| Haiku 4.5 | $0.00003 | $0.00121 |
Grade A, and why
01-backend-python 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
requests.get(url) # → await httpx.AsyncClient().get(url) How it starts
The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🐍 BACKEND PYTHON — ESTÁNDARES DE CALIDAD v3.0
TOOLCHAIN (Gates de CI — código debe pasar todos antes de presentarlo)
black→ formato (línea máx. 100 chars)isort→ orden de imports (perfil black-compatible)ruff→ lint exhaustivomypy --strict→ tipos estrictosbandit→ SAST seguridadpip-audit→ CVEs en dependencias
TIPADO — OBLIGATORIO EN TODO
# ✅ CORRECTO
async def calculate_vpin(
snapshot: MarketSnapshot,
bucket_size: int,
) -> float: ...
# ❌ PROHIBIDO — sin tipos
def calculate_vpin(snapshot, bucket_size): ...
# ❌ PROHIBIDO — Any
from typing import Any
def process(data: Any) -> Any: ...
# ✅ CORRECTO — Decimal para precios (nunca float)
price: Decimal = Decimal("100.05")
# ❌ PROHIBIDO
price: float = 100.05
NOMENCLATURA
| Tipo | Convención | Ejemplo |
|---|---|---|
| Clases | PascalCase |
MarketDataHub |
| Funciones/vars | snake_case |
fetch_snapshot |
| Constantes | UPPER_CASE |
MAX_CANDIDATES = 300 |
| Privados | _single_underscore |
_circuit_breaker |
| Variables de 1 letra | PROHIBIDO | Usar ticker, no t |
| Nombres genéricos | PROHIBIDO | Nunca data, val, obj |
FUNCIONES — REGLAS DE DISEÑO
# Máximo 30 líneas. Si supera → refactorizar en subfunciones.
# Google-Style docstring OBLIGATORIO en funciones complejas:
async def fetch_option_chain(
ticker: str,
expiration_date: date,
) -> Result[list[OptionContract]]:
"""Descarga y valida la cadena completa de opciones.
Args:
ticker : Símbolo en mayúsculas (e.g., "AAPL").
expiration_date: Fecha de expiración a descargar.
Returns:
Result con lista de OptionContract, o failure si la API no responde.
Raises:
ValidationError: Si la respuesta falla validación de esquema.
"""
LOGGING — NO PRINT
import logging
logger = logging.getLogger(__name__)
# ✅ CORRECTO
logger.info("Fase A completa", extra={"count": len(candidates)})
logger.error("Fallo en Hub", extra={"ticker": ticker}, exc_info=True)
# ❌ PROHIBIDO
print(f"Fase A: {len(candidates)}")
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 · 166 lines · 1,208 tokens per session scan A 94febf6c8ad1
01-backend-python is a cursor rule published in the GitHub repository juandoroteoflesiauni-lang/Market-options-stocks-Scanner (12 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 29 tokens to every session and 1,208 once invoked, about $0.0001 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.
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.
django-python
Rules for writing Python services at PostHog (Python servers powered by the Django framework).
020-flask
Flask API Gateway conventions for LMForge.
py-fast-api
Cursor rules for Python FastAPI backend development and best practices.
python
Python best practices and patterns for modern software development with Flask and SQLite.
python--typescript-guide-cursorrules-prompt-file
Cursor rules for Python development with TypeScript guide integration.