agentsclimarketplace

Test generator

Skill Pratiyush/agent-catalog/skills/skill/test-generator

Marketplace for AI Agent Skills, Prompts, Agents, and MCP servers. Powered by @skillscraft.

Install
npx -y skills add Pratiyush/agent-catalog --skill test-generator

Assembled 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

  1. Analyze the source file to extract function and class signatures:
    deno run --allow-read scripts/analyze-source.ts <source-file>
    
  2. Review the JSON output to understand the public API
  3. Generate test stubs:
    deno run --allow-read --allow-write scripts/generate-stubs.ts <source-file> --output <test-file> --framework vitest
    
    Supported frameworks: vitest (default), jest, mocha
  4. Fill in the generated test bodies with meaningful assertions
  5. 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

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.