# Pytest skill

> Pytest skill is an open-source agent skill. Generates production-grade pytest tests in Python with fixtures, parametrize, markers, mocking, and conftest patterns. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/LambdaTest/agent-skills/tree/main/pytest-skill
- **Repository:** https://github.com/lambdatest/agent-skills
- **GitHub stars:** 392
- **License:** MIT
- **Skill name:** pytest-skill
- **Collection:** https://github.com/LambdaTest/agent-skills
- **Listing updated:** 2026-11-17

## About

Generates production-grade pytest tests in Python with fixtures, parametrize, markers, mocking, and conftest patterns. Use when user mentions "pytest", "conftest", "@pytest.fixture", "@pytest.mark", "Python test". Triggers on: "pytest", "conftest", "Python test", "parametrize", "Python unit test".

## When your agent uses it

> Generates production-grade pytest tests in Python with fixtures, parametrize, markers, mocking, and conftest patterns. Use when user mentions "pytest", "conftest", "@pytest.fixture", "@pytest.mark", "Python test". Triggers on: "pytest", "conftest", "Python test", "parametrize", "Python unit test".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/LambdaTest/agent-skills/tree/HEAD/pytest-skill)
- [License: MIT](https://github.com/LambdaTest/agent-skills/tree/HEAD/pytest-skill)

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/pytest-skill` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/pytest-skill &&
cp -R "$tmp/pytest-skill" ~/.claude/skills/pytest-skill &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/pytest-skill` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/pytest-skill` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/pytest-skill &&
cp -R "$tmp/pytest-skill" ~/.agents/skills/pytest-skill &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/pytest-skill` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/pytest-skill` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/pytest-skill &&
cp -R "$tmp/pytest-skill" ~/.cursor/skills/pytest-skill &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/pytest-skill` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/LambdaTest/agent-skills.git --path pytest-skill
```

Or copy the folder to `~/.gemini/skills/pytest-skill` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/pytest-skill`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/pytest-skill &&
cp -R "$tmp/pytest-skill" ~/.copilot/skills/pytest-skill &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/pytest-skill` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git
```

Then copy `agent-skills/pytest-skill` into your agent's skills folder as `pytest-skill`. Agents that support SKILL.md read one folder per skill.

## FAQ

### How do I install Pytest skill in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/pytest-skill to use it in all your projects, or to .claude/skills/pytest-skill in one project.

### Does Pytest skill run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Pytest skill?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

---
Source: https://ai-powered.com/skills/pytest-skill
