Python Testing Strategies
c0x12c/ai-toolkit
Testing patterns for FastAPI with pytest-asyncio, httpx AsyncClient, fixtures, and test data factories.
Add or refine tests for specx Python services. An agent skill from maksimzayats/specx.
$ npx skills add maksimzayats/specx --skill specx-tests -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install maksimzayats/specx specx-tests --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/maksimzayats/specx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/specx-tests .claude/skills/specx-tests && rm -rf skills-srcUse ~/.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/
Install the "specx-tests" agent skill from https://github.com/maksimzayats/specx/tree/main/skills/specx-tests into .claude/skills/specx-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "specx-tests", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/maksimzayats/specx/tree/main/skills/specx-testsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add maksimzayats/specx --skill specx-tests -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install maksimzayats/specx specx-tests --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maksimzayats/specx.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/specx-tests .agents/skills/specx-tests && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "specx-tests" agent skill from https://github.com/maksimzayats/specx/tree/main/skills/specx-tests into .agents/skills/specx-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "specx-tests", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add maksimzayats/specx --skill specx-tests -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install maksimzayats/specx specx-tests --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maksimzayats/specx.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/specx-tests .cursor/skills/specx-tests && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "specx-tests" agent skill from https://github.com/maksimzayats/specx/tree/main/skills/specx-tests into .cursor/skills/specx-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "specx-tests", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/maksimzayats/specx.git --path skills/specx-tests--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add maksimzayats/specx --skill specx-tests -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install maksimzayats/specx specx-tests --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maksimzayats/specx.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/specx-tests .gemini/skills/specx-tests && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "specx-tests" agent skill from https://github.com/maksimzayats/specx/tree/main/skills/specx-tests into .gemini/skills/specx-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "specx-tests", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install maksimzayats/specx specx-testsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add maksimzayats/specx --skill specx-tests -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/maksimzayats/specx.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/specx-tests .github/skills/specx-tests && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "specx-tests" agent skill from https://github.com/maksimzayats/specx/tree/main/skills/specx-tests into .github/skills/specx-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "specx-tests", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add maksimzayats/specx --skill specx-tests -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install maksimzayats/specx specx-tests --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/maksimzayats/specx.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/specx-tests .opencode/skills/specx-tests && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "specx-tests" agent skill from https://github.com/maksimzayats/specx/tree/main/skills/specx-tests into .opencode/skills/specx-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "specx-tests", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
specx-testsAdd or refine tests for specx Python services. An agent skill from maksimzayats/specx.
Specx Tests is an agent skill from maksimzayats/specx. Add or refine tests for specx Python services. Use when creating unit tests for use cases/services, integration tests for FastAPI controllers or infrastructure adapters, e2e smoke tests, architecture import guardrails, DI override tests, pytest fixtures, or coverage and boundary checks.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `agents/openai.yaml`, `references/render_architecture_guardrails.py` and `references/testing.md`).
It sits in Testing & QA, covering Integration testing, Unit testing and Backend development. It works with Python, pytest and FastAPI. The repository describes itself as: ⚙️ Executable architecture guardrails and agent skills for building structured Python services! The licence is MIT.
Read from SKILL.md and the folder at commit 9362406. It shows what the files ask for, not the result of running them.
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.
Ships script files (Python), which the agent can run.
Shell commands in SKILL.md call:
uvFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Specx Tests loads about 1.9k tokens when it runs, and up to ~6.8k if it reads all its reference files. Until then it costs about 75 tokens; SKILL.md has 888 words of instructions outside code blocks.
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.
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.
The full file from maksimzayats/specx at commit 9362406, republished under its MIT licence (© maksimzayats). 888 words, ~1,895 tokens.
.claude/skills/specx-tests/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Use this skill when behavior, wiring, or architecture boundaries need tests.
Read references/testing.md before creating test files.
tests/_support/: generic clients, DB helpers, and shared integration
helpers only. This is not a test suite and does not hold project-specific
doubles.tests/unit/: core services, use cases, and capabilities resolved from a
fresh application container returned by the project's get_container().tests/integration/: real internal graph tests. Core use-case integration
tests call resolved use cases against the transactional DB; delivery
integration tests exercise HTTP mapping; migrations prove Alembic behavior.tests/e2e/: optional whole-app smoke flows.tests/guardrails/: optional programmatic
specx.testing.architecture.assert_specx_architecture wrappers for genuinely
project-specific extra rules. Standard packaged rules run through
uv run specx check.tests/unit/core/tasks/services/test_title_service.py.harness.py, target factories, or
target harnesses.tests/unit/conftest.py owns the fresh real-app Container fixture for unit
tests and any project-wide test overrides. tests/integration/conftest.py
owns the transactional DB-backed container fixture for integration tests.container, register any scenario-specific overrides
before resolution, then call container.resolve(Target).container fixture may register it before returning the
container.test_*.py module that uses
them. When the same double is reused by multiple unit modules, put it in a
mirrored
tests/unit/core/<scope>/{capabilities,gateways,repositories}/fake_<source_module>.py
file.tests/_support/fakes, tests/**/_fakes.py, generic
_scenarios.py, fake modules outside those mirrored unit port/capability
packages, or double classes in conftest.py.MagicMock or AsyncMock inline in the test function when only one
behavior needs to be changed for that scenario. Prefer autospeccing when
call signatures matter and spec_set when unexpected attributes must fail.tests/integration/core/... for
use cases that inject a UoW manager; delivery tests should own HTTP mapping,
not be the only persistence proof./healthz and /readyz as operational endpoints,
not versioned business API routes. /healthz must prove a lightweight
process response only; /readyz must prove required infrastructure readiness,
including a real bounded DB check for SQLAlchemy services.Cache-Control: no-store, readiness failure returns
503, probe routes are excluded from OpenAPI, and legacy /api/v1/health is
absent when replacing old generated health endpoints.logging.config.dictConfig, and asserting the generated
stdlib config. Use caplog only when a log record is meaningful behavior.httpx2, not legacy httpx, for generated HTTP client and ASGI transport
tests. Enter LifespanManager, then pass the yielded manager's manager.app
to ASGITransport so request scopes receive lifespan state.fastapi.status
constants, not raw integer literals.container.resolve(...) for normal synchronous graph construction, even
when the resolved use case has an async execute(...); use
await container.aresolve(...) only when DI construction itself has async
providers.diwire.integrations.pytest_plugin, and do not use Injected[...]
parameters in tests.anyio_backend fixture to
return "asyncio"; leave it unpinned only when the suite intentionally
supports every installed backend.container.resolve(...)
returns an instance.__init__.py file.uv run specx check as the default guardrail mechanism for specx
boundaries such as docstrings, use-case inputs, UoW injection, route paths,
direct persistence dependency rejection in use cases, container imports,
and AGENTS.md command coverage.[tool.specx].ignore and a project reason recorded beside the configuration.[tool.specx].select = ["ALL"]. Narrower projects
enable technology-specific families explicitly with
[tool.specx].extend-select; FastAPI projects select fastapi.extra_rules only for project-specific checks that are not covered by a
built-in SpecxRuleId; use the programmatic wrapper for those projects.references/render_architecture_guardrails.py to render the tiny wrapper.Use blank lines as logical separators in all code. Keep related statements together, but separate independent setup, action, assertion, response, branch, and transformation groups so long blocks stay readable.
references/testing.md - folder layout, fixtures, unit/integration examples,
and architecture guardrail snippets.references/render_architecture_guardrails.py - compatibility renderer for
the tiny specx architecture wrapper.© maksimzayats, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (references) in skills/specx-tests of maksimzayats/specx.
Open the folder on GitHubat commit 9362406
Specx 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Specx Tests this skillmaksimzayats/specx | 202 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Python Testing Strategiesc0x12c/ai-toolkit | 106 | — | ~747 | Automated safety check: Pass | None | |
| Pytest Masteryaiskillstore/marketplace | 433 | — | ~1.2k | Automated safety check: Pass | None | |
| Flowfile Debugging PlaybookEdwardvaneechoud/Flowfile | 385 | — | ~6.3k | Automated safety check: Pass | MIT | |
| Python Devdoccker/cc-use-exp | 1.1k | — | ~790 | Automated safety check: Pass | Custom licence | |
| Pythonericrisco/rsc-harness | 180 | — | ~3.8k | Automated safety check: Pass | MIT |
c0x12c/ai-toolkit
Testing patterns for FastAPI with pytest-asyncio, httpx AsyncClient, fixtures, and test data factories.
aiskillstore/marketplace
Python testing with pytest using uv package manager. An agent skill from aiskillstore/marketplace.
Edwardvaneechoud/Flowfile
Symptom-to-cause triage playbook for Flowfile (core/worker/kernel/frontend/AI) — covers "no such table" DB cascades (two distinct causes), import-time Alembic migration corruption, silent…
doccker/cc-use-exp
Python 开发规范。当用户操作 .py、pyproject.toml、requirements.txt、setup.py 文件, 或涉及 FastAPI、Django、Flask、pytest、asyncio 开发时触发。
ericrisco/rsc-harness
A skill your agent uses when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms…
MadAppGang/claude-code
A skill your agent uses when building FastAPI applications, implementing async endpoints, setting up Pydantic schemas, working with SQLAlchemy, or writing pytest tests for Python backend services.
maksimzayats/specx
Add or refactor a specx core scope service. An agent skill from maksimzayats/specx.
maksimzayats/specx
Add or refactor a specx core scope use case. An agent skill from maksimzayats/specx.
maksimzayats/specx
Add delivery controllers for specx services, especially FastAPI HTTP routes.
maksimzayats/specx
Add technical infrastructure adapters for specx core scopes.
maksimzayats/specx
Design or review specx core scope boundaries in Python services.
maksimzayats/specx
Wire dependency injection for a specx Python service with diwire.
Categories
Add or refine tests for specx Python services. An agent skill from maksimzayats/specx. Specx Tests is an agent skill from maksimzayats/specx. Add or refine tests for specx Python services.
Specx Tests fits situations like: creating unit tests for use cases/services; integration tests for FastAPI controllers; infrastructure adapters; E2e smoke tests.
Run `npx skills add maksimzayats/specx --skill specx-tests -a claude-code`. Or copy the skill folder (skills/specx-tests in maksimzayats/specx) into .claude/skills/specx-tests in your project. Claude Code loads it when a task matches its description.
Run `npx skills add maksimzayats/specx --skill specx-tests -a codex`. Or copy the skill folder (skills/specx-tests in maksimzayats/specx) into .agents/skills/specx-tests in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add maksimzayats/specx --skill specx-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/specx-tests, .gemini/skills/specx-tests, .github/skills/specx-tests and .opencode/skills/specx-tests in your project.
Going by SKILL.md and its folder, Specx Tests needs Python for the scripts in its folder and the command-line tools its instructions call (uv). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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.
Specx Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Specx Tests: Python Testing Strategies (c0x12c/ai-toolkit, 106 stars), Pytest Mastery (aiskillstore/marketplace, 433 stars), Flowfile Debugging Playbook (Edwardvaneechoud/Flowfile, 385 stars) and Python Dev (doccker/cc-use-exp, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
maksimzayats (a GitHub user) maintains it in maksimzayats/specx, which has 202 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on August 8, 2026.
Source: maksimzayats/specx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.