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 skills/catwillgh/mainframe/python-backend-patternsnpx skills add CATWILLgh/MAINFRAME --skill python-backend-patternsgit clone --depth 1 https://github.com/CATWILLgh/MAINFRAMEWhat 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.00042 | $0.01260 |
| Opus 5 | $0.00021 | $0.00630 |
| Sonnet 5 | $0.00008 | $0.00252 |
| Haiku 4.5 | $0.00004 | $0.00126 |
Grade A, and why
python-backend-patterns 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 yesterday.
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 — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python backend patterns
Use this skill for both new Python work and established services. Discover the active package, entrypoint, and installed versions first; dependencies alone do not prove which path owns runtime behavior.
Operating rule
- Run recon.py against the relevant package root, or use recon.md manually.
- Trace the changed behavior through entrypoint, business logic, data boundary, side effects, and callers.
- Read only the references matching the active path and task.
- Verify version-sensitive behavior against installed versions and current primary documentation through Context7 or the official project site.
- Apply the testing baseline below. Read testing.md when the task requires choosing test scope, changing existing tests, or separating the local and CI paths.
Multiple frameworks, validators, database libraries, or test tools are observations, not automatic blockers. Determine which one owns the changed path from imports, configuration, entrypoints, and runtime wiring. Ask the caller only when evidence cannot resolve a choice that changes product behavior or infrastructure.
Complete the assigned behavior. Do not use TODOs, placeholders, disabled checks, suppressions, or deferred in-scope work as a substitute for implementing it.
Two compatible layers
- Established system: preserve its supported framework, package manager, architecture, validator, data layer, contracts, logging, and tests. Make the smallest coherent change; do not add a competing library or reorganize unrelated code.
- New or isolated component: prefer a supported Python version, explicit boundaries, maintained libraries, typed public contracts, focused tests, and PostgreSQL when relational semantics are required. Choose libraries from actual requirements; this skill does not mandate FastAPI, SQLAlchemy, Pydantic, structlog, OpenTelemetry, Redis, or a universal folder structure.
Testing baseline
- Use the project's native commands and the smallest faithful test for the changed behavior.
- Inspect the exact command, task, configuration, and relevant fixtures before
running it. Names such as
lint,format,test, andcheckdo not prove that a command is read-only, infrastructure-free, or safe for the current environment; prefer its check-only or focused form when verification must not change files or external state. - When practical, observe the focused test fail for the intended reason before the fix, then pass, followed by the nearest relevant fast suite.
- Use real PostgreSQL when database semantics are the changed risk; do not add external infrastructure to tests that can prove the same behavior in process.
- Assert observable outcomes and protected side effects. Never weaken assertions, hide failures, leave skipped tests, or claim an unobserved result.
What ships with it
18 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- api-conventions.md 2.3 KB
- auth-and-sessions.md 2.4 KB
- background-and-realtime.md 2.4 KB
- django.md 1.8 KB
- fastapi.md 1.9 KB
- files-and-integrations.md 2.9 KB
- flask.md 1.8 KB
- migrations.md 2.3 KB
- multitenancy.md 1.8 KB
- observability.md 1.9 KB
- postgres-concurrency.md 2.0 KB
- postgres.md 2.0 KB
- recon.md 1.6 KB
- recon.py 5.9 KB runs code
- redis.md 2.0 KB
- sqlalchemy.md 2.2 KB
- testing.md 2.7 KB
- validation.md 1.8 KB
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.
- yesterday First seen · 78 lines · 42 tokens per session scan A 194cb424fe7f
python-backend-patterns is a skill published in the GitHub repository CATWILLgh/MAINFRAME (2 stars, last pushed 10d ago), licensed MIT. It adds 42 tokens to every session and 1,260 once invoked, about $0.0002 per session on Opus 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-31.
Other skills, from other repositories
discord-webhook
Send trading alerts, signals, and analysis summaries to Discord via webhook. Integrates with realtime-alert-pipeline, trading-brain, and trade-journal-analytics.
agentforge-protocol
Use when doing non-trivial coding with Hermes, OpenClaw, Claude Code, Codex CLI, or similar autonomous coding agents. Orchestrates Karpathy-style minimal-change discipline, grill-plan intake, TDD, systematic debugging, subagent-driven implementation, spikes, and pre-commit review into one end-to-end workflow.
claude-md-improver
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project…
agent-platform-model-registry
Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.
twitter-reader
Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…
chenhao-limit-up
Use when evaluating A-share limit-up (涨停板) setups through Chen Hao's sentiment and momentum lens: market emotion cycles, board strength, follow-through, and short-term aggressive momentum trading.