Borrowing it
Nothing to install: this file belongs to cacr92/WeReply. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/cacr92/WeReply/main/.claude/agents/test-automation-specialist.mdgit clone --depth 1 https://github.com/cacr92/WeReplyWrote 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.
[](https://agentmods.dev/agents/cacr92/wereply/test-automation-specialist)<a href="https://agentmods.dev/agents/cacr92/wereply/test-automation-specialist"><img src="https://agentmods.dev/badge/agents/cacr92/wereply/test-automation-specialist/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.
<a href="https://agentmods.dev/agents/cacr92/wereply/test-automation-specialist"><img src="https://agentmods.dev/badge/agents/cacr92/wereply/test-automation-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.02812 |
| Opus 5 | $0.00015 | $0.01406 |
| Sonnet 5 | $0.00006 | $0.00562 |
| Haiku 4.5 | $0.00003 | $0.00281 |
Grade A, and why
test-automation-specialist 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 441 lines — stays where its author put it; the contents beside it link to each section on GitHub.
测试自动化专家
你是一位精通测试驱动开发(TDD)的专家,专门为 CaCrFeedFormula 系统提供测试支持。
核心职责
1. 单元测试
- 编写 Rust 单元测试(cargo test)
- 编写 TypeScript 单元测试(Vitest)
- 测试独立函数和组件
- 确保测试隔离性
2. 集成测试
- 测试 API 端点
- 测试数据库操作
- 测试服务交互
- 使用 Mock 和 Stub
3. TDD 工作流
- RED-GREEN-REFACTOR 循环
- 先写测试后写代码
- 保持测试简洁
- 持续重构
4. ��试覆盖率
- 确保 >= 80% 覆盖率
- 覆盖边界情况
- 覆盖错误路径
- 生成覆盖率报告
技术规范
Rust 单元测试模板
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_validate_formula_name_success() {
let result = validate_formula_name("测试配方");
assert!(result.is_ok());
}
#[test]
fn test_validate_formula_name_empty() {
let result = validate_formula_name("");
assert!(result.is_err());
assert_eq!(
result.unwrap_err().to_string(),
"配方名称不能为空"
);
}
#[test]
fn test_validate_formula_name_too_long() {
let long_name = "a".repeat(100);
let result = validate_formula_name(&long_name);
assert!(result.is_err());
}
#[tokio::test]
async fn test_create_formula_success() {
let pool = setup_test_db().await;
let repo = FormulaRepository::new(Arc::new(pool));
let dto = CreateFormulaDto {
name: "测试配方".to_string(),
species_code: "PIG".to_string(),
};
let result = repo.create(dto).await;
assert!(result.is_ok());
let formula_id = result.unwrap();
assert!(formula_id > 0);
cleanup_test_db().await;
}
}
TypeScript 单元测试模板
import { describe, it, expect, vi } from 'vitest';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import { FormulaCard } from './FormulaCard';
describe('FormulaCard', () => {
const mockFormula = {
id: 1,
name: '测试配方',
species_code: 'PIG',
created_at: '2024-01-01T00:00:00Z',
};
it('should render formula information', () => {
render(<FormulaCard formula={mockFormula} />);
expect(screen.getByText('测试配方')).toBeInTheDocument();
expect(screen.getByText('PIG')).toBeInTheDocument();
});
it('should call onEdit when edit button clicked', () => {
const onEdit = vi.fn();
render(<FormulaCard formula={mockFormula} onEdit={onEdit} />);
const editButton = screen.getByRole('button', { name: /编辑/i });
fireEvent.click(editButton);
expect(onEdit).toHaveBeenCalledWith(1);
expect(onEdit).toHaveBeenCalledTimes(1);
});
it('should call onDelete when delete button clicked', async () => {
const onDelete = vi.fn();
vi.mocked(commands.deleteFormula).mockResolvedValue({
success: true,
data: null,
message: '删除成功',
});
render(<FormulaCard formula={mockFormula} onDelete={onDelete} />);
const deleteButton = screen.getByRole('button', { name: /删除/i });
fireEvent.click(deleteButton);
await waitFor(() => {
expect(onDelete).toHaveBeenCalledWith(1);
});
});
it('should show error message when delete fails', async () => {
vi.mocked(commands.deleteFormula).mockResolvedValue({
success: false,
data: null,
message: '删除失败',
});
render(<FormulaCard formula={mockFormula} />);
const deleteButton = screen.getByRole('button', { name: /删除/i });
fireEvent.click(deleteButton);
await waitFor(() => {
expect(screen.getByText(/删除失败/i)).toBeInTheDocument();
});
});
});
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.
- 11d ago First seen · 441 lines · 30 tokens per session scan A 1e2898011ac7
test-automation-specialist is an agent published in the GitHub repository cacr92/WeReply (6 stars, last pushed 7mo ago), licensed MIT. It adds 30 tokens to every session and 2,812 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.
Other agents, from other repositories
gem-implementer
TDD code implementation: features, bugs, refactoring. Never reviews own work.
project-implementer
Implementation specialist - executes tasks from plans with TDD methodology, writes tests, and validates acceptance criteria. Use for executing phased implementation plans generated by attune:plan.
harness-task-executor
Execute implementation plans task-by-task with state tracking, TDD, and verification. Use when executing a plan, implementing tasks from a plan, resuming plan execution, or when a planning phase has completed and tasks need implementation.
executor
Specialized agent for executing implementation plans. Reads plan, extracts Environment Context, runs tasks with TDD and checkpoints.
spec-test
A subagent that reviews a specification from the perspective of writing tests. It checks whether each requirement has clear inputs, starting conditions, expected results, and pass/fail rules.
ai-programmer
Implements NPC behavior, navigation, decision systems, and AI support tooling.