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/pixell-global/sayou/sayou-python-conventionsgit clone --depth 1 https://github.com/pixell-global/sayouWhat 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.00000 | $0.00535 |
| Opus 5 | $0.00000 | $0.00267 |
| Sonnet 5 | $0.00000 | $0.00107 |
| Haiku 4.5 | $0.00000 | $0.00053 |
Grade A, and why
sayou-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 2d 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 — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Sayou Python conventions
Async
- All I/O-bound code must use
async/await. The codebase is async throughout (SQLAlchemy async, aiosqlite, FastMCP async handlers). - Never introduce synchronous database calls (
session.execute(...)withoutawait) in any hot path. - Use
asyncio.gatherfor concurrent operations where appropriate.
Configuration and environment
- All configuration is driven by
SAYOU_*environment variables (e.g.SAYOU_DATABASE_URL,SAYOU_API_KEY,SAYOU_EMBEDDING_PROVIDER). - Use Pydantic
BaseSettings(viapydantic-settings) for config classes. Do not reados.environdirectly in business logic. - Secrets and deployment-specific values must never be hardcoded; always reference the corresponding
SAYOU_*env var.
Code style (Ruff)
- Line length: 100 characters.
- Target Python version: 3.11.
- Follow Ruff defaults for import ordering, unused imports, and style. Run
ruff checkandruff formatbefore committing. - Use
from __future__ import annotationsat the top of every module for deferred annotation evaluation.
Type annotations
- All public functions and methods must have full type annotations (parameters and return type).
- Use
collections.abctypes (Sequence,Mapping,AsyncIterator, …) rather thantypingequivalents where possible (Python 3.11+).
Database access
- Use SQLAlchemy 2 async session (
AsyncSession). Always acquire sessions through the dependency-injected factory; do not create ad-hoc engine instances in application code. - Alembic migrations live in
alembic/versions/. New schema changes must include a migration script.
Error handling
- Raise domain-specific exceptions rather than bare
Exception. Define custom exceptions in the relevant module. - MCP tool handlers must return structured error responses (not raise uncaught exceptions) so the MCP client receives a well-formed error.
Tests
- All tests are async and use
pytest-asynciowithasyncio_mode = "auto". - Use
motofor mocking AWS services (S3) and provide in-memory SQLite (aiosqlite:///:memory:) for DB tests.
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.
- 2d ago First seen · 47 lines · 0 tokens per session scan A 3463759eb4f2
sayou-python-conventions is a cursor rule published in the GitHub repository pixell-global/sayou (28 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 535 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-30.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.