go-hichat-api: Skill for Claude Code

.claude/skills/tdd/SKILL.md

tdd is a skill for Claude Code from iceymoss/go-hichat-api. It costs 33 tokens per session (358 once invoked), scanned A, original, Apache-2.0.

A strict test-driven development workflow. Test-driven development, or TDD, means writing a test for the expected behavior before writing the code that makes it pass.

In plain words
What is it for?
Use it to write a failing test, implement just enough code to pass it, refactor while keeping tests green, and commit each red-green-refactor cycle.
Why use it?
It catches unclear requirements early and keeps each change focused on a tested behavior. The workflow requires a failing test first, then the smallest implementation, followed by safe cleanup.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is iceymoss/go-hichat-api's own configuration. It tells Claude Code how to work on go-hichat-api itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything go-hichat-api configures →

Reuse

Borrowing it

Nothing to install: this file belongs to iceymoss/go-hichat-api. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/iceymoss/go-hichat-api/main/.claude/skills/tdd/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/iceymoss/go-hichat-api

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 tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/iceymoss/go-hichat-api/tdd.svg)](https://agentmods.dev/skills/iceymoss/go-hichat-api/tdd)
Your own site
<a href="https://agentmods.dev/skills/iceymoss/go-hichat-api/tdd"><img src="https://agentmods.dev/badge/skills/iceymoss/go-hichat-api/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 358 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.00033 $0.00358
Opus 5 $0.00016 $0.00179
Sonnet 5 $0.00007 $0.00072
Haiku 4.5 $0.00003 $0.00036

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

Security

Grade A, and why

tdd 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.

.claude/skills/tdd/SKILL.md · 37 lines

What it actually says

严格测试驱动开发。按 RED -> GREEN -> REFACTOR 循环,禁止先写实现再补测试。

流程

1. RED — 先写失败的测试

  • 根据需求写一个测试,运行确认它失败
  • 测试必须明确断言预期行为
  • 如果测试直接通过了,说明测试写得不对,重写

2. GREEN — 写最少的代码让测试通过

  • 只写刚好让测试通过的实现,不要多写
  • 运行 go test ./... 确认通过
  • 不要在这一步优化或重构

3. REFACTOR — 重构(测试必须保持通过)

  • 消除重复,改善命名,简化逻辑
  • 每次重构后立即跑测试
  • 测试不通过就回退

4. COMMIT — 提交这个循环

  • 一个 RED-GREEN-REFACTOR 循环 = 一个 commit
  • commit message 说明这个循环实现了什么行为

规则

  • 绝对不能先写实现再补测试
  • 每个循环只关注一个行为
  • 测试命名: Test_功能_场景_预期结果
  • 使用 table-driven tests 组织多个用例
  • 遵守 CLAUDE.md 的所有规则(三数据库兼容、common.Marshal 等)
  • 前端测试参考现有测试模式
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 · 37 lines · 33 tokens per session scan A da31c7a592f7

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository iceymoss/go-hichat-api (41 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 33 tokens to every session and 358 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.