generate-tests

generate-tests is a command for Claude Code from muyen/vibe-to-prod. It costs 13 tokens per session (693 once invoked), scanned A, original, MIT.

A test-generation command creates tests for Go backend code and Swift iOS or Kotlin Android code, including normal cases, errors, and edge cases. Unit tests check one small part of a program in isolation.

In plain words
What is it for?
It is for generating backend unit tests with Go testing and Testify, iOS tests with XCTest, and Android tests with JUnit and MockK.
Why use it?
It reduces the effort needed to create a starting test suite and helps cover behaviours that are easy to overlook.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit It is for generating backend unit tests with Go testing and Testify, iOS tests with XCTest, and Android tests with JUnit and MockK.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/muyen/vibe-to-prod/generate-tests
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/muyen/vibe-to-prod

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate-tests

README.md
[![agentmods](https://agentmods.dev/badge/commands/muyen/vibe-to-prod/generate-tests/github.svg)](https://agentmods.dev/commands/muyen/vibe-to-prod/generate-tests)
Your own site
<a href="https://agentmods.dev/commands/muyen/vibe-to-prod/generate-tests"><img src="https://agentmods.dev/badge/commands/muyen/vibe-to-prod/generate-tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generate-tests

Your own site · 80×15
<a href="https://agentmods.dev/commands/muyen/vibe-to-prod/generate-tests"><img src="https://agentmods.dev/badge/commands/muyen/vibe-to-prod/generate-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 693 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00013 $0.00693
Opus 5.5 $0.00005 $0.00277
Sonnet 5.5 $0.00003 $0.00139
Haiku 4.5 $0.00001 $0.00069

Measured 12d ago against content hash a8722dde7561, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

generate-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/generate-tests.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate Tests

Generate tests for: $ARGUMENTS

Detect Platform

Based on the file path, determine which testing framework to use:

Backend (Go)

  • File pattern: backend/**/*.go
  • Test file: *_test.go in same directory
  • Framework: Go testing + testify

iOS (Swift)

  • File pattern: mobile/ios/**/*.swift
  • Test file: *Tests.swift in test directory
  • Framework: XCTest

Android (Kotlin)

  • File pattern: mobile/android/**/*.kt
  • Test file: *Test.kt in test directory
  • Framework: JUnit + MockK

Backend (Go) Tests

Unit Test Template

package domain_test

import (
    "context"
    "testing"

    "github.com/stretchr/testify/assert"
    "github.com/stretchr/testify/require"
)

func TestFunctionName(t *testing.T) {
    t.Run("success case", func(t *testing.T) {
        // Arrange
        ctx := context.Background()

        // Act
        result, err := FunctionUnderTest(ctx, input)

        // Assert
        require.NoError(t, err)
        assert.Equal(t, expected, result)
    })

    t.Run("error case", func(t *testing.T) {
        // Test error scenarios
    })
}

Run Backend Tests

cd backend && go test ./... -v
cd backend && go test ./... -short  # Skip integration tests

iOS (Swift) Tests

Unit Test Template

import XCTest
@testable import App

final class ComponentTests: XCTestCase {
    var sut: ComponentUnderTest!

    override func setUp() {
        super.setUp()
        sut = ComponentUnderTest()
    }

    override func tearDown() {
        sut = nil
        super.tearDown()
    }

    func testSuccessCase() {
        // Arrange
        let input = ...

        // Act
        let result = sut.method(input)

        // Assert
        XCTAssertEqual(result, expected)
    }
}

Android (Kotlin) Tests

Unit Test Template

import org.junit.Test
import org.junit.Assert.*

class ComponentTest {

    @Test
    fun `success case returns expected result`() {
        // Arrange
        val sut = ComponentUnderTest()

        // Act
        val result = sut.method(input)

        // Assert
        assertEquals(expected, result)
    }
}

Read the full file on GitHub · 147 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 147 lines · 0 tokens per session scan A a8722dde7561

Subscribe to this mod's changes

generate-tests is a command published in the GitHub repository muyen/vibe-to-prod (34 stars, last pushed 6mo ago), licensed MIT. It adds 13 tokens to every session and 693 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-04.