CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

test:generate

Generate unit tests for a source file. Analyzes the code and creates test cases covering public functions, edge cases, and error paths. Use when you need test coverage for new code or when tests are missing.

Invalid
This skill can't be scored yet
Validation errors are blocking scoring. Review and fix them to unlock Quality, Impact and Security scores. See what needs fixing →
SKILL.md
Quality
Evals
Security

Test Generator

Generate unit tests for a given source file by analyzing its public interface, control flow, and error handling paths.

Why This Exists

Writing tests from scratch is tedious and developers skip it. This skill generates a solid starting point that covers the obvious cases, so the developer can focus on the tricky edge cases that require domain knowledge.

Steps

Step 1: Analyze the Source File

Read the source file. Identify:

  • Public functions and methods
  • Input parameter types and ranges
  • Return types
  • Error conditions (throws, error returns, panics)
  • External dependencies (imports, API calls)

Step 2: Design Test Cases

For each public function, generate test cases for:

  • Happy path with typical inputs
  • Boundary values (empty string, zero, max int)
  • Error cases (nil input, invalid format)
  • If the function has side effects, test those separately

Step 3: Write Tests

Create the test file following project conventions:

  • Match the project's test framework (detect from existing tests or config)
  • Use the project's assertion style
  • Follow the naming convention of existing tests

Write the test file to the standard test location for the language.

Step 4: Run and Fix

Run the generated tests:

# Detect and run appropriate test command

If any tests fail due to incorrect assumptions, fix them. Report which tests pass and which needed adjustment.

Tips

  • The generated tests are a starting point, not a final product
  • Review the generated tests for correctness before committing
  • Edge cases that require domain knowledge need manual attention
Repository

LuminairPrime/git-worktrees-prime

Path

vendors/cc-skill-main/eval/runs/cc-skill-checker-eval/2026-06-01-opus/cases/case-005-subtle-present-vs-strong/_modified/target-skill/SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.