python-test-writer

python-test-writer is a skill for Claude Code, Codex from beel-collab/presets.dev. It costs 48 tokens per session (965 once invoked), scanned A, original, MIT.

A test-writing guide for Python projects that uses pytest, a Python testing tool, together with the project's uv environment and Ruff checks.

In plain words
What is it for?
Use it to add pytest coverage, write a regression test, or test a failing Python case.
Why use it?
It helps turn a bug or changed behavior into a repeatable test without changing the Python version or adding another test framework.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; $skill-name invocation.

Good fit Use it to add pytest coverage, write a regression test, or test a failing Python case.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/beel-collab/presets.dev/python-test-writer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add beel-collab/presets.dev --skill python-test-writer
Clone the repo
git clone --depth 1 https://github.com/beel-collab/presets.dev

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 python-test-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/beel-collab/presets.dev/python-test-writer/github.svg)](https://agentmods.dev/skills/beel-collab/presets.dev/python-test-writer)
Your own site
<a href="https://agentmods.dev/skills/beel-collab/presets.dev/python-test-writer"><img src="https://agentmods.dev/badge/skills/beel-collab/presets.dev/python-test-writer/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 python-test-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/beel-collab/presets.dev/python-test-writer"><img src="https://agentmods.dev/badge/skills/beel-collab/presets.dev/python-test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 965 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.00048 $0.00965
Opus 5.5 $0.00019 $0.00386
Sonnet 5.5 $0.00010 $0.00193
Haiku 4.5 $0.00005 $0.00097

Measured 17d ago against content hash bf5d4703702c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-test-writer 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 17d 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.

antigravity/python/python-test-writer/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Test Writer Skill for Antigravity CLI

Install

Install the native export at .agents/skills/python-test-writer/SKILL.md (one file shared with Codex). Copy that export, not this catalog file. Catalog fields such as tools and author are for presets.dev. Install one skill file per name. Cursor, GitHub Copilot, Codex, Antigravity CLI, and Devin can all read .agents/skills, so a second copy with the same name collides.

Python Test Writer

Shared skill python-test-writer for Python. Codex and Antigravity CLI both read .agents/skills/python-test-writer/SKILL.md. Install this one file. Codex calls it with $python-test-writer or /skills. Cursor, GitHub Copilot, and Devin also read .agents/skills. A second copy with the same name collides. Do not install another tool's file there.

When to run

Run this when the user asks for tests, a regression case, or coverage for a Python change. Write pytest tests against the behavior, using the project's uv environment.

When to leave it

Stop for a non-Python repository, or when the user asked for production code and said not to add tests. Do not upgrade Python or add a new test framework.

Steps

  1. Read pyproject.toml, the lockfile, and an existing test so the style matches. Note the interpreter constraint. Do not change it.
  2. Name the behavior that is missing. One test, one behavior. Include the failure case: empty input, a missing row, or a dependency error.
  3. Reuse fixtures. Build only the data the assertion needs. Call the real function. Assert the return value, the raised error, or the persisted row.
  4. If the bug is not reproduced by the new test, stop and say so. Do not weaken the assertion to go green.
  5. Run the test command the repository documents. If it uses uv, that is uv run pytest. If it uses Poetry, Hatch, tox, or a venv, use that command. Do not force uv onto a project that does not use it. Run Ruff only when the project configures it. Record the outputs. If a command cannot run, write not run and the reason.

Read the full file on GitHub · 86 lines

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. 17d ago First seen · 86 lines · 48 tokens per session scan A bf5d4703702c

Subscribe to this mod's changes

python-test-writer is a skill published in the GitHub repository beel-collab/presets.dev (3 stars, last pushed 6d ago), licensed MIT. It adds 48 tokens to every session and 965 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-11-13.

Related

python-test-writer compared with skills from other repositories

python-test-writer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
python-test-writerbeel-collab/presets.devSkill36d agoMITA48Claude Code, Codex
python-developmentsammcj/agentic-codingSkill1743d agoApache-2.0A13Claude Code, Codex
adk-verify-snippetsgoogle/adk-pythonSkill22k2d agoApache-2.0C149Claude Code, Codex
adk-setupgoogle/adk-pythonSkill22k2d agoApache-2.0C146Claude Code
swift-developmentsammcj/agentic-codingSkill1743d agoApache-2.0A13Claude Code, Codex
rust-engineersammcj/agentic-codingSkill1743d agoApache-2.0A39Claude Code, Codex
rust-developmentnavikt/copilotSkill65yesterdayMITA27Claude Code, Codex