Test generator

From Nhqvu2005/VibeGravityKit · View interactive version

Test generator is an AI agent skill from the GitHub repository Nhqvu2005/VibeGravityKit. Generate unit/integration tests with smart edge case analysis (Zero Token Skeleton + Smart Mode).

How to use this skill

Skill file

Test Generator

Purpose

Generate test files with real test cases, not just empty stubs. Smart mode analyzes function signatures and type hints to produce null/boundary/injection edge cases automatically.

Usage

1. Quick Skeleton (original)

python .agent/skills/test-generator/scripts/gen_skeleton.py src/utils.py > tests/test_utils.py

2. Smart Mode — Real Test Cases

Analyzes type hints and parameter names → generates null, boundary, XSS, large input tests:

python .agent/skills/test-generator/scripts/gen_skeleton.py src/auth.py --style smart > tests/test_auth.py

3. From Codebase Index — Full Project Coverage

Reads codebase_index.json from codebase-navigator → generates tests for ALL functions:

# Prerequisite: index the codebase first
python .agent/skills/codebase-navigator/scripts/navigator.py --action index --path .

# Generate tests for all indexed functions
python .agent/skills/test-generator/scripts/gen_skeleton.py --from-index --style smart > tests/test_all.py

4. Coverage Report — What's Tested vs Not

python .agent/skills/test-generator/scripts/gen_skeleton.py --from-index --coverage-report

Output: ✅ functions with tests, ❌ untested functions, 📈 total coverage percentage.

Data Files

Supported Languages

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.