Agent skill

Specx Tests

by maksimzayats in maksimzayats/specx

Add or refine tests for specx Python services. An agent skill from maksimzayats/specx.

MITAuto-check passedTesting & QA

Install Specx Tests

skills CLI
$ npx skills add maksimzayats/specx --skill specx-tests -a claude-code

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

GitHub CLI
$ gh skill install maksimzayats/specx specx-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/maksimzayats/specx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/specx-tests .claude/skills/specx-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
specx-tests
GitHub stars
202
Token cost
~1.9k tokens
SKILL.md length
888 words
Files
4 (incl. references)
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Add or refine tests for specx Python services. An agent skill from maksimzayats/specx.

  • Creating unit tests for use cases/services
  • SKILL.md covers Test Layers, Rules, Code Style and References
  • Runs Python scripts from its folder; calls uv
  • Integration tests for FastAPI controllers

What it does

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.

When your agent uses it

  • Creating unit tests for use cases/services
  • Integration tests for FastAPI controllers
  • Infrastructure adapters
  • E2e smoke tests

Example prompts

  • “/specx-tests”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 9362406. 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

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv

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

  • Network

    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.

  • 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

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.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.8k

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 maksimzayats/specx at commit 9362406, republished under its MIT licence (© maksimzayats). 888 words, ~1,895 tokens.

Download SKILL.mdSave it as .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.
name
specx-tests
description
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.

specx Tests

Use this skill when behavior, wiring, or architecture boundaries need tests. Read references/testing.md before creating test files.

Test Layers

  • 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.

Rules

  • Test behavior and boundaries, not implementation ceremony.
  • Required generated coverage is currently scoped to core services, use cases, and capabilities.
  • Mirror source module paths directly with flat test files, for example tests/unit/core/tasks/services/test_title_service.py.
  • Do not create per-target test folders, 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.
  • Test functions receive container, register any scenario-specific overrides before resolution, then call container.resolve(Target).
  • If a complete replacement is needed by every test in one module, a module-local container fixture may register it before returning the container.
  • Keep one-off class-based test doubles in the 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.
  • Do not create tests/_support/fakes, tests/**/_fakes.py, generic _scenarios.py, fake modules outside those mirrored unit port/capability packages, or double classes in conftest.py.
  • Use 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.
  • Unit tests replace external IO, time, randomness, network, Redis, database, and framework resources with local doubles or inline mocks.
  • Integration tests use the real internal app graph. Do not mock internal use cases, services, or capabilities; stub only external systems when needed.
  • Add core use-case integration tests under tests/integration/core/... for use cases that inject a UoW manager; delivery tests should own HTTP mapping, not be the only persistence proof.
  • Persistence integration tests use the production database family when dialect behavior matters. A rollback harness may not replace isolated commit-visible tests for locking, concurrency, isolation, or after-commit behavior.
  • Core health tests cover required-dependency readiness and any reusable probe services and use cases. Delivery probe tests cover /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.
  • Probe route tests assert 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.
  • Unit-test logging configurators by overriding logging settings, monkeypatching logging.config.dictConfig, and asserting the generated stdlib config. Use caplog only when a log record is meaningful behavior.
  • Unit-test FastAPI lifecycle managers by overriding closeable infrastructure resources and asserting shutdown order. Route integration helpers must run ASGI lifespan explicitly.
  • Use 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 route tests compare response status codes with fastapi.status constants, not raw integer literals.
  • Use 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.
  • Mock fixtures should register one external collaborator for the behavior under test. Do not bundle unrelated mocks in a dict or class-keyed fixture.
  • Use native pytest fixtures for test dependencies. Do not enable diwire.integrations.pytest_plugin, and do not use Injected[...] parameters in tests.
  • AnyIO runs tests on every installed supported backend by default. If the app graph is asyncio-specific, override the top-level anyio_backend fixture to return "asyncio"; leave it unpinned only when the suite intentionally supports every installed backend.
  • Do not add filler smoke tests that only assert container.resolve(...) returns an instance.
  • Do not hand-build application graphs in test bodies. Resolve project classes from the container; local test doubles may be instantiated in the test module before registration.
  • Keep unit tests free from FastAPI request objects and real external IO.
  • Every test directory must include an empty __init__.py file.
  • Use 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.
  • Disable built-in guardrails only with exact semantic IDs under [tool.specx].ignore and a project reason recorded beside the configuration.
  • Generated projects use [tool.specx].select = ["ALL"]. Narrower projects enable technology-specific families explicitly with [tool.specx].extend-select; FastAPI projects select fastapi.
  • Add extra_rules only for project-specific checks that are not covered by a built-in SpecxRuleId; use the programmatic wrapper for those projects.
  • Existing workflows and projects with custom rules may use references/render_architecture_guardrails.py to render the tiny wrapper.
Show full SKILL.md (51 more words)Show less

Code Style

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

  • 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

Files

SKILL.md and 3 other files (references) in skills/specx-tests of maksimzayats/specx.

  • SKILL.md
  • agents/openai.yaml
  • references/render_architecture_guardrails.py
  • references/testing.md

Open the folder on GitHubat commit 9362406

Compare with similar skills

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.

Specx Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Specx Tests this skillmaksimzayats/specx202—~1.9kAutomated safety check: PassMIT
Python Testing Strategiesc0x12c/ai-toolkit106—~747Automated safety check: PassNone
Pytest Masteryaiskillstore/marketplace433—~1.2kAutomated safety check: PassNone
Flowfile Debugging PlaybookEdwardvaneechoud/Flowfile385—~6.3kAutomated safety check: PassMIT
Python Devdoccker/cc-use-exp1.1k—~790Automated safety check: PassCustom licence
Pythonericrisco/rsc-harness180—~3.8kAutomated safety check: PassMIT

Similar skills

  • Python Testing Strategies

    c0x12c/ai-toolkit

    Testing patterns for FastAPI with pytest-asyncio, httpx AsyncClient, fixtures, and test data factories.

    106 GitHub stars~747 tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Pytest Mastery

    aiskillstore/marketplace

    Python testing with pytest using uv package manager. An agent skill from aiskillstore/marketplace.

    433 GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Flowfile Debugging Playbook

    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…

    385 GitHub stars~6.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Python Dev

    doccker/cc-use-exp

    Python 开发规范。当用户操作 .py、pyproject.toml、requirements.txt、setup.py 文件, 或涉及 FastAPI、Django、Flask、pytest、asyncio 开发时触发。

    1.1k GitHub stars~790 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Python

    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…

    180 GitHub stars~3.8k tokensUpdated today
    Backend & APIsAuto-check passed
  • Python

    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.

    285 GitHub stars~2.8k tokensUpdated 6 mo ago
    Backend & APIsAuto-check: notes

More from maksimzayats/specx

All 12 skills in this repo
  • Specx Add Core Service

    maksimzayats/specx

    Add or refactor a specx core scope service. An agent skill from maksimzayats/specx.

    202 GitHub stars~688 tokensUpdated 2 mo ago
    Auto-check passed
  • Specx Add Core Use Case

    maksimzayats/specx

    Add or refactor a specx core scope use case. An agent skill from maksimzayats/specx.

    202 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Add delivery controllers for specx services, especially FastAPI HTTP routes.

    202 GitHub stars~704 tokensUpdated 2 mo ago
    Auto-check passed
  • Add technical infrastructure adapters for specx core scopes.

    202 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed
  • Design or review specx core scope boundaries in Python services.

    202 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Specx Diwire Composition

    maksimzayats/specx

    Wire dependency injection for a specx Python service with diwire.

    202 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Specx Tests

What does Specx Tests do?

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.

When should I use Specx Tests?

Specx Tests fits situations like: creating unit tests for use cases/services; integration tests for FastAPI controllers; infrastructure adapters; E2e smoke tests.

How do I install Specx Tests in Claude Code?

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.

How do I install Specx Tests in Codex?

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.

Can I use Specx 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 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.

What does Specx Tests need to run?

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.

Does Specx Tests access the network?

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.

Is Specx 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 Specx Tests use?

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.

How many tokens does Specx Tests use?

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.

What are the alternatives to Specx Tests?

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.

Who maintains Specx Tests?

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.