skills$openclaw/test-gen
lxgicstudios2.9k

by lxgicstudios

test-gen – OpenClaw Skill

test-gen is an OpenClaw Skills integration for coding workflows. Generate unit tests from source files using AI. Use when adding test coverage.

2.9k stars145 forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nametest-gen
descriptionGenerate unit tests from source files using AI. Use when adding test coverage. OpenClaw Skills integration.
ownerlxgicstudios
repositorylxgicstudios/test-gen
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @lxgicstudios/test-gen
last updatedFeb 7, 2026

Maintainer

lxgicstudios

lxgicstudios

Maintains test-gen in the OpenClaw Skills directory.

View GitHub profile
File Explorer
2 files
.
_meta.json
463 B
SKILL.md
2.5 KB
SKILL.md

name: test-gen description: Generate unit tests from source files using AI. Use when adding test coverage.

Test Gen

Your code has 12% test coverage and your manager is asking questions. This tool generates unit tests from your source files. Covers happy paths, edge cases, error conditions. Tests that actually test something, not just exist for coverage numbers.

One command. Zero config. Just works.

Quick Start

npx ai-test-gen ./src/utils.ts

What It Does

  • Generates unit tests for your functions and classes
  • Covers happy path, edge cases, and error conditions
  • Creates tests for Jest, Vitest, or Mocha
  • Mocks dependencies automatically
  • Includes meaningful assertions, not just "expect(true).toBe(true)"

Usage Examples

# Generate tests for a single file
npx ai-test-gen ./src/auth.ts

# Generate for all files in a directory
npx ai-test-gen ./src/services/

# Specify test framework
npx ai-test-gen ./src/utils.ts --framework vitest

# Output to a specific location
npx ai-test-gen ./src/parser.ts --output ./tests/parser.test.ts

Best Practices

  • Review generated tests - AI tests are a starting point, not a finish line
  • Run them immediately - Catch issues while context is fresh
  • Add your own edge cases - You know your domain better than AI
  • Don't trust coverage alone - Good tests test behavior, not lines

When to Use This

  • Inheriting a codebase with no tests
  • Adding tests to a new feature quickly
  • Hitting a coverage target for CI
  • Learning what good tests look like for your code

Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

Find more:

Requirements

No install needed. Just run with npx. Node.js 18+ recommended.

npx ai-test-gen --help

How It Works

The tool parses your source file, identifies testable units (functions, classes, methods), analyzes their signatures and implementations, then generates test cases that cover normal operation, edge cases, and error handling.

License

MIT. Free forever. Use it however you want.


Built by LXGIC Studios

README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

No install needed. Just run with npx. Node.js 18+ recommended. ```bash npx ai-test-gen --help ```

FAQ

How do I install test-gen?

Run openclaw add @lxgicstudios/test-gen in your terminal. This installs test-gen into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/lxgicstudios/test-gen. Review commits and README documentation before installing.