python-pytest-creator-skill

python-pytest-creator-skill is a skill for OpenCode from darellchua2/opencode-config-template. It costs 21 tokens per session (2,742 once invoked), scanned C, original, Apache-2.0.

A tool that scans Python code and generates pytest test files for normal cases, edge cases, errors, asynchronous functions, decorators, and context managers.

In plain words
What is it for?
Use it to create or expand automated tests for a Python application and check that they run with pytest or Poetry.
Why use it?
It reduces the manual work of deciding what to test and helps produce tests that match the project's pytest setup.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions OpenCode.

Good fit Use it to create or expand automated tests for a Python application and check that they run with pytest or Poetry.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/python-pytest-creator-skill
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 darellchua2/opencode-config-template --skill python-pytest-creator-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: OpenCode.

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-pytest-creator-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/python-pytest-creator-skill.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/python-pytest-creator-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/python-pytest-creator-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/python-pytest-creator-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,742 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00021 $0.02742
Opus 5 $0.00010 $0.01371
Sonnet 5 $0.00004 $0.00548
Haiku 4.5 $0.00002 $0.00274

Measured 4d ago against content hash 213ce4f1d9c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

python-pytest-creator-skill scanned grade C with 1 finding 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 4d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

When protocol is enabled, this skill defaults to `Iterations: 10` (sufficient for typical single-pass workflows). Override with `Iterations: N` for specific tasks. Safety blocks: `.env`, `node_modules/`, `rm -rf`, `git p
opencode_app/.opencode/skills/python-pytest-creator-skill/SKILL.md · 350 lines

How it starts

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

What I do

I implement a complete Python pytest test generation workflow by extending the test-generator-framework:

  1. Analyze Python Codebase: Scan Python application to identify functions, classes, and modules
  2. Detect Python Testing Setup: Identify pytest version and Poetry availability
  3. Generate Python-Specific Scenarios: Create comprehensive test scenarios covering:
    • Happy paths, edge cases, and error handling
    • Python-specific patterns (decorators, context managers, async functions)
  4. Delegate to Framework: Use test-generator-framework for core test generation workflow
  5. Ensure Executability: Verify tests run with poetry run pytest or pytest

When to use me

Use this workflow when:

  • You need to create comprehensive pytest test files for a Python application
  • You want to ensure all edge cases and error conditions are covered
  • You need tests that integrate with Poetry environments
  • You prefer a systematic approach to test generation with user confirmation
  • You want to ensure tests run correctly with your project's pytest version

Framework: This skill extends test-generator-framework for core test generation workflow, adding Python-specific functionality.

Prerequisites

  • Python project with Poetry (pyproject.toml) or pip (requirements.txt)
  • Pytest installed and configured in project
  • Python source code to test
  • Appropriate file permissions to create test files

Note: Poetry is optional. If Poetry is installed and pyproject.toml exists, tests will use poetry run pytest. Otherwise, tests will use pytest directly.

Steps

Step 1: Analyze Python Codebase

  • Use glob patterns to find Python files: **/*.py
  • Exclude test files: **/test_*.py, **/*_test.py, **/tests/**/*.py
  • Read each Python file to identify:
    • Functions: def function_name(parameters):
    • Classes: class ClassName:
    • Methods: def method_name(self, parameters):
    • Async functions: async def async_function():
    • Decorators: @decorator_name
    • Context managers: with context_manager():
  • Identify import statements to understand dependencies

Read the full file on GitHub · 350 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. 4d ago First seen · 350 lines · 21 tokens per session scan C 213ce4f1d9c5

Subscribe to this mod's changes

python-pytest-creator-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 21 tokens to every session and 2,742 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

temporal-python-testing

Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.

wshobson/agents · 45 tokens

test-corpus

The testdocuments submodule is a bucket-fetched fixture corpus that is not committed. This skill covers readtestfixture, missing fixtures, valid A/B controls, and submodule push order. Load before running Rust tests on a fresh clone, setting up an A/B control, adding a fixture-backed test, or diagnosing…

xberg-io/xberg · 72 tokens

python-providers

Create, modify, test, or package Python provider adapters under python/providers, including framework-specific dependencies, public imports, type inference, and provider metadata. Use for Python provider work only; use python-sdk for core SDK changes.

ComposioHQ/composio · 49 tokens

xberg-typescript-toolchain

Work on Xberg TypeScript or JavaScript packages with the repository's actual poly, pnpm, npm, Vitest, napi-rs, wasm-pack, and integration-package boundaries. Load for TS/JS tooling or package changes, not Rust-only binding generation.

xberg-io/xberg · 60 tokens

adk-verify-snippets

Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail report with per-snippet coverage. Use when the user asks to verify, test, or validate the code samples in a README, a guide…

google/adk-python · 149 tokens

adk-setup

Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test run. Runs only when explicitly requested, never on its own. Use when asked to set up, bootstrap, or repair a development…

google/adk-python · 146 tokens