new-test

new-test is a skill for Claude Code from zuoyebang/aiweave. It costs 35 tokens per session (1,080 once invoked), scanned A, original, Apache-2.0.

A skill that creates interface-level test files under test/cases for a specified API endpoint. It uses API documentation and seed data to build test outlines for successful requests and common errors.

In plain words
What is it for?
Use it to generate missing Go tests for implemented API handlers, after checking project status, test design, seed data, and interface documentation.
Why use it?
It fills testing gaps when an endpoint exists but its tests were not created with the implementation.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go build ./cases/{audience}/....

Good fit Use it to generate missing Go tests for implemented API handlers, after checking project status, test design, seed data, and interface documentation.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/zuoyebang/aiweave
agentmods
npx agentmods add skills/zuoyebang/aiweave/new-test

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/zuoyebang/aiweave/new-test.svg)](https://agentmods.dev/skills/zuoyebang/aiweave/new-test)
Your own site
<a href="https://agentmods.dev/skills/zuoyebang/aiweave/new-test"><img src="https://agentmods.dev/badge/skills/zuoyebang/aiweave/new-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,080 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.00035 $0.01080
Opus 5 $0.00017 $0.00540
Sonnet 5 $0.00007 $0.00216
Haiku 4.5 $0.00003 $0.00108

Measured 7d ago against content hash 3476747e83d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

new-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 7d 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.

templates/skills/new-test/SKILL.md · 110 lines

How it starts

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

$ARGUMENTS 生成 test/cases/ 下的接口级测试文件。

公共步骤模板见 skills-spec/01_skill_authoring_guide.md §A-§E。本 Skill 特定内容如下。

职责:补齐遗漏的测试。正常流程下,/new-service / /new-controller 在生成业务代码时就应同步测试。本 Skill 仅在发现某接口代码已有但测试缺失时使用。

第 0 步:拒绝规则与依赖前置

  • ⛔ 拒绝(§A.1):接口路径命中 BUILD_STATUS.md §0 中 🚫 模块时立即拒绝
  • 状态检查(§A.2):读 BUILD_STATUS.md §5 → handler 必须已实现(🟢);未实现 → 停止,提示先 /new-controller
  • 依赖(§A.3):
    • docs/testing/testing_design.md §4 确认框架 API 签名
    • test/fixtures/seed/README.md 熟悉 seed 数据

第 1 步:读取设计文档(公共必读见 §B)

  • 主文档:docs/api/{audience}_interfaces.md
  • 提取:请求参数 / 响应结构 / 校验规则 / 错误码映射

第 2 步:生成测试文件

文件路径:test/cases/{audience}/{module}_{action}_test.go

按 §D 的 4 类用例模板生成(每类至少 1 个 sub test):

package {audience}_test

import (
    "testing"
    "{project}/test/framework"
)

func Test{Action}_Succ(t *testing.T) {
    body := map[string]interface{}{ /* 合法参数 */ }
    resp := framework.{Audience}Post(t, "{path}", {auth}, body)
    framework.AssertSucc(t, resp)
    framework.AssertJSONField(t, resp.{Audience}.Data, "xxx", "expected")
}

func Test{Action}_MissingXxx_Expected{Code}(t *testing.T) {
    body := map[string]interface{}{ /* 缺字段 */ }
    resp := framework.{Audience}Post(t, "{path}", {auth}, body)
    framework.AssertFail(t, resp, {errCode})
}

func Test{Action}_{Module}Disabled_Expected{Code}(t *testing.T) {
    // seed 中状态为禁用的 {核心实体}
    resp := framework.{Audience}Post(t, "{path}", {edge case auth}, body)
    framework.AssertFail(t, resp, {errCode})
}

func Test{Action}_WritesMysqlAndRedis(t *testing.T) {
    resp := framework.{Audience}Post(t, "{path}", {auth}, body)
    framework.AssertSucc(t, resp)
    framework.AssertMysqlExists(t, "{example_db}", "{example_table}", "field = ?", value)
    framework.AssertRedisHashField(t, "{ns}:info:"+entityId, "status", "1")
}

第 3 步:接入 TestMain

每个 cases/{audience}/ 子包应有 common_test.go 提供 TestMain。新增测试文件不重复写。如是新路由组的第一个文件,先创建:

package {audience}_test

import (
    "os"
    "testing"
    "{project}/test/framework"
)

func TestMain(m *testing.M) {
    code := framework.RunTests(m)
    os.Exit(code)
}

Read the full file on GitHub · 110 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. 7d ago First seen · 110 lines · 35 tokens per session scan A 3476747e83d8

Subscribe to this mod's changes

new-test is a skill published in the GitHub repository zuoyebang/aiweave (20 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 35 tokens to every session and 1,080 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-30.

Related

Other skills, from other repositories

ai-feature-eval-harness

Design an evaluation plan for a product AI feature (LLM- or model-backed output): measurable success criteria, a held-out labeled eval dataset shape, per-criterion grading (code-based first, then LLM-based for nuanced judgment), and a pass threshold, then persist as AIEVALPLAN.md. Use when the task ships or changes a…

Mozurok/fhorja.dev · 205 tokens

api-runtime-verify

Verify an implemented backend HTTP surface at runtime: per route, record the request actually made, the HTTP status, the response content-type, and the observed body shape, assert each response against the slice's acceptance behavior, classify the findings, and decide a PASS/FAIL/BLOCKED runtime gate. The probe's real…

Mozurok/fhorja.dev · 216 tokens

app-runtime-verify

Verify a built mobile or app runtime at runtime: run the app (device, emulator, or headless), read the captured runtime output (native logcat, iOS device log, or the Metro/JS console), classify any runtime errors against a per-stack taxonomy, and decide a PASS/FAIL runtime gate for the slice's acceptance behavior. The…

Mozurok/fhorja.dev · 227 tokens

test-strategy

Define the smallest set of meaningful tests that protects behavior and reduces regression risk for the active task, then persist as TESTSTRATEGY.md plus a TASKSTATE.md update. Avoids forcing a strategy artifact when it adds no material signal. Detects a Godot or Unity target and routes to the matching headless runner…

Mozurok/fhorja.dev · 193 tokens

web-runtime-verify

Verify a built web or static frontend at runtime: serve the build on an ephemeral free port, assert page identity FIRST (automatic recovery on a collision or stale server), run the web battery (overflow 320 to 2560, keyboard and focus, console errors, Lighthouse and axe when available), and decide a PASS/FAIL/BLOCKED…

Mozurok/fhorja.dev · 229 tokens

post-deploy-verifier

Senior reliability engineer producing a per-slice post-deploy verification plan mapping each acceptance criterion to a concrete live signal (exact log query, dashboard panel, smoke-test walkthrough, flag check, DB invariant query) plus negative checks and rollback trigger checklist. Activates when TASKSTATE.md ##…

Mozurok/fhorja.dev · 209 tokens