Test Generator

    by zihan Y

    1

    Get unit tests for any code function that cover happy paths, edge cases, and error branches automatically.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    What it does

    • Analyzes function signatures to identify valid and invalid input types
    • Lists every decision point and branch in the code to ensure full coverage
    • Categorizes tests into happy paths, boundaries, and error branches
    • Generates descriptive test names that explain the expected behavior
    • Writes assertions that check for exact return values and error reasons
    • Scaffolds test skeletons for Javascript and Python files automatically

    Who it's for

    Software developers writing new code

    Stop staring at a blank test file and get full coverage of your functions instantly.

    Try asking: “Write tests for my new payment processing function in this file.”

    Lead engineers and code reviewers

    Quickly check if a teammates code has missing edge cases or weak test logic.

    Try asking: “Check these tests for missing boundary cases.”

    Programming students and learners

    Learn the right way to test by seeing how to break down logic into testable cases.

    Try asking: “Explain what cases I should test for this calculator script.”

    Test Generator

    Example session with this skill installed

    I have a Javascript function that calculates shipping rates based on weight and destination. Can you write the unit tests for it?

    • Read your context and instructions
    • Compiled the test generator

    I will analyze your shipping rate function and generate a complete set of unit tests covering the normal logic, edge cases, and potential errors.

    Based on the logic in your function, here are the test cases I have identified:

    1. Happy Path: A standard 10kg package to a local zone. This confirms the basic math works.
    2. Boundary: A package at exactly the 100kg limit where the rate jumps to the next tier.
    3. Error Branch: An unsupported destination country code like "ZZ".
    4. Null/Abnormal: A request with a negative weight or a missing destination.

    I have generated the following tests using the node:test format:

    // Tests for calculateRate
    it("calculates standard $15 rate for 10kg to Zone A", () => { ... });
    it("applies the bulk discount exactly at 100kg", () => { ... });
    it("returns an error for unsupported country codes", () => { ... });
    it("returns null if weight is zero or negative", () => { ... });
    

    Each test focuses on one behavior. Would you like me to run the Python script to scaffold this into a full test file for you?

    Connects securely to your tools. The creator never sees your data.

    About this skill

    If you write code but hate writing tests, or you never know which cases to cover, this skill is for you. It helps you look at any function and find the exact spots where it might break. Instead of just testing the easy parts, it guides your AI agent to hunt for edge cases, errors, and empty inputs that usually cause bugs.

    How it works

    1. You provide a function or a code file to your AI agent.
    2. The skill analyzes the code to find every decision point, like if-statements and defaults.
    3. It creates a list of test cases across five categories: happy path, boundaries, errors, null inputs, and state.
    4. It writes clear, focused tests with descriptive names that tell you exactly what is being checked.

    Frameworks & tools

    The skill works with any programming language. It includes a Python script that can automatically build a test file skeleton from your Javascript or Python source files.

    Why this beats prompting it yourself

    Most AI agents write "happy path" tests that only prove the code works when everything is perfect. This skill follows a strict method to ensure you cover boundaries and error branches that typical prompts miss. It uses a specific naming convention so your test reports actually make sense when something fails.

    Use cases

    • Generating a full suite of unit tests for a brand new function
    • Finding missing edge cases in a file that already has some tests
    • Scaffolding a test file for a legacy script you need to refactor
    • Learning how to properly name and structure assertions for better code quality

    Known limitations

    This skill works best for functions where input goes in and a value comes out. It is less effective for code that relies heavily on external databases or complex visual interfaces.

    Built for any LLM. Includes a scripts/scaffold.py tool to generate boilerplate test files from .js and .py source code. Follows a 5-step methodology: signature analysis, branch listing, 5-category case selection (Happy, Boundary, Error, Null, State), behavioral naming, and output-based assertions. Useful for creating deterministic unit tests with clear regression paths.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed today

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listedtoday

    What's inside

    Creator

    zihan Y

    zihan Y

    4 skills on Agensi

    Frequently Asked Questions

    This skill helps you find where your code might break by identifying specific spots like if-statements and defaults. It guides your AI agent to write tests for empty inputs, boundary values, and error branches that usual prompts often miss.

    You just need to provide a function or a code file to your agent. While it works for any programming language, it includes a Python script that can automatically build test skeletons for Javascript or Python files.

    The skill generates a list of test cases across five categories: happy path, boundaries, errors, null inputs, and state. You get clear tests with descriptive names that explain exactly what behavior is being checked, rather than generic names like test1.

    This skill is most effective for functions where you provide an input and get a specific value back. It is less effective for code that relies heavily on external databases or complex visual interfaces.

    You can ask your agent to analyze a specific function or file to find decision points. You can also ask it to scaffold a new test file or find missing edge cases in an existing file that already has some tests.

    New in Testing & Debugging

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.