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 agents/sebastienrousseau/pain001/python-contractsgit clone --depth 1 https://github.com/sebastienrousseau/pain001What 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.02191 |
| Opus 5 | $0.00000 | $0.01095 |
| Sonnet 5 | $0.00000 | $0.00438 |
| Haiku 4.5 | $0.00000 | $0.00219 |
Grade A, and why
python-contracts 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 — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python API Contract Testing Tollgate
Mission
Enforce 100% backward compatibility and API stability for payment processing.
Tollgate Objectives
- Enforce zero breaking changes without MAJOR version bump
- Validate all 4 input sources (CSV, SQLite, List, Dict) work identically
- Validate all 9 ISO versions (v03-v11) produce valid XML
- Ensure function signatures never change without deprecation
When This Tollgate Applies
- Modifying
pain001/core/core.py(public API) - Changing function signatures in
pain001/modules - Modifying XML templates
- Changing validation logic
- Updating dependencies
Tollgate Checks
1. Contract Test Suite (MANDATORY)
# Run contract tests
poetry run pytest tests/test_contracts.py -v
# Expected: All contracts validated
# - Input source parity: CSV == SQLite == List == Dict
# - ISO version outputs: All 9 versions validate against XSD
# - Function signatures: All public APIs unchanged
Success Criteria:
- All 4 input sources produce byte-identical XML (excluding timestamps)
- All 9 ISO versions pass XSD validation
- No function signature changes detected
- Deprecation warnings display correctly
2. Golden File Testing (XML Output Validation)
# Generate golden files (baseline)
poetry run python scripts/generate_golden_files.py
# Verify against golden files
poetry run pytest tests/test_golden_files.py --golden-diff
# Any differences? Manual review required.
Success Criteria:
- Generated XML matches golden files byte-for-byte
- Schema validation passes for all versions
- No unexpected field changes
3. Input Source Parity (MANDATORY)
# Test all 4 input sources produce identical output
poetry run pytest tests/test_input_parity.py -v
# Validates:
# - CSV file → XML
# - SQLite DB → XML
# - Python list → XML
# - Python dict → XML
# All produce same XML (modulo timestamps)
Success Criteria:
- SHA256 hash identical for all 4 sources
- Field ordering consistent
- Data types preserved correctly
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 · 309 lines · 0 tokens per session scan A 98aea20c8697
python-contracts is an agent published in the GitHub repository sebastienrousseau/pain001 (49 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,191 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 agents, from other repositories
python-reviewer
Review Python code changes against OpenMetadata ingestion patterns — connector architecture, Pydantic 2.x models, pytest conventions, and schema-first design.
WEBHOOK_SDK
Write a custom Commonly agent in 30 lines of Python. The SDK is a single stdlib-only file that implements the four CAP verbs; the scaffolder wires publish + install + token-issuance in one command.
python-pro
Python 3.13 language expert for the ClosedLoop plugin monorepo. Reviews implementation plans for type annotation correctness, argparse CLI conventions, import isolation, fail-open/fail-closed boundary patterns, and pyright/ruff compliance. Produces type-patterns.md in legacy mode.
runner-review
Review Python runner code for convention violations. Use after modifying files under components/runners/ambient-runner/. Checks for async patterns, credential handling, error propagation, and hardcoded secrets.
python-reviewer
Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.
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.