TDD Workflow
hellangleZ/burn-in-cceverywhere-ralph
A skill your agent uses when writing new features, fixing bugs, or refactoring code.
Use before writing, adding, or modifying any unit test in this repo — before creating a Test.kt file or a @Test function, and before touching an existing test after a refactor.
$ npx skills add niki914/zafiro --skill test-triage -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install niki914/zafiro test-triage --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/niki914/zafiro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/test-triage .claude/skills/test-triage && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "test-triage" agent skill from https://github.com/niki914/zafiro/tree/main/.agents/skills/test-triage into .claude/skills/test-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-triage", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/niki914/zafiro/tree/main/.agents/skills/test-triageType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add niki914/zafiro --skill test-triage -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install niki914/zafiro test-triage --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/niki914/zafiro.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/test-triage .agents/skills/test-triage && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "test-triage" agent skill from https://github.com/niki914/zafiro/tree/main/.agents/skills/test-triage into .agents/skills/test-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-triage", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add niki914/zafiro --skill test-triage -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install niki914/zafiro test-triage --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/niki914/zafiro.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/test-triage .cursor/skills/test-triage && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "test-triage" agent skill from https://github.com/niki914/zafiro/tree/main/.agents/skills/test-triage into .cursor/skills/test-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-triage", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/niki914/zafiro.git --path .agents/skills/test-triage--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add niki914/zafiro --skill test-triage -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install niki914/zafiro test-triage --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/niki914/zafiro.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/test-triage .gemini/skills/test-triage && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "test-triage" agent skill from https://github.com/niki914/zafiro/tree/main/.agents/skills/test-triage into .gemini/skills/test-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-triage", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install niki914/zafiro test-triageInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add niki914/zafiro --skill test-triage -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/niki914/zafiro.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/test-triage .github/skills/test-triage && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "test-triage" agent skill from https://github.com/niki914/zafiro/tree/main/.agents/skills/test-triage into .github/skills/test-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-triage", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add niki914/zafiro --skill test-triage -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install niki914/zafiro test-triage --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/niki914/zafiro.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/test-triage .opencode/skills/test-triage && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "test-triage" agent skill from https://github.com/niki914/zafiro/tree/main/.agents/skills/test-triage into .opencode/skills/test-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-triage", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
test-triageUse before writing, adding, or modifying any unit test in this repo — before creating a Test.kt file or a @Test function, and before touching an existing test after a refactor.
Test Triage is an agent skill from niki914/zafiro. Use before writing, adding, or modifying any unit test in this repo — before creating a Test.kt file or a @Test function, and before touching an existing test after a refactor. Triages whether the test should exist at all, and what must happen to it when the code it guards changes.
Its SKILL.md is about 940 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Unit testing. The repository describes itself as: Open-source BYOK AI agent for Android. Full phone control, native Shell & Python 3, with Skills and MCP support. Built with Material 3 Expressive. Works via Shizuku (root… The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 6c7f775. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Test Triage loads about 935 tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 199 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from niki914/zafiro at commit 6c7f775, republished under its MIT licence (© niki914). 199 words, ~935 tokens.
.claude/skills/test-triage/SKILL.md (or your agent's skills folder).写测试前先分诊:这个测试该不该存在。通过了才谈怎么写。
一个测试的全部价值来自它的拦截力——删掉它,哪个真实 bug 会漏到用户手上?答不上来的测试拦截力为零:不要写,已经写了的删掉。
测试膨胀的根源不是测试写得不好,是没经过分诊就写下去了。
动手写 @Test 之前,先回答一句话:
删掉这个测试,哪一个真实发生过、或真实可能发生的改动,会让 bug 漏出去?
答案必须是一个具体的改动:谁改什么、怎么改坏、漏出去之后用户看到什么。答得出来 → 往下写;指不出来 → 不写。
"我想确认它是对的"不是答案。那是静态分析、类型系统、编译器的工作。
动任何一个已存在的 @Test 之前,拿同一句话再问它一遍,另外加一句:
如果这个测试今天要我从零写一遍,我还会写吗?
不会 → 删掉它,而不是改两行让它继续绿。
改测试只有两种正当理由:被测契约变了(该重写),或测试本身有缺陷(该重写)。"让它变绿"不是理由。
不需要判断,也不需要"至少测一下"。
| 被测对象 | 为什么拦不住 bug | 处置 |
|---|---|---|
data class 的字段、copy()、equals/toString | 编译器已经保证 | 不写 |
| 常量、枚举成员、默认参数值 | 编译器已经保证 | 不写 |
| getter / setter / 纯委托的转发方法 | 没有分叉点 | 不写 |
| private 辅助方法的单独测试 | 通过 public 行为间接覆盖 | 不写 |
| 资源字符串、文案、提示语的措辞 | 文案不是行为 | 不写 |
| 日志有没有打、打成什么 | 不是行为 | 不写 |
| ServiceRegistry 装配、DI 注册、构造注入 | 装配错了启动就崩,不用断言 | 不写 |
| 断言某字段"以后仍然是 null / 仍然不会被赋值" | 拦的是一个尚不存在的变化 | 不写 |
| 断言某个已删除 / 遗留的东西不存在 | 拦的是过去的影子 | 不写 |
| 另一个测试已经完整覆盖的同一契约 | 两个测试守一个契约 = 只有一个 | 不写,删重复的那个 |
行为会分叉,而分叉点在静态分析里看不出来——这才是值得写的。
| 形态 | 为什么值得 |
|---|---|
| 状态机迁移,含非法迁移与出错后停在哪 | 迁移关系不在类型里 |
if / when 的条件分支、边界值、空集合、超长输入 | 分支覆盖不可静态推导 |
| 解析、序列化、编解码的畸形输入 | 真实数据会超出预期 |
| 权限、降级、兜底、重试路径 | 出错路径最容易写坏 |
| 并发、取消、顺序、重复调用的既定契约 | 时序不可静态推导 |
| 曾经真实回归过的点 | 已证实的拦截力,最高优先 |
| ViewModel / Reducer 的状态计算 | 是逻辑,不是渲染 |
不给 UI 写测试。 渲染、布局、点击、滚动、主题、动画、文案换行——这些都是 UI,由人工和 QA 验证,不写 @Test。这条不开放讨论。
要测的是 UI 背后的状态机:ViewModel / Reducer / Controller 里那段"输入什么、状态变成什么"的纯计算。它和 Compose 无关,只是恰好被 UI 调用。
一个测试里如果出现了 Compose 的 @Composable、createComposeRule、semantics、onNodeWithText——放错地方了,删掉。
四类都归零,原因各不相同。给它们起了名字,方便在提交和评审里直接点名。
构造一个对象,再断言它等于自己刚塞进去的值。
val model = ToolSpec(name = "a", enabled = true)
assertEquals("a", model.name)它拦的是字段改名导致的编译错误——而编译错误不需要断言兜着。唯一能让它变红的方式是改坏赋值,那时候编译器先红。
断言某个 message 等于一句写死的文案。
assertEquals("接口返回为空", error.message)文案不是行为:它进资源、换措辞、做本地化,测试就为一个字而碎,与功能正确性无关。
区分它和真测试:assertEquals("Does one thing.", metadata.description) 测的是解析器的输出,那是真行为。区别不在写法,在门禁那一问的答案。
断言某个已经删掉或遗留的东西不存在。
assertNull(tool.ssh_terminal) // 这个字段早就没了它钉的是过去的影子。功能早已不在代码里,拦不住任何东西。
断言"某字段以后仍然是 null"(拦一个尚不存在的变化),或整段复制另一个测试已经覆盖的契约。
@Test fun spec_nonButtonTokensRemainUnsetForNow() { ... }带 ForNow、NotYet、RemainsUnset、ForFuture 这类名字的测试,默认按这一类处理。
触发条件:你重命名、拆分、合并、替换了某个类或方法的职责;移除了一个旧方法或旧字段;或者你判定这段被测代码本身就是要被替换掉的遗留代码。
这时它对应的单测必须重写或删除,只有这两种处置。三条硬规则,按顺序判断:
同时清理这些"为了让旧测试活着"的痕迹:
@Deprecated 转发重构不是改测试的理由,是删测试的理由。
// 保护:<哪个行为,什么输入会打破它>。
写不出这一行,说明门禁没过,回去重判。rejectsBlankEndpoint 好过 testValidate1。@Test 回答一个问题。一个测试里断言五个互不相关的点,红了以后没人知道是哪坏了。@Test 里,基本可以确定它该被拆开。收工前逐条过一遍,任何一条不成立就不算完成:
@Test,我都能立刻说出门禁那一问的答案// 保护:... 那一行@Deprecated 转发© niki914, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/test-triage of niki914/zafiro.
Open the folder on GitHubat commit 6c7f775
Test Triage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Test Triage this skillniki914/zafiro | 235 | — | ~935 | Automated safety check: Pass | MIT | |
| TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph | 112 | 11 repos | ~2.4k | Automated safety check: Pass | None | |
| Testing OpenLogi UIAprilNEA/OpenLogi | 23k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Go Testingcxuu/golang-skills | 173 | 1 repos | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Contractssamchon/nestia | 2.2k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Cohesion Over TestabilityEpicenterHQ/epicenter | 4.8k | — | ~2k | Automated safety check: Pass | Custom licence |
hellangleZ/burn-in-cceverywhere-ralph
A skill your agent uses when writing new features, fixing bugs, or refactoring code.
AprilNEA/OpenLogi
Verifies OpenLogi's native GPUI interface with focused tests, the component gallery and a mock agent, choosing the evidence that fits each change.
cxuu/golang-skills
A skill your agent uses when writing, reviewing, or improving Go test code — including table-driven tests, subtests, parallel tests, test helpers, test doubles, and assertions with cmp.Diff.
samchon/nestia
Defines self-acknowledgments for production declarations and tests.
EpicenterHQ/epicenter
Collapse test-shaped production boundaries while preserving behavior and coverage.
liaohch3/claude-tap
Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.
niki914/zafiro
A skill your agent uses when editing source files (Java/Kotlin/XML/layout/AndroidManifest/Gradle) in a Android project, or when user asks to build/deploy/verify an Android app.
niki914/zafiro
A skill your agent uses when the user wants to release a new Zafiro version — drafting bilingual release notes, deciding the next version number, bumping app/build.gradle.kts, tagging, and…
niki914/zafiro
A skill your agent uses when the user wants to start work in a new git worktree — "new worktree", "spin up a worktree/branch for this", "work on X in another worktree", "branch this off".
niki914/zafiro
Install a skill from a public GitHub repository onto this device.
niki914/zafiro
Create new skills, modify and improve existing skills, and measure skill performance.
niki914/zafiro
Load this skill for anything involving Termux (com.termux) — first-time SSH setup, connecting to Termux, or a Termux connection that stopped working.
Categories
Use before writing, adding, or modifying any unit test in this repo — before creating a Test.kt file or a @Test function, and before touching an existing test after a refactor. Test Triage is an agent skill from niki914/zafiro.kt file or a @Test function, and before touching an existing test after a refactor.
Test Triage fits situations like: tasks that involve Unit testing.
Run `npx skills add niki914/zafiro --skill test-triage -a claude-code`. Or copy the skill folder (.agents/skills/test-triage in niki914/zafiro) into .claude/skills/test-triage in your project. Claude Code loads it when a task matches its description.
Run `npx skills add niki914/zafiro --skill test-triage -a codex`. Or copy the skill folder (.agents/skills/test-triage in niki914/zafiro) into .agents/skills/test-triage in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add niki914/zafiro --skill test-triage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-triage, .gemini/skills/test-triage, .github/skills/test-triage and .opencode/skills/test-triage in your project.
SKILL.md names no scripts, command-line tools or credentials: Test Triage is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Test Triage is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 935 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Test Triage: TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars), Testing OpenLogi UI (AprilNEA/OpenLogi, 23k stars), Go Testing (cxuu/golang-skills, 173 stars) and Contracts (samchon/nestia, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
niki914 (a GitHub user) maintains it in niki914/zafiro, which has 235 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 9, 2026.
Source: niki914/zafiro on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.