Test generator
Marketplace for AI Agent Skills, Prompts, Agents, and MCP servers. Powered by @skillscraft.
npx -y skills add Pratiyush/agent-catalog --skill test-generatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Generate test file stubs and boilerplate from source code analysis. Use when the user asks to create tests, add test coverage, or scaffold test files for existing source code.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.8 KB, as published. Nobody here has run it
Test Generator
When to use this skill
Activate when the user wants to:
- Create test files for existing source code
- Scaffold test stubs with correct imports and structure
- Add test coverage to an untested module
Instructions
- Analyze the source file to extract function and class signatures:
deno run --allow-read scripts/analyze-source.ts <source-file> - Review the JSON output to understand the public API
- Generate test stubs:
Supported frameworks:deno run --allow-read --allow-write scripts/generate-stubs.ts <source-file> --output <test-file> --framework vitestvitest(default),jest,mocha - Fill in the generated test bodies with meaningful assertions
- Run the tests to verify the stubs compile and the structure is correct
Output format
The analysis script outputs:
{
"file": "utils.ts",
"functions": [
{ "name": "formatDate", "params": ["date: Date", "locale?: string"], "returnType": "string", "async": false, "exported": true }
],
"classes": [
{ "name": "UserService", "methods": ["getById", "create", "delete"], "exported": true }
]
}
Gotchas
- Deno 2.0+ is required — these scripts do not run under Node.js
- Analysis uses regex-based parsing, not a full TypeScript compiler — some edge cases may be missed
- Generated tests are stubs with placeholder assertions (
expect(...).toBeDefined()) — fill in real logic - For framework-specific patterns (mocking, setup/teardown), read
references/TESTING-PATTERNS.md