Fastapi testing
npx -y skills add dkmqflx/claude-tools --skill fastapi-testingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
FastAPI testing best practices. Use when writing or reviewing tests for a FastAPI app — TestClient, dependency_overrides, async httpx clients. Triggers on TestClient, AsyncClient, ASGITransport, dependency_overrides, or pytest test files for FastAPI endpoints.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.8 KB, 339 tokens by cl100k_base, as published. Nobody here has run it
FastAPI Testing
Best practices for testing FastAPI applications, following the official testing docs
(https://fastapi.tiangolo.com/tutorial/testing/). Covers exercising endpoints through
real HTTP semantics via TestClient/AsyncClient, and swapping dependencies safely
with dependency_overrides. Each rule pairs an antipattern with the idiomatic pytest
pattern.
When to Apply
Reference these guidelines when:
- Writing tests for FastAPI path operations
- Swapping a dependency (DB session, auth, external client) for a test double
- Writing async tests against an ASGI app without a running server
- Reviewing or refactoring an existing FastAPI test suite
Rules
testclient(HIGH) — test endpoints throughfastapi.testclient.TestClient(real HTTP, in-process)dependency-overrides(HIGH) — swap deps withapp.dependency_overrides, not monkeypatchasync-client(MEDIUM) — use httpxAsyncClient+ASGITransportfor async tests
How to Use
Read the individual rule file for the detailed explanation and before/after example:
rules/testclient.md
rules/dependency-overrides.md
rules/async-client.md
Each rule file contains:
- A short explanation of why it matters, tied to the official docs
- An Incorrect example (the antipattern)
- A Correct example (the official pattern)
- A link to the relevant page on https://fastapi.tiangolo.com/
All examples follow the official FastAPI documentation and avoid deprecated APIs.
Gives 0 of the 12 instructions most test skills give in 339 tokens
Counted across 964 of the 1,571 authors here whose files we hold, read 2026-08-06
- close the browser when donein 55 of 964, across 12 files
- wait for network idle statein 51 of 964, across 6 files
- launch chromium in headless modein 49 of 964, across 6 files
- use descriptive selectors for elementsin 49 of 964, across 6 files
- run provided scripts with help flag firstin 49 of 964, across 6 files
- add appropriate explicit waitsin 48 of 964, across 5 files
- use bundled scripts as black boxesin 46 of 964, across 3 files
- do not read script source codein 46 of 964, across 3 files
- use sync playwright for scriptsin 46 of 964, across 3 files
- inspect dom before executing actionsin 46 of 964, across 3 files
- run the full test suitein 36 of 964, across 34 files
- write the failing test firstin 25 of 964, across 18 files
Said here and by no other author read
- test endpoints through fastapi TestClient
- swap dependencies using app.dependency_overrides
- use httpx AsyncClient with ASGITransport for async tests
- follow the official FastAPI documentation
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.