pain001: Agent for Claude Code

.github/agents/python-quality.md

python-quality is an agent for Claude Code from sebastienrousseau/pain001. It costs 45 tokens per session (2,494 once invoked), scanned A, original, Apache-2.0.

A set of instructions for maintaining Python code in the pain001 project, with strict requirements for tests, type annotations, documentation accuracy, and ISO 20022 XML-schema compliance. Type annotations describe expected inputs and outputs; an XML schema defines the allowed document structure.

In plain words
What is it for?
Use it when adding or changing Python code in pain001, writing tests, checking coverage, adding type hints, validating documentation claims, or working with ISO 20022 formats.
Why use it?
It makes changes verifiable and helps prevent untested code, type errors, inaccurate documentation, or invalid financial messages from reaching production.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

This is sebastienrousseau/pain001's own configuration. It tells Claude Code how to work on pain001 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pain001 configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/sebastienrousseau/pain001/main/.github/agents/python-quality.md
Clone the repo
git clone --depth 1 https://github.com/sebastienrousseau/pain001

Made for: Claude Code.

Wrote 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.

agentmods badge for python-quality

README.md
[![agentmods](https://agentmods.dev/badge/agents/sebastienrousseau/pain001/python-quality/github.svg)](https://agentmods.dev/agents/sebastienrousseau/pain001/python-quality)
Your own site
<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.

agentmods 80×15 button for python-quality

Your own site · 80×15
<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>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,494 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash a65d419d2201, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.github/agents/python-quality.md · 226 lines

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 @overload for polymorphic functions
  • Leverage TypeVar, Protocol, and Union types appropriately
  • No Any types 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_code pragmatically 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.parametrize for 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 hypothesis for 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 cov must show ≥ 95% total, ≥ 100% on new code

Read the full file on GitHub · 226 lines

Changes

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.

  1. 1mo ago Changed · +16 lines a65d419d2201
  2. 1mo ago First seen · 210 lines · 45 tokens per session scan A 44d6c88727a6

Subscribe to this mod's changes

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.

Related

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.

echoVic/blade-code · 51 tokens

python-test-engineer

Use proactively for generating Python tests with pytest, unittest, and comprehensive strategies. Expert in async testing, mocking, and property-based testing.

ProjAnvil/MindForge · 32 tokens

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…

acaprino/daodan · 66 tokens

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.

voro6yov/spec-driven-development · 0 tokens

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?"…

xbim08/awesome-claude-code-plugins · 0 tokens

django-tester

Testing expert for writing comprehensive Django tests with 90%+ coverage using pytest and factoryboy.

smicolon/ai-kit · 23 tokens