python-testing-patterns

A set of Python testing practices for pytest, a tool that runs Python tests. It covers reusable test fixtures, mock replacements for external parts, and test-driven development (writing tests before code).

In plain words
What is it for?
Use it when writing Python tests, setting up pytest suites, adding fixtures or mocks, and following test-driven development.
Why use it?
It helps you build an organized test suite and check that Python code behaves as expected. It also gives structure to testing instead of leaving each test to be designed from scratch.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/mdlmarkham/tailopsmcp/python-testing-patterns
Any agent
npx skills add mdlmarkham/TailOpsMCP --skill python-testing-patterns
Clone the repo
git clone --depth 1 https://github.com/mdlmarkham/TailOpsMCP

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,212 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin unknown 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 $0.00038 $0.05212
Opus 5 $0.00019 $0.02606
Sonnet 5 $0.00008 $0.01042
Haiku 4.5 $0.00004 $0.00521

Measured yesterday against content hash 3b6b5b1d9fbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

python-testing-patterns scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

response = requests.get(f"{self.base_url}/users/{user_id}")
.opencode/skill/python-testing-patterns/SKILL.md · 908 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

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. yesterday First seen · 908 lines · 38 tokens per session scan A 3b6b5b1d9fbd

Subscribe to this mod's changes

python-testing-patterns is a skill published in the GitHub repository mdlmarkham/TailOpsMCP (16 stars, last pushed 8mo ago), with no licence file. It adds 38 tokens to every session and 5,212 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

fix-issues

Fix a batch of open GitHub issues end to end - one git worktree and one agent per issue (feature-dev for implementation, review-pr for review), individual PRs into develop, a release PR to main with a final multi-agent integration review, and optional tag/release/issue-comment publishing. Use when the user asks to…

kossakovsky/selfhost-ai · 80 tokens

file-issue

File a GitHub issue on this repo with the required title prefix and labels. Use when opening an issue, or when a finding during other work is worth tracking rather than fixing inline.

piperbox/piper · 41 tokens

mcp-control-plane-audit

Audit the local MCP control plane, Codex MCP registration, Python MCPServer entrypoints, tool capability inventory, stateless MCP conformance wiring, and project-scoped agent skills. Use for MCP upgrades, configuration security reviews, onboarding MCP servers, verifying Agent Skills, diagnosing missing tools, or…

albertik322-sudo/mcp-control-plane · 75 tokens

meal-planning

Plan meals collaboratively in chat, then publish the finalized plan to mealforge via its MCP tools. Use when the user wants to plan meals (a week of dinners, a few breakfasts, a single meal), revise a pushed plan, switch or complete the active plan, or push a plan to mealforge.

LooseWireDev/mealforge · 65 tokens

trpc-drizzle-patterns

Canonical patterns for the Hono + tRPC + Drizzle + Better Auth backend — procedures, routers, context, schema, and how types flow to clients. Use when writing or reviewing any code in apps/api (TypeScript backend) or consuming the API from web/mobile.

LooseWireDev/mealforge · 62 tokens

feature-development

The required workflow for adding a feature to this monorepo — spec, generator scaffold, failing tests, then implementation. Use whenever adding a new feature, endpoint, screen, or capability. Never create feature directories by hand.

LooseWireDev/mealforge · 48 tokens