write-tests

Generate unit tests for Python, JavaScript, TypeScript, Rust, and Go modules.

5|1|Updated Oct 18, 2019
One-click install
npx skills add https://github.com/Marshall-Hallenbeck/dot_files --skill write-tests-marshall-hallenbeck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-tests
Source: https://github.com/Marshall-Hallenbeck/dot_files/tree/main/.claude/skills/write-tests
Command: npx skills add https://github.com/Marshall-Hallenbeck/dot_files --skill write-tests-marshall-hallenbeck

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the manual overhead of writing boilerplate unit tests by automatically detecting your project's test runner and generating high-coverage test suites that adhere to your existing coding conventions.

Core Features & Use Cases

  • Automated Runner Detection: Automatically identifies and configures tests for pytest, Jest, Vitest, cargo, or go.
  • Convention-Aware Generation: Analyzes existing test files to mirror your project's specific import styles, mocking patterns, and naming conventions.
  • Iterative Validation: Automatically runs tests, diagnoses failures, and performs linting to ensure the generated code is production-ready.

Quick Start

Invoke the write-tests skill by providing the path to the specific module or file you wish to test.

Frequently Asked Questions about write-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate unit tests for an existing Python module?

Automated unit test generation works by detecting your project's test runner, analyzing existing test files to mirror your coding conventions, and iteratively running test suites and linting tools to refine the generated test code until all assertions pass.

Can I automatically create Jest tests for a JavaScript project?

Automated test generation supports Python, JavaScript, TypeScript, Rust, and Go ecosystems. It detects project-specific test runners like pytest, Jest, Vitest, cargo, or go to ensure full coverage of happy paths and edge cases.

How do I ensure generated tests match my project's coding conventions?

To ensure generated tests match your coding conventions, the skill analyzes existing test files to mirror your project's specific import styles, mocking patterns, and naming conventions before generating new test code for the target module.

Does automated test generation support Rust and Go ecosystems?

Yes, automated test generation supports Rust and Go ecosystems by detecting and configuring tests for cargo and go. It ensures full coverage of happy paths and edge cases across these diverse environments.

What is the best way to automate unit test boilerplate creation?

The best way to automate unit test boilerplate creation is using a convention-aware generator that automatically detects your test runner, iteratively runs test suites to diagnose failures, and performs linting to ensure production-ready code.

Why do my generated tests fail during automated test generation?

Generated tests might fail during automated test generation due to uncovered edge cases or convention mismatches. The skill addresses this by iteratively running test suites, diagnosing failures, and refining the test code until all assertions pass.