Command Palette

Search for a command to run...

Back to skills
skill № 15223

test-generator

auto-generate pytest scaffolds from python source code.

FreeRuns bundled scripts
jiayaoqijiaby jiayaoqijia★ 81 GitHub stars

Install test-generator in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Unit Test Generator

A high-impact skill that automatically scaffolds pytest test files based on your Python source code. It parses your code structure (classes and functions) and generates corresponding test functions.

Quick Start

# Generate tests for a file
result = await agent.run_tool("generate_tests", file_path="src/calculator.py")
print(result)

Scripts

Script Purpose
generate_tests.py Analyzes code and generates test files

Environment Variables

None required. Uses standard library ast.

Best Practices

  1. Use this tool to quickly bootstrap a test suite for legacy code.
  2. The generated tests are scaffolds; you must fill in the assertions!

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • .gitkeep
  • README.md
  • SOURCE.md
  • TRUST.auto.yaml
  • scripts/generate_tests.py

FAQ

What does the test-generator skill do?

auto-generate pytest scaffolds from python source code.

How do I install the test-generator skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the test-generator skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare test-generator with