ai-agents-workspace-starter: Skill for Claude Code

.agents/skills/write-python-tests/SKILL.md

write-python-tests is a skill for Claude Code, Codex from systemowiec/ai-agents-workspace-starter. It costs 39 tokens per session (510 once invoked), scanned A, original, MIT.

A guide for writing and running Python tests with pytest, a Python testing tool, and factory-boy, a library for creating test data. It covers isolated unit tests, API integration tests, factories, and test commands.

In plain words
What is it for?
Use it to test Python services in isolation, verify API endpoints and CRUD operations, create repeatable test data, and run the test suite.
Why use it?
It encourages tests that check both results and interactions, including authentication failures, missing records, and other edge cases.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is systemowiec/ai-agents-workspace-starter's own configuration. It tells Claude Code and Codex how to work on ai-agents-workspace-starter itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-agents-workspace-starter configures →

Reuse

Borrowing it

Nothing to install: this file belongs to systemowiec/ai-agents-workspace-starter. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/systemowiec/ai-agents-workspace-starter/main/.agents/skills/write-python-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/systemowiec/ai-agents-workspace-starter

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for write-python-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/systemowiec/ai-agents-workspace-starter/write-python-tests/github.svg)](https://agentmods.dev/skills/systemowiec/ai-agents-workspace-starter/write-python-tests)
Your own site
<a href="https://agentmods.dev/skills/systemowiec/ai-agents-workspace-starter/write-python-tests"><img src="https://agentmods.dev/badge/skills/systemowiec/ai-agents-workspace-starter/write-python-tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for write-python-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/systemowiec/ai-agents-workspace-starter/write-python-tests"><img src="https://agentmods.dev/badge/skills/systemowiec/ai-agents-workspace-starter/write-python-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 510 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00510
Opus 5.5 $0.00016 $0.00204
Sonnet 5.5 $0.00008 $0.00102
Haiku 4.5 $0.00004 $0.00051

Measured 2mo ago against content hash 238ee5d7d0d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

write-python-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/write-python-tests/SKILL.md · 63 lines

What it actually says

Skill: Write Python Tests

Unit Tests (backend/app/tests/unit/)

Test services in isolation (mock repositories):

  • Mock repo with AsyncMock(), inject into service via fixture
  • Test one service method per test function
  • Assert return values AND mock interactions (assert_called_once)
  • Test error paths: pytest.raises(NotFoundError) when entity not found
  • Naming: test_<what>_<scenario> or test_<what>_<scenario>_<expectation>

Integration Tests (backend/app/tests/integration/)

Test API endpoints with httpx + TestClient:

  • Use AsyncClient(app=app, base_url="http://test")
  • Test HTTP status codes AND response body structure
  • Include auth tests: unauthenticated returns 401
  • Test CRUD operations: GET list, GET by id, POST create, PUT update, DELETE

Factories (backend/app/tests/factories.py)

  • Use factory.Factory with Meta.model pointing to domain entity
  • factory.Sequence for unique IDs and names
  • factory.LazyAttribute for computed fields (e.g. email from id)
  • NEVER use fixtures for test data - factories only

Running Tests

make test                              # all tests
docker compose -f infra/docker-compose.yml exec backend pytest -v --tb=short    # verbose
docker compose -f infra/docker-compose.yml exec backend pytest -k "test_name"   # specific test
docker compose -f infra/docker-compose.yml exec backend pytest --cov=app        # with coverage

TDD Flow

  1. RED - Write failing test
  2. GREEN - Minimum code to pass
  3. REFACTOR - Clean up

Rules

  • Tests MUST run in Docker (NEVER locally)
  • Each service method requires unit tests
  • Each API endpoint requires integration test
  • Use factory-boy for test data (NOT fixtures)
  • Test edge cases: null, empty, boundary, error

See also (MANDATORY)

  • Before implementation - read workflows/spec-development.md
  • After implementation - run workflows/post-impl-verify.md
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 63 lines · 39 tokens per session scan A 238ee5d7d0d4

Subscribe to this mod's changes

write-python-tests is a skill published in the GitHub repository systemowiec/ai-agents-workspace-starter (2 stars, last pushed 7mo ago), licensed MIT. It adds 39 tokens to every session and 510 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

write-python-tests compared with skills from other repositories

write-python-tests next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
write-python-testssystemowiec/ai-agents-workspace-starterSkill27mo agoMITA39Claude Code, Codex
temporal-python-testingwshobson/agentsSkill42k2d agoMITA45Claude Code
python-testingmicrosoft/agent-frameworkSkill15ktodayMITA29Claude Code, Codex
adk-verify-snippetsgoogle/adk-pythonSkill22ktodayApache-2.0C149Claude Code, Codex
adk-setupgoogle/adk-pythonSkill22ktodayApache-2.0C146Claude Code
test-generatorvstorm-co/pydantic-deepagentsSkill1.1k8d agoMITA12Claude Code, Codex
kb-python-developmentCommunity-Access/accessibility-agentsSkill436todayMITA39Claude Code, Codex