vibe-test

vibe-test is a skill for Claude Code from xushuodasd/VIBE-Claude-Plugin. It costs 48 tokens per session (3,197 once invoked), scanned A, original, MIT.

A testing workflow that follows TDD, or test-driven development: write a test that fails, add the smallest code needed to pass it, then clean up the code. It produces tests and a test report.

In plain words
What is it for?
Use it when adding unit or integration tests, checking system behavior, and enforcing a test-first development process.
Why use it?
It catches incorrect behavior early and verifies that tests can detect a problem before the implementation is written.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the vibe-claude-plugin plugin — 25 skills, 1 command shipped together

Good fit Use it when adding unit or integration tests, checking system behavior, and enforcing a test-first development process.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xushuodasd/vibe-claude-plugin/vibe-test
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.

Any agent
npx skills add xushuodasd/VIBE-Claude-Plugin --skill vibe-test
Clone the repo
git clone --depth 1 https://github.com/xushuodasd/VIBE-Claude-Plugin

Made for: Claude Code.

Or install vibe-claude-plugin, the plugin that ships this one along with the rest of its 25 skills, 1 command.

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 vibe-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/xushuodasd/vibe-claude-plugin/vibe-test/github.svg)](https://agentmods.dev/skills/xushuodasd/vibe-claude-plugin/vibe-test)
Your own site
<a href="https://agentmods.dev/skills/xushuodasd/vibe-claude-plugin/vibe-test"><img src="https://agentmods.dev/badge/skills/xushuodasd/vibe-claude-plugin/vibe-test/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 vibe-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/xushuodasd/vibe-claude-plugin/vibe-test"><img src="https://agentmods.dev/badge/skills/xushuodasd/vibe-claude-plugin/vibe-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,197 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.00048 $0.03197
Opus 5 $0.00024 $0.01598
Sonnet 5 $0.00010 $0.00639
Haiku 4.5 $0.00005 $0.00320

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

Security

Grade A, and why

vibe-test 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 10d 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.

skills/vibe-test/SKILL.md · 283 lines

How it starts

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

测试工作流 (Quality Gate)

0. 身份强制声明 (Persona Injection)

【警告】当你进入此工作流时,你不再是一个"自由发挥"的开发者! 你现在的身份是:高级测试工程师 (QA Engineer)你的唯一职责是:通过 RED-GREEN-REFACTOR 三色法则,先把测试写出来让它失败(RED),再让代码最少可通过(GREEN),最后清理(REFACTOR)。禁止先写业务代码再补测试——这叫"测试掩护",不是 TDD。

1. 文档目的

为 VIBE 全自动开发流水线提供"质量门禁 (Quality Gate)",确保每一个最小模块在进入下一阶段(安全审查/UI 美化)之前,都经过严格的 TDD 验证。同时与 vibe-autopilot 的"事不过三熔断器"打通,防止在死循环里浪费 API 余额。

2. 工作流结构

  • 前置步骤:识别技术栈 → 选择测试框架 → 读取待测模块与 API 契约
  • 执行步骤:RED → Verify-RED → GREEN → Verify-GREEN → REFACTOR
  • 熔断机制:单个测试连续失败 ≥3 次 → 自动标记 [Blocked] 并跳出
  • 输出成果:测试文件 + 测试报告 + tasks.md 打勾

3. 核心法则 (The Iron Law)

🚫 NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

违反这条法则 = 违反 TDD 的精神。 哪怕你"已经知道答案",也要先把期望行为写成会失败的测试。

反直觉但正确

  • 测试先写、让它失败——是为了证明这个测试"真的能抓 bug"
  • 测试通过才是"它有效"的证明
  • 写了就通过的测试 = 在测"已经存在的行为",等于没测

4. 技术栈识别与框架选择

4.1 自动识别

读取 ./package.json./requirements.txt./go.mod 等依赖文件,按下表自动选择:

技术栈 默认测试框架 配置文件
Node.js (TypeScript) Vitest(优先)或 Jest vitest.config.ts / jest.config.js
Python pytest pytest.ini / pyproject.toml [tool.pytest]
Go 标准库 testing + testify 文件内 *_test.go
Java/Kotlin JUnit 5 pom.xml / build.gradle

4.2 配置模板(Vitest 范例)

// vitest.config.ts
import { defineConfig } from 'vitest/config'
export default defineConfig({
  test: {
    globals: true,           // 不用 import { describe, it, expect }
    environment: 'jsdom',     // 测试 React/Vue 组件需要
    coverage: {
      provider: 'v8',
      reporter: ['text', 'html', 'lcov'],
      thresholds: { lines: 80, functions: 80, branches: 75, statements: 80 }
    },
    include: ['**/*.{test,spec}.{js,ts,jsx,tsx}'],
    bail: 1                   // 第一次失败就停(配合 Circuit Breaker)
  }
})

5. RED-GREEN-REFACTOR 三色循环

digraph tdd_cycle {
    rankdir=LR;
    red [label="🔴 RED\n写失败的测试", shape=box, style=filled, fillcolor="#ffcccc"];
    v_red [label="✅ 验证失败\n原因正确?", shape=diamond];
    green [label="🟢 GREEN\n最少代码使通过", shape=box, style=filled, fillcolor="#ccffcc"];
    v_green [label="✅ 全绿?", shape=diamond];
    refactor [label="🔵 REFACTOR\n清理不增行为", shape=box, style=filled, fillcolor="#ccccff"];
    cb [label="熔断:连续失败3次?", shape=diamond, style=filled, fillcolor="#ffe0b3"];
    block [label="标记 [Blocked]\n跳到下一个任务", shape=ellipse, style=filled, fillcolor="#ffaaaa"];

    red -> v_red;
    v_red -> green [label="是"];
    v_red -> red [label="否(错误写法)"];
    green -> v_green;
    v_green -> refactor [label="是"];
    v_green -> cb [label="否"];
    cb -> red [label="否(计数<3)"];
    cb -> block [label="是"];
    refactor -> v_green [label="保持绿"];
}

Read the full file on GitHub · 283 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. 10d ago First seen · 283 lines · 48 tokens per session scan A 874cd4017fbf

Subscribe to this mod's changes

vibe-test is a skill published in the GitHub repository xushuodasd/VIBE-Claude-Plugin (4 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 3,197 once invoked, about $0.0002 per session on Opus 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-08-31.