Repository inventory

clear-solutions/unit-tests-skills

Skills indexed from this repository, with install-style signals scoped to the repo.
1 skills0 GitHub stars0 weekly installsGitHubOwner profile

Overview

This skill generates high-quality unit tests from a verified list of test cases. It enforces proven testing principles like Given-When-Then, focused single-scenario tests, clean test data, and behavior-driven assertions. The skill supports multiple languages and applies Java-specific rules when Java is detected.

How this skill works

Before generating any code, the skill requires a prior run of the test-case generator to produce the canonical list of test cases. It reads the target source, detects the component type (controller, service, repository, etc.) and technology stack, applies relevant rules from the tests ruleset, and emits complete test files. For Java targets it follows the Java unit test conventions (templates, JSON handling, argument capture, logging rules) and performs a compilation verification pass.

When to use it

  • You have a target method/class and a validated set of test cases from /generate-test-cases.
  • You need tests that follow Given-When-Then and behavior-focused testing principles.
  • You want consistent naming, coverage hygiene (include/exclude rules), and avoidance of logic inside tests.
  • You prefer tests that use clean test data builders and verify relevant interactions only.
  • You are preparing code for CI and want tests that compile before submission.

Best practices

  • Always run /generate-test-cases first and confirm the test case list before generating tests.
  • Keep one assertion scenario per test and name tests using the project naming conventions.
  • Use helpers/builders for complex test data to keep tests readable and resilient.
  • Avoid logic in tests: prefer explicit expected values and ArgumentCaptor over broad matchers.
  • For Java, follow the provided templates, use explicit JSON literals, and verify compilation after generation.

Example use cases

  • Generate unit tests for a service method with multiple edge cases derived from the test-case list.
  • Create controller tests that verify behavior, HTTP status mapping, and error handling based on test cases.
  • Produce repository/unit tests that validate query behavior and boundary conditions.
  • Regenerate tests after refactoring a public API to ensure tests follow updated behavior and naming conventions.

FAQ

Stop and run /generate-test-cases for the target. The test-case step is mandatory; the generator will not proceed without it.

Does the skill auto-detect language and framework?

Yes. It detects the technology stack and applies language-specific rules, with special handling for Java unit tests.

Will generated tests be compiled?

Yes. The skill runs a compilation verification and iterates until tests compile successfully.

1 skills

More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational