code-generate-tests

Generate tests for untested functions and edge cases, then verify they pass.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "code-generate-tests" with this command: npx skills add sirn/dotfiles/sirn-dotfiles-code-generate-tests

Generate tests for untested functions and edge cases, then verify they pass.

Process

Identify context:

  • If code changes are involved: run jj diff -s first to see changed files; then use jj diff -- path to restrict to specific files/directories

  • If the user specified specific files or paths, focus on those

  • Understand which functions/modules need test coverage

Detect test framework:

  • Invoke code-analyze-project skill to detect test framework and testing patterns

  • Check for existing test files and naming conventions

  • Identify test helper functions and fixtures in use

Identify untested code paths:

  • Use Grep to find functions without corresponding tests

  • Check for edge cases, error paths, boundary conditions

  • Identify critical paths that lack coverage

Research and analyze:

  • Research testing best practices for the language/framework (use WebSearch/WebFetch)

  • Identify critical paths, edge cases, and error handling scenarios

Generate test code:

  • Match existing test conventions (naming, structure, fixtures)

  • Cover happy path, edge cases, and error scenarios

  • Include proper assertions and test organization

Run the generated tests:

  • Invoke test skill to run the new tests

  • Analyze any failures

Fix test failures:

  • Identify root cause of failures

  • Fix test code or generated code as appropriate

  • Re-run tests to verify

Stop Condition

  • If test generation or fixing fails twice, stop and ask for guidance.

Output

  • Test Framework Detected

  • Untested Functions/Paths Identified

  • Generated Tests (with file locations and coverage summary)

  • Test Results (from running tests)

  • Failures Fixed (if any, with explanations)

  • Verification - All new tests pass

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

code-plan

No summary provided by upstream source.

Repository SourceNeeds Review
16-sirn
Coding

code-explain

No summary provided by upstream source.

Repository SourceNeeds Review
16-sirn
Coding

code-config-ci

No summary provided by upstream source.

Repository SourceNeeds Review
16-sirn
Coding

code-commit

No summary provided by upstream source.

Repository SourceNeeds Review
15-sirn