test-quality
Skill24k starsChanged 5 months agoMITView on GitHub
Test quality bar for this repo. Read when writing, reviewing, or designing tests — covers naming, abstraction level, assertions, determinism, and the process for agent-driven test work.
10 other projects use a version of this.
Trending
Less talk lately.about the whole repository
Most recently taken up by
- AhmedAbdelfattah0/AI-Skillstheir own version, first seen Sep 28, 2026
- decebals/claude-code-javatheir own version, first seen Sep 6, 2026
- techygarg/latticetheir own version, first seen Sep 3, 2026
- danielteles/awesome-agent-skillstheir own version, first seen Sep 2, 2026
- hams-ollo/zen-agent-skillstheir own version, first seen Aug 31, 2026
- bruuuuuce/manatheir own version, first seen Aug 7, 2026
Who's talking about modelcontextprotocol/python-sdk
- modelcontextprotocol/modelcontextprotocol“SEP-2640: Skills Extension”GitHub · Apr 23, 2026 · 119 reactions
- PrefectHQ/fastmcp“Full OAuth 2.1 Authorization for FastMCP Servers”GitHub · Jun 13, 2025 · 22 reactions
- modelcontextprotocol/modelcontextprotocol“SEP-1577 - Sampling With Tools”GitHub · Sep 30, 2025 · 18 reactions
- openai/openai-agents-python“Support passing metadata (_meta) in MCP tool calls”GitHub · Jan 27, 2026 · 14 reactions
- anthropics/claude-code“Dynamic MCP resources not discovered in claude code”GitHub · Jul 22, 2025 · 14 reactions
The biggest 5 of 47 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 47
Talked about on GitHub and Bluesky (47 times).
On GitHub · 41
- Apr 23, 2026SEP-2640: Skills Extension — modelcontextprotocol/modelcontextprotocol119 reactions · 37 comments
- Jun 13, 2025Full OAuth 2.1 Authorization for FastMCP Servers — PrefectHQ/fastmcp22 reactions · 7 comments
- Sep 30, 2025SEP-1577 - Sampling With Tools — modelcontextprotocol/modelcontextprotocol18 reactions · 15 comments
- Jan 27, 2026Support passing metadata (_meta) in MCP tool calls — openai/openai-agents-python14 reactions · 17 comments
- Jul 22, 2025Dynamic MCP resources not discovered in claude code — anthropics/claude-code14 reactions · 13 comments
36 more on GitHub
- Feb 6, 2026Client ignores tools/list response after tools/list_changed notification - uses stale cache — anthropics/claude-ai-mcp10 reactions · 18 comments
- Apr 14, 2025Support HTTP Headers in SSE Context — PrefectHQ/fastmcp9 reactions · 3 comments
- Oct 3, 2024`Host` abstraction for multiple client → server connections in one process — modelcontextprotocol/typescript-sdk7 reactions · 1 comment
- May 13, 2025Add support for MCP's Streamable HTTP transport — pydantic/pydantic-ai6 reactions · 9 comments
- Jun 20, 2025[OpenMemory] Streamable HTTP Support — mem0ai/mem05 reactions
- Apr 2, 2025types: include the 'items' and '$defs' fields to properly handle "array" types — ollama/ollama5 reactions · 7 comments
- Dec 10, 2024SSE Mode: Error when connecting — PrefectHQ/fastmcp5 reactions · 4 comments
- May 21, 2025Add pagination support — PrefectHQ/fastmcp4 reactions · 3 comments
- May 21, 2025Disconnecting an MCP server causes a CPU core to get stuck at 100% — Chainlit/chainlitsays it tested it4 reactions · 8 comments
- Mar 21, 2025Add a way to create new MCP Client from scratch — mark3labs/mcp-go4 reactions
- Jul 10, 2026deps(pip): bump the pip-patch-minor group across 1 directory with 30 updates — hashgraph-online/hol-guard3 reactions · 3 comments
- Dec 26, 2025feat: start and close ClientSession in a single task in McpSessionManager — google/adk-python3 reactions · 11 comments
- Apr 29, 2025Add Auth debugger tab — modelcontextprotocol/inspector3 reactions · 10 comments
- Oct 19, 2026chore(deps): bump mcp from 1.25.0 to 1.30.0 — bespokelabsai/harbor2 reactions · 2 comments
- Oct 8, 2026chore(deps): update mcp requirement from <3,>=2.2.0 to >=2.3.0,<3 in /scripts — chainguard-dev/edu2 reactions · 2 comments
- Sep 10, 2026chore(deps): update mcp requirement from <3,>=2.1.1 to >=2.2.0,<3 in /scripts — chainguard-dev/edu2 reactions · 1 comment
- Jul 24, 2026build(deps): bump the uv group across 2 directories with 2 updates — CaffeeLake/litellm2 reactions · 2 comments
- Jul 21, 2026chore(deps): bump the uv group across 1 directory with 9 updates — brittb-dev/zerogravityclaw2 reactions · 2 comments
- Jul 17, 2026chore(deps): bump the uv group across 4 directories with 12 updates — CaffeeLake/agno2 reactions · 1 comment
- Jul 16, 2026Bump the pip group across 2 directories with 1 update — CaffeeLake/text-generation-webui2 reactions · 1 comment
- Jul 16, 2026ci: bump mcp from 1.26.0 to 1.28.1 in the uv group across 1 directory — CaffeeLake/mcp-outline2 reactions · 1 comment
- Jun 24, 2026Bump the pip group across 1 directory with 4 updates — CaffeeLake/MCP-Universe2 reactions
- Jun 24, 2026Bump the uv group across 1 directory with 6 updates — CaffeeLake/mcp-pdf2md2 reactions
- Jun 18, 2026Bump the pip group across 1 directory with 2 updates — vzwjustin/Context-Engine2 reactions
- Jun 4, 2026Bump the uv group across 1 directory with 9 updates — GlacierEQ/graphiti2 reactions · 2 comments
- May 19, 2026chore(deps): bump mcp from 1.9.4 to 1.23.0 — dutch2005/TradingAgents2 reactions · 1 comment
- May 14, 2026build(deps): bump the uv group across 5 directories with 15 updates — GlacierEQ/servers2 reactions · 5 comments
- May 14, 2026Bump the uv group across 2 directories with 10 updates — GlacierEQ/graphiti2 reactions · 3 comments
- Apr 1, 2026Bump mcp from 1.9.0 to 1.23.0 — cicero-im/pydantic-ai-docs-server2 reactions · 1 comment
- Apr 1, 2026build(deps): bump mcp from 1.2.0 to 1.23.0 — cicero-im/mcp-server-office2 reactions · 1 comment
- Apr 1, 2026Bump mcp from 1.6.0 to 1.23.0 — cicero-im/fastmcp-external2 reactions · 1 comment
- Apr 1, 2026Bump mcp from 1.6.0 to 1.23.0 — cicero-im/Office-Word-MCP-Server2 reactions · 1 comment
- Apr 1, 2026Bump mcp from 1.6.0 to 1.23.0 in /mcp-server-experiments — cicero-im/real-world-llm-apps2 reactions · 1 comment
- Apr 1, 2026Bump mcp from 1.6.0 to 1.23.0 in /whatsapp-mcp-server — cicero-im/whatsapp-mcp2 reactions · 1 comment
- Jan 29, 2026chore(deps): bump the uv group across 2 directories with 3 updates — GlacierEQ/unity-mcp2 reactions · 4 comments
- Mar 14, 2025Add classifier for Model Context Protocol — pypa/trove-classifiers2 reactions · 2 comments
On Bluesky · 6
- Dec 25, 2024modelcontextprotocol / python-sdk The official Python SDK for Model Context Protocol servers and clients… — @pythonhub.dev5 likes and reposts
- Jul 31, 2025A lot of good new stuff in the latest MCP protocol and Python SDK: ❓ Elicitations: Ask users questions during tool calling 🧑🏽🦰… — @pamelafox.bsky.social3 likes and reposts · 1 reply
- Mar 28, 2025it's an excellent move, and I guess the MCP SDK is going to be used more and more in the future as it offers an API to AI tools (and more)… — @cryptax.bsky.social1 likes and repost
- Jan 9, 2025First time I peek into their code, the Python SDK looks very well documented? github.com/modelcontext... They also link a forum for… — @dnsmichi.dev1 likes and repost · 2 replies
- Oct 20, 2025In the weeks and months ahead, we will be experimenting with the emerging Model Context Protocol standard to see if chatbots can use our… — @palewi.re0 likes and reposts · 1 reply
1 more on Bluesky
- Jun 13, 2025The SweatStack MCP server built using the official Python SDK for MCP servers: github.com/modelcontext... ...and uses the SweatStack Python… — @sweatstack.bsky.social0 likes and reposts · 1 reply
Used with
Projects with it also use clean-code and security-audit.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
xfstudioSkillclean-code
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- decebals/claude-code-java★ 747same name
- techygarg/lattice★ 197same name
- rollinsio/beyond-test-coverage★ 52same name
- AhmedAbdelfattah0/AI-Skills★ 4same name
- danielteles/awesome-agent-skills★ 3same name
- bruuuuuce/mana★ 2same name
- hams-ollo/zen-agent-skills★ 2same name
- andrewclark88/skills★ 1same name
- iCesofT/awesome-ai★ 1same name
- yli769227-jpg/agent-discipline★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
Tests read like real user code: no aliasing shims in conftest, no walls of suppressions, no private imports unless that is genuinely the …
- Distinctive: line 80
Don't over-synchronize either: When delivery ordering is guaranteed (notifications emitted during a request you're awaiting, over a single …
- Distinctive: line 93
Hollow-proof check: before claiming a test covers a behaviour, re-read the claim and ask "which assertion proves *this*?" A passing test …
- Very specific: line 99
No new # pragma, # type: ignore, # noqa by default — restructure first.
- Very specific: line 111
Test work doesn't change src/ as a side effect — the one mechanical exception is deleting a pragma a new test now covers.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test & code quality guide
What "best practice for new work" means in this repo. Each rule carries its recorded reasoning where one exists; a rule with no stated why is a convention — follow it anyway.
Naming & shape
- Test names are behaviour sentences stating the observable outcome, not the feature being
poked:
test_elicit_form_decline_returns_no_content, nevertest_elicit_form_decline. - Plain top-level
test_*functions; noTestclasses (legacy files have them — don't copy). - Docstrings: 1–2 sentences of behaviour, honest about provenance — spec-mandated, SDK-defined, or pinning a known gap? Say which: provenance is the triage key when the test later fails. A pinned-gap assertion breaking usually means a change fixed the gap; a spec-mandated assertion breaking means a regression.
- Define things in dependency order; nothing forward-references. For client↔server tests: handlers → server construction → client setup → act → assert — the test reads in the order the conversation happens.
- Inline the server (or equivalent setup) in the test, so the whole observable behaviour fits on one screen. Lift to a file-level fixture only when several tests in that file genuinely share it; never share across files.
- A big multi-step test is fine when the property is irreducibly multi-step (e.g. resumability). Split when a failure wouldn't tell you which claim broke — not for shortness. Compensate with a numbered "Steps:" docstring so a reader sees the choreography before the body.
Level of abstraction
- Drive through the highest-level public API that can observe the property. Hand-built wire requests are brittle and don't prove the user-facing contract; tests that stay above the internals keep working when the internals change. Drop to raw HTTP only when the assertion is about something the high-level API cannot observe (status codes, headers, wire framing).
- Scripting a peer over raw streams is a last resort, reserved for behaviour the typed API cannot produce (malformed input, an impossible peer response). First ask what it would take for the public API to express it — often a small helper suffices. Every such test's docstring states why the public API couldn't do it.
- In-memory / in-process first. HTTP-, SSE-, and auth-shaped behaviour can all be driven through an in-process ASGI transport; threads only when necessary, subprocesses only when the process boundary is itself the thing under test. In-process isn't just faster — it surfaces bugs (a real stream leak was found this way) that subprocess indirection masks.
- Tests read like real user code: no aliasing shims in conftest, no walls of suppressions, no private imports unless that is genuinely the documented way to do the thing.
- The assertion must prove the round trip — no side-channel state. What the server saw comes
back through the protocol, or via a closure-captured list asserted after the call. Handlers
assert their dispatch identity first (
assert params.name == "add"), proving the request that arrived is the request the test sent.
Assertions
- Transformations (input → output the SDK produced) → full-object
snapshot(...)equality, so an added or dropped field fails. Regenerate with--inline-snapshot=fixso intentional changes arrive as a reviewable diff; never hand-edit snapshot literals. - Pass-through values (opaque tokens,
_meta, cursors) → identity against the same variable you sent. A snapshot of a pass-through value only "matches" because a human checked two literals correspond — it proves nothing. - Errors →
pytest.raises+.codeagainst the named constant; snapshot SDK-authored messages; nevermatch=on message text. Third-party text (pydantic, jsonschema) → stable prefix only — never pin text that changes with a dependency upgrade — with a comment saying so.
Determinism
- No sleeps, ever. A sleep guesses at timing instead of waiting on the condition, so it
either flakes or pads the run — sleeps head the list of the older test code's failure modes.
Coordinate with
anyio.Eventso the wait ends exactly when the condition holds (that discipline is why 529 e2e tests run in ~10 s). Sole exception: tests of time-based features, with a comment. - Bound every indefinite wait with
anyio.fail_after(5). 5 is the standard — widening it needs an articulable reason; "10 to be safe" is covering up a flake, not fixing one, and unexplained widenings propagate (one agent used 10 and every later one copied it). - Never assert wall-clock time, even with huge margins.
elapsed < 0.9on a ~0.01 s operation — a 90× margin — was still rejected in review.fail_afterbounding a hang is the only timing primitive allowed. - Concurrency tests must prove genuine interleaving. Without barriers the scheduler is free
to serialize — "a" can start, finish, and return before "b" even begins — so two
start_sooncalls prove nothing. Gate with events so all parties are mid-flight before any proceeds, emit interleaved, then assert the demux. - Don't over-synchronize either. When delivery ordering is guaranteed (notifications emitted during a request you're awaiting, over a single ordered in-memory stream), a plain collected list asserted after the call is correct; events are for messages not tied to an awaited operation. Verify the ordering guarantee actually holds for your transport first.
- Async tests use anyio, not asyncio.
Behaviour philosophy
- Pin current behaviour; never xfail. A green suite asserting what actually happens is a regression bar for any refactor; an xfail proves nothing about it. Where current behaviour falls short of spec, pin the divergent output and record the gap as data — a tracking issue, with the docstring naming the known gap (suites with a requirements manifest record it as a divergence entry). Not hidden, not skipped.
- Hollow-proof check: before claiming a test covers a behaviour, re-read the claim and ask "which assertion proves this?" A passing test near a behaviour is not proof of it — a full review of the e2e suite found two such cases even under this discipline.
Hygiene
- No new
# pragma,# type: ignore,# noqaby default — restructure first; a suppression usually means a test or a type is missing. The narrow sanctioned escape hatches (and the audit to run before pushing) are in AGENTS.md. In tests, narrow types withassert isinstance; neverAny/objectwhen a real type exists. - Warnings raised during tests are findings, not noise (the repo runs
filterwarnings = error). Fix the cause; if the fix can't land in the same change, scope the suppression to the one fixture that needs it and track the real fix explicitly. - Registered-but-never-invoked handler bodies are
raise NotImplementedError, so they cannot silently become load-bearing. - Comments live next to the line they explain, not in docstrings; single backticks for code
refs; match the surrounding comment density (one-liners next to one-liners). No
from __future__ import annotations(py310+ repo). - Test work doesn't change
src/as a side effect — the one mechanical exception is deleting a pragma a new test now covers. If a test can't be written without a library change, raise it as a finding or defer the test; don't quietly editsrc/.
Process (for agent-driven work)
- Small chunks. ≤10 tests per human-reviewed batch; when fanning out to multiple agents, ≤5 per agent. Review quality scales inversely with batch size: the observed shortcuts (over-stacked tests, a timing assertion, wrong abstraction level) all surfaced in one oversized 27-test batch.
- Design → review → implement, as separate steps. The design deliverable is not just the plan — it's the judgement calls (abstraction level, deferrals, contested assertions) stated explicitly, so the reviewer vetoes them before implementation rather than discovering them in the diff.
- High-stakes areas get fresh adversarial reviewers on both the design and the implementation — fresh, because whoever designed it (or saw the proposed fix) anchors on the same layer. SERIOUS findings (wrong assertion, missed MUST/SHOULD, an unrecorded known gap) re-loop; style doesn't. Reserve the full panel for areas where being wrong is worse than being slow.
- Investigations pair a full-context look with a fresh agent given only the problem — never the proposed fix — and compare conclusions. The unbiased read regularly catches anchoring on the wrong layer.
- When review questions a decision, reconsider genuinely: re-derive the tradeoff, state the options, recommend with reasons. Defending the original choice is a valid outcome; reflexively agreeing with every challenge is as bad as ignoring it.
- Validate the reference artifact before building on it. Whatever you treat as ground truth (a spec import, a baseline, a generated list), check it first — discovering it was incomplete after five batches costs far more than before batch one.
- Verify as you go: per-file
uv run --frozen pytest <file> -q+ pyright + ruff while iterating; full suite, coverage, and./scripts/test(whensrc/was touched) at integration. - Every agent writes notes: what it did, what broke, and — most importantly — what it couldn't decide, so open questions surface instead of being silently resolved by whoever hit them.
- Quality over speed is a stated goal, not a preference ("rushing something out the door is not the goal here, explicitly so"). Don't quietly de-scope agreed work mid-stream; renegotiate scope explicitly.
- Don't copy patterns from existing test code by default — much of the repo's older test
code is below the current bar (sleeps, mocks,
Testclasses, raciness). These rules define the bar for new work.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

