- Home
- Skills
- Mamba Mental
- Agent Skill Manager
- Test Generator
test-generator_skill
- Python
2
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill mamba-mental/agent-skill-manager --skill test-generator- README.md1.5 KB
- SKILL.md6.2 KB
Overview
This skill automatically suggests and scaffolds tests for new functions and components as you write code. It generates quick, framework-appropriate test files (Jest, Vitest, Pytest, etc.) for happy paths, common edge cases, and simple error scenarios. Use it to get immediate, practical test coverage scaffolding you can review and extend.
How this skill works
The skill watches for new functions, components, or explicit requests to test and then generates basic test scaffolding tailored to the detected framework. It inspects project files (package.json, requirements.txt, existing test files, and imports) to choose Jest/Vitest/Pytest patterns. It writes test files with happy-path cases, null/undefined checks, and simple error conditions, and inserts TODO comments for complex scenarios.
When to use it
- After adding a new function or component
- When you notice a missing test file for an implementation
- When you ask the agent to “can you test this?”
- During code review to quickly scaffold missing unit tests
- When you want a fast starting point before building comprehensive suites
Best practices
- Review generated tests before committing and adapt edge cases to your business logic
- Keep generated TODOs as prompts for deeper edge-case and integration tests
- Use the skill for unit-level scaffolding and invoke a specialist for large or integration suites
- Ensure project dependencies (package.json, requirements.txt) reflect your test framework for accurate detection
- Iterate: regenerate or extend scaffolded tests after refactoring or adding complexity
Example use cases
- You add calculateDiscount(price, percentage) and get Jest tests for expected output, zero percentage, and invalid price errors
- You create a React UserCard component and receive render and interaction tests using testing-library
- You add a Python fetch_user_data function and get pytest cases for success and invalid ID exceptions
- A code reviewer triggers test scaffolding for uncovered functions to make PRs safer
- Run /test-gen to generate a full test file scaffold for a specific file and framework
FAQ
No. The skill generates quick unit and component scaffolding. For integration or E2E testing, invoke the dedicated test-engineer sub-agent.
Which frameworks does it detect and support?
It detects common frameworks from project files and imports: Jest, Vitest, Mocha for JavaScript/TypeScript; pytest and unittest for Python; JUnit for Java; Go testing for Go.
Can it write files directly to the repository?
Yes. It can write test files to your project filesystem when permitted, placing scaffolded tests alongside implementations.