fastmcp: Skill for Claude Code

.agents/skills/python-tests/SKILL.md

python-tests is a skill for Claude Code, Codex from PrefectHQ/fastmcp. It costs 24 tokens per session (357 once invoked), scanned A, original, Apache-2.0.

Guidance for writing and reviewing Python tests with pytest, a tool that runs automated checks for Python code. It covers test structure, reusable setup, input variations, replacements for external services, and asynchronous code.

In plain words
What is it for?
Use it when adding tests, reviewing test code, investigating failures, improving coverage, or testing code that uses asynchronous operations or external dependencies.
Why use it?
It helps make failures easier to understand by keeping tests focused on one behavior and covering important variations consistently.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is PrefectHQ/fastmcp's own configuration. It tells Claude Code and Codex how to work on fastmcp 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 fastmcp configures →

About the project

FastMCP is a Python framework for building Model Context Protocol applications, which connect language models with tools and data through servers and clients. Developers use it to expose Python functions as tools, connect to local or remote MCP servers, and build interactive tool interfaces. The catalogue includes eight skills, three instructions, two rules, one setting, and one hook for FastMCP.

PrefectHQ/fastmcp · 28,127 stars · on GitHub · gofastmcp.com

Reuse

Borrowing it

Nothing to install: this file belongs to PrefectHQ/fastmcp. 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/PrefectHQ/fastmcp/main/.agents/skills/python-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/PrefectHQ/fastmcp

Made for: Claude Code, Codex.

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-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/prefecthq/fastmcp/python-tests/github.svg)](https://agentmods.dev/skills/prefecthq/fastmcp/python-tests)
Your own site
<a href="https://agentmods.dev/skills/prefecthq/fastmcp/python-tests"><img src="https://agentmods.dev/badge/skills/prefecthq/fastmcp/python-tests/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-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/prefecthq/fastmcp/python-tests"><img src="https://agentmods.dev/badge/skills/prefecthq/fastmcp/python-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 357 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00024 $0.00357
Opus 5.5 $0.00010 $0.00143
Sonnet 5.5 $0.00005 $0.00071
Haiku 4.5 $0.00002 $0.00036

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

Security

Grade A, and why

python-tests 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.agents/skills/python-tests/SKILL.md · 21 lines

What it actually says

FastMCP tests

Read nearby tests and the repository's validation requirements first. Extend the owning test module when it remains readable; use a focused module when the existing one is already too large.

For a bug fix, run the regression against unchanged code and confirm it fails for the reported reason, then run it with the fix. An import error or broken fixture is not a reproduced bug. Include supported adjacent behavior that the same branch could change, especially omitted defaults and explicit overrides.

  • Async tests need no marker: asyncio_mode = "auto" is configured globally.
  • Use Client(server) for real MCP dispatch without a network server. Use HTTP transport only when network behavior is the subject.
  • Mock external boundaries, not the FastMCP functions under test. For OpenAPI requests, capture the outgoing request with httpx2.MockTransport and assert its bytes, headers, or decoded parameters.
  • Keep imports at module scope. Prefer function-scoped fixtures and tmp_path for files.
  • Parameterize variations of one contract; separate unrelated behavior. For JSON, equality alone does not distinguish True from 1: check the resulting type when type preservation matters.
  • Use existing inline_snapshot conventions for complex schema assertions. Inspect generated snapshots rather than accepting them blindly.
  • The default timeout is five seconds. Use the repository's integration conventions for tests that legitimately need more time.

Run focused tests during development, then the full commands required by AGENTS.md before committing. If a failure appears unrelated, reproduce it on the unchanged base; do not call it pre-existing from the test name alone.

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 · -200 lines · -21 tokens per session 8fd61fdb4a90
  2. 1mo ago First seen · 221 lines · 45 tokens per session scan A 2741f4b02a70

Subscribe to this mod's changes

python-tests is a skill published in the GitHub repository PrefectHQ/fastmcp (28,127 stars, last pushed today), licensed Apache-2.0. It adds 24 tokens to every session and 357 once invoked, about $0.0001 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 skills, from other repositories

python-testing

Guidelines for writing and running tests in the Agent Framework Python codebase. Use this when creating, modifying, or running tests.

microsoft/agent-framework · 29 tokens

adk-verify-snippets

Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail report with per-snippet coverage. Use when the user asks to verify, test, or validate the code samples in a README, a guide…

google/adk-python · 149 tokens

adk-setup

Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test run. Runs only when explicitly requested, never on its own. Use when asked to set up, bootstrap, or repair a development…

google/adk-python · 146 tokens

test-generator

Generate pytest test cases for Python functions and classes.

vstorm-co/pydantic-deepagents · 12 tokens

temporal-python-testing

Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.

wshobson/agents · 45 tokens

python-providers

Create, modify, test, or package Python provider adapters under python/providers, including framework-specific dependencies, public imports, type inference, and provider metadata. Use for Python provider work only; use python-sdk for core SDK changes.

ComposioHQ/composio · 49 tokens