test-generator
auto-generate pytest scaffolds from python source code.
by 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
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
- Use this tool to quickly bootstrap a test suite for legacy code.
- 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
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…