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.
curl -O https://raw.githubusercontent.com/systemowiec/ai-agents-workspace-starter/main/.agents/skills/write-python-tests/SKILL.mdgit clone --depth 1 https://github.com/systemowiec/ai-agents-workspace-starterWrote 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.
[](https://agentmods.dev/skills/systemowiec/ai-agents-workspace-starter/write-python-tests)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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>ortest_<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.FactorywithMeta.modelpointing to domain entity factory.Sequencefor unique IDs and namesfactory.LazyAttributefor 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
- RED - Write failing test
- GREEN - Minimum code to pass
- 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-boyfor 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
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.
- 2mo ago First seen · 63 lines · 39 tokens per session scan A 238ee5d7d0d4
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.
write-python-tests compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| write-python-testssystemowiec/ai-agents-workspace-starter | Skill | 2 | 7mo ago | MIT | A | 39 | Claude Code, Codex |
| temporal-python-testingwshobson/agents | Skill | 42k | 2d ago | MIT | A | 45 | Claude Code |
| python-testingmicrosoft/agent-framework | Skill | 15k | today | MIT | A | 29 | Claude Code, Codex |
| adk-verify-snippetsgoogle/adk-python | Skill | 22k | today | Apache-2.0 | C | 149 | Claude Code, Codex |
| adk-setupgoogle/adk-python | Skill | 22k | today | Apache-2.0 | C | 146 | Claude Code |
| test-generatorvstorm-co/pydantic-deepagents | Skill | 1.1k | 8d ago | MIT | A | 12 | Claude Code, Codex |
| kb-python-developmentCommunity-Access/accessibility-agents | Skill | 436 | today | MIT | A | 39 | Claude Code, Codex |