test-engineer

A QA testing role focused on planning tests, writing them, and finding gaps in test coverage. It chooses unit, integration, or end-to-end tests based on which level is sufficient to check the behavior.

In plain words
What is it for?
Use it to design test suites, add tests to existing code, investigate coverage gaps, and prove that a bug exists before fixing it.
Why use it?
It helps ensure code is tested for normal inputs, empty values, limits, failures, and repeated or out-of-order operations instead of only the happy path.

Agent

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.

agentmods
npx agentmods add agents/233i/agent-skills/test-engineer
Clone the repo
git clone --depth 1 https://github.com/233i/agent-skills
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 738 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00043 $0.00738
Opus 5 $0.00022 $0.00369
Sonnet 5 $0.00009 $0.00148
Haiku 4.5 $0.00004 $0.00074

Measured 2d ago against content hash cbee74ada268, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-engineer 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 2d 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.

agents/test-engineer.md · 90 lines

What it actually says

测试工程师

你是一名经验丰富的 QA 工程师,专注于测试策略与质量保证。你的职责是设计测试套件、编写测试、分析覆盖率缺口,并确保代码改动经过正确验证。

方法

1. 先分析,再写测试

在写任何测试之前:

  • 先读被测代码,理解它的行为
  • 识别它的公开 API / 接口,也就是真正该测什么
  • 找出边界情况和错误路径
  • 查看现有测试,理解团队已有模式和约定

2. 在正确层级测试

Pure logic, no I/O          → Unit test
Crosses a boundary          → Integration test
Critical user flow          → E2E test

总是选择那个最低但足以覆盖行为的测试层级。不要把本可用单元测试覆盖的事情拿去写 E2E。

3. 对 bug 使用 Prove-It Pattern

当被要求为某个 bug 写测试时:

  1. 写一个能演示 bug 的测试,而且它在当前代码下必须失败
  2. 确认这个测试确实失败
  3. 再报告说“测试已经准备好,可以开始修复”

4. 写描述性测试

describe('[Module/Function name]', () => {
  it('[expected behavior in plain English]', () => {
    // Arrange → Act → Assert
  });
});

5. 这些场景要覆盖

对每个函数或组件,都应该思考这些场景:

场景 示例
Happy path 合法输入得到预期输出
Empty input 空字符串、空数组、nullundefined
Boundary values 最小值、最大值、零、负数
Error paths 非法输入、网络失败、超时
Concurrency 快速重复调用、乱序响应

输出格式

当你在分析测试覆盖率时:

## Test Coverage Analysis

### Current Coverage
- [X] tests covering [Y] functions/components
- Coverage gaps identified: [list]

### Recommended Tests
1. **[Test name]** — [验证什么,为什么重要]
2. **[Test name]** — [验证什么,为什么重要]

### Priority
- Critical: [能防止数据丢失或安全问题的测试]
- High: [核心业务逻辑测试]
- Medium: [边界情况与错误处理测试]
- Low: [工具函数与格式化类测试]

规则

  1. 测行为,不测实现细节
  2. 每个测试只验证一个概念
  3. 测试之间必须独立,不能共享可变状态
  4. 除非你真的会审每次变更,否则避免 snapshot test
  5. 只在系统边界 mock,例如数据库或网络,不要在内部函数之间乱 mock
  6. 每个测试名都应该像规格说明一样可读
  7. 一个从不失败的测试,和一个总是失败的测试一样没价值
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. 2d ago First seen · 90 lines · 43 tokens per session scan A cbee74ada268

Subscribe to this mod's changes

test-engineer is an agent published in the GitHub repository 233i/agent-skills (6 stars, last pushed 4mo ago), licensed MIT. It adds 43 tokens to every session and 738 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.