Agent skill

Python Tests

by PrefectHQ in PrefectHQ/fastmcp

Write regression tests for FastMCP changes using its pytest fixtures, in-memory clients, and protocol boundaries.

Apache-2.0Auto-check passedAgent Workflows

Install Python Tests

skills CLI
$ npx skills add PrefectHQ/fastmcp --skill python-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PrefectHQ/fastmcp python-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PrefectHQ/fastmcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/python-tests .claude/skills/python-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
python-tests
GitHub stars
28k
Token cost
~466 tokens
SKILL.md length
246 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Write regression tests for FastMCP changes using its pytest fixtures, in-memory clients, and protocol boundaries.

  • Tasks that involve MCP servers
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Python Tests is an agent skill from PrefectHQ/fastmcp. Write regression tests for FastMCP changes using its pytest fixtures, in-memory clients, and protocol boundaries.

Its SKILL.md is about 470 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Python, pytest and Model Context Protocol. The repository describes itself as: 🚀 The fast, Pythonic way to build MCP servers and clients. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve MCP servers

Example prompts

  • “/python-tests”

What it can do on your machine

Read from SKILL.md and the folder at commit 5baeacf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Python Tests loads about 466 tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 246 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~466

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PrefectHQ/fastmcp at commit 5baeacf, republished under its Apache-2.0 licence (© PrefectHQ). 246 words, ~466 tokens.

Download SKILL.mdSave it as .claude/skills/python-tests/SKILL.md (or your agent's skills folder).
name
python-tests
description
Write regression tests for FastMCP changes using its pytest fixtures, in-memory clients, and protocol boundaries.

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.

© PrefectHQ, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/python-tests of PrefectHQ/fastmcp.

Open the folder on GitHubat commit 5baeacf

Compare with similar skills

Python Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Python Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Tests this skillPrefectHQ/fastmcp28k—~466Automated safety check: PassApache-2.0
LexGuard MCP Developer GuideSeoNaRu/lexguard-mcp131—~1.1kAutomated safety check: PassCustom licence
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
MemPalace Setup and OperationMemPalace/mempalace59k—~2.2kAutomated safety check: PassMIT
FastmcpTommy-yw/RunbookHermes5464 repos~2.1kAutomated safety check: PassMIT

Similar skills

  • LexGuard MCP Developer Guide

    SeoNaRu/lexguard-mcp

    Developer guide for the LexGuard Korean law MCP server: layer rules, adding tools and repositories, JSON-RPC responses, law API handling, answer rules and tests.

    131 GitHub stars~1.1k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Installs and configures MemPalace as a private local palace, a shared-brain hub or a client of an existing hub, including MCP registration and version-correct initialization.

    59k GitHub stars~2.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Fastmcp

    Tommy-yw/RunbookHermes

    Build, test, inspect, install, and deploy MCP servers with FastMCP in Python.

    546 GitHub starsUsed in 4 repos~2.1k tokens
    Agent WorkflowsAuto-check passed
  • Migrate To Archestra

    archestra-ai/archestra

    Migrate an existing agentic PoC/pilot (Claude Code project files, MCP configs, hooks, local tools, openclaw config, or similar hand-rolled setup artifacts) into an Archestra instance.

    4.4k GitHub stars~2.6k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from PrefectHQ/fastmcp

All 9 skills in this repo
  • Fastmcp Client CLI

    PrefectHQ/fastmcp

    Query and invoke tools on MCP servers using fastmcp list and fastmcp call.

    28k GitHub starsUsed in 1 repo~823 tokens
    Auto-check passed
  • Release

    PrefectHQ/fastmcp

    Cut a FastMCP release end to end. An agent skill from PrefectHQ/fastmcp.

    28k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Docs

    PrefectHQ/fastmcp

    Write or revise a page under docs/ for gofastmcp.com. An agent skill from PrefectHQ/fastmcp.

    28k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Review Issue

    PrefectHQ/fastmcp

    Review an incoming external issue (and any gated-closed PR behind it) and decide whether to assign the contributor or decline.

    28k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Review PR

    PrefectHQ/fastmcp

    Assess a FastMCP pull request for justified behavior, compatibility, and correctness, then follow CI and review feedback to a revision-specific verdict.

    28k GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Review Security Report

    PrefectHQ/fastmcp

    Review FastMCP vulnerability reports before accepting, rejecting, patching, scoring, or publishing them.

    28k GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Questions about Python Tests

What does Python Tests do?

Write regression tests for FastMCP changes using its pytest fixtures, in-memory clients, and protocol boundaries. Python Tests is an agent skill from PrefectHQ/fastmcp. Write regression tests for FastMCP changes using its pytest fixtures, in-memory clients, and protocol boundaries.

When should I use Python Tests?

Python Tests fits situations like: tasks that involve MCP servers.

How do I install Python Tests in Claude Code?

Run `npx skills add PrefectHQ/fastmcp --skill python-tests -a claude-code`. Or copy the skill folder (.agents/skills/python-tests in PrefectHQ/fastmcp) into .claude/skills/python-tests in your project. Claude Code loads it when a task matches its description.

How do I install Python Tests in Codex?

Run `npx skills add PrefectHQ/fastmcp --skill python-tests -a codex`. Or copy the skill folder (.agents/skills/python-tests in PrefectHQ/fastmcp) into .agents/skills/python-tests in your project. Codex loads it when a task matches its description.

Can I use Python Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PrefectHQ/fastmcp --skill python-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-tests, .gemini/skills/python-tests, .github/skills/python-tests and .opencode/skills/python-tests in your project.

What does Python Tests need to run?

SKILL.md names no scripts, command-line tools or credentials: Python Tests is instructions for the agent only.

Does Python Tests access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Python Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Python Tests use?

Python Tests is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Python Tests use?

About 466 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Python Tests?

Skills that share tags, products or a category with Python Tests: LexGuard MCP Developer Guide (SeoNaRu/lexguard-mcp, 131 stars), MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars) and MemPalace Setup and Operation (MemPalace/mempalace, 59k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Tests?

PrefectHQ (a GitHub organization) maintains it in PrefectHQ/fastmcp, which has 28,001 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

Source: PrefectHQ/fastmcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.