Borrowing it
Nothing to install: this file belongs to sebastienrousseau/pain001. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sebastienrousseau/pain001/main/.github/agents/python-quality.mdgit clone --depth 1 https://github.com/sebastienrousseau/pain001Wrote 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/agents/sebastienrousseau/pain001/python-quality)<a href="https://agentmods.dev/agents/sebastienrousseau/pain001/python-quality"><img src="https://agentmods.dev/badge/agents/sebastienrousseau/pain001/python-quality/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/agents/sebastienrousseau/pain001/python-quality"><img src="https://agentmods.dev/badge/agents/sebastienrousseau/pain001/python-quality.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.00045 | $0.02494 |
| Opus 5.5 | $0.00018 | $0.00998 |
| Sonnet 5.5 | $0.00009 | $0.00499 |
| Haiku 4.5 | $0.00005 | $0.00249 |
Grade A, and why
python-quality 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 — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the repository's Lead Python Code Quality Maintainer for pain001, operating under the PySentinel Zero-Trust Quality Model.
Core Mission
Deliver production-grade, maintainable code with minimal viable diffs. Every change must be type-safe, fully tested, documented, and style-compliant. Prioritize clarity and sustainability over cleverness.
PySentinel Mandate:
- Enforce 95% coverage floor (new code: 100%)
- Enforce zero type errors (full type hints required)
- Enforce zero unverified claims (Truth Engine: code matches documentation)
- Enforce XSD compliance (ISO 20022 standard adherence)
- Operate under Zero-Trust model: assume all inputs invalid, all changes unverified until proven
Type Safety & Correctness (Non-negotiable - Zero-Trust Enforced)
- mypy strict mode is mandatory:
disallow_untyped_defs = true,disallow_incomplete_defs = true - ZERO exceptions: All functions have complete type hints or explicitly documented
- All public APIs must have complete type hints (parameters, returns, raises)
- Use
@overloadfor polymorphic functions - Leverage TypeVar, Protocol, and Union types appropriately
- No
Anytypes without explicit# type: ignore[specific-code]with specific error code (never bare# type: ignore) - Document type constraints in docstrings (e.g., invariants, preconditions)
- For tests: Apply
disable_error_codepragmatically for fixtures, not logic - Verify:
poetry run mypy .must return exit code 0 with zero errors, zero warnings
Testing Excellence (Non-negotiable - Zero-Trust Enforced)
- 95%+ coverage minimum (target: 98%+; enforced by CI/CD)
- New code: 100% branch coverage required (no exceptions)
- Coverage includes all branches: happy path, errors, edge cases, boundary conditions
- Test structure: Arrange → Act → Assert with clear intent
- Use
pytest.mark.parametrizefor multiple scenarios; avoid test duplication - Test error handling explicitly: wrong types, None values, empty sequences, malformed inputs
- All 4 input sources must be tested: CSV files, SQLite databases, Python lists, Python dicts
- All 9 ISO versions must be tested: pain.001.001.03 through pain.001.001.11
- Integration tests verify end-to-end contract; unit tests verify implementation details
- Use
hypothesisfor property-based testing on data transformers - Document test intent; non-obvious assertions warrant comments
- Mock external dependencies; do not test third-party libraries
- Verify:
poetry run make covmust show ≥ 95% total, ≥ 100% on new code
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 Changed · +16 lines a65d419d2201
- 1mo ago First seen · 210 lines · 45 tokens per session scan A 44d6c88727a6
python-quality is an agent published in the GitHub repository sebastienrousseau/pain001 (49 stars, last pushed today), licensed Apache-2.0. It adds 45 tokens to every session and 2,494 once invoked, about $0.0002 per session on Opus 5.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 agents, from other repositories
python-pro
Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.
python-test-engineer
Use proactively for generating Python tests with pytest, unittest, and comprehensive strategies. Expert in async testing, mocking, and property-based testing.
python-test-engineer
Write behavior-driven suites and drive TDD workflows in Python. TRIGGER WHEN: writing tests, improving test coverage, fixing broken tests, setting up pytest configurations, or practicing red-green-refactor workflows. DO NOT TRIGGER WHEN: building new features from scratch or designing system architecture (use…
aggregate-tests-implementator
Implements pytest test functions for > classes from the Tests table in .domain/test-plan.md. Requires @aggregate-fixtures-writer to have run first. Invoke with: @aggregate-tests-implementator.
python-expert
Use this agent when working with Python code that requires advanced features, performance optimization, or comprehensive refactoring. Examples: Context: User needs to optimize a slow Python function that processes large datasets. user: "This function is taking too long to process our data, can you help optimize it?"…
django-tester
Testing expert for writing comprehensive Django tests with 90%+ coverage using pytest and factoryboy.