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.
npx agentmods add skills/miniidealab/openlogos/test-writernpx skills add miniidealab/openlogos --skill test-writergit clone --depth 1 https://github.com/miniidealab/openlogosWrote 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/skills/miniidealab/openlogos/test-writer)<a href="https://agentmods.dev/skills/miniidealab/openlogos/test-writer"><img src="https://agentmods.dev/badge/skills/miniidealab/openlogos/test-writer.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.03066 |
| Opus 5 | $0.00000 | $0.01533 |
| Sonnet 5 | $0.00000 | $0.00613 |
| Haiku 4.5 | $0.00000 | $0.00307 |
Grade A, and why
test-writer 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 5d 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 — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: Test Writer
基于时序图、API 规格和 DB 约束,为每个业务场景设计单元测试用例和场景测试用例。适用于所有项目类型(API 服务、CLI 工具、前端应用、库等),是代码生成前的必要前置步骤。
触发条件
- 用户要求设计测试用例或测试方案
- 用户提到 "Phase 3 Step 3"、"Step 3a"、"测试先行"、"测试设计"
- 已有场景时序图,需要在写代码前设计测试
- 用户指定某个场景编号(如 S01)需要设计测试
前置依赖
logos/resources/prd/3-technical-plan/2-scenario-implementation/中包含场景时序图(必需)logos/resources/api/中包含 API 规格(有则读取,无则跳过——非 API 项目可能没有)logos/resources/database/中包含 DB DDL(有则读取,无则跳过)logos/resources/prd/1-product-requirements/中包含需求文档(用于追溯验收条件)
不可跳过:无论项目类型如何,Step 3a(本 Skill)都必须执行。
核心能力
- 从 API 字段约束(类型、格式、长度、枚举)中提取单元测试用例
- 从 DB 约束(UNIQUE、CHECK、NOT NULL、FK)中提取单元测试用例
- 从业务规则和 EX 异常用例中的单点错误处理提取单元测试用例
- 从时序图 Step 序列提取场景测试用例(主路径)
- 从 EX 异常用例提取场景测试用例(异常路径)
- 从 Phase 1/2 验收条件反向校验测试覆盖完整性
执行步骤
Step 1: 加载场景上下文
读取以下文件建立完整上下文:
- 场景时序图(
logos/resources/prd/3-technical-plan/2-scenario-implementation/) - API YAML(
logos/resources/api/)—— 如果存在 - DB DDL(
logos/resources/database/)—— 如果存在 - Phase 1 需求文档(验收条件)
- Phase 2 产品设计文档(交互级验收条件)
确认当前场景的:
- Step 数量:时序图中有多少个 Step
- EX 数量:有多少个异常用例
- API 端点:涉及哪些端点及其字段约束
- DB 表:涉及哪些表及其约束
Step 2: 设计单元测试用例
从三类来源提取单元测试用例:
2a: API 字段约束
逐个检查 API 端点的 requestBody 和 parameters:
type→ 类型错误用例(传入错误类型)format(email、uuid、date-time)→ 格式校验用例minLength/maxLength→ 边界值用例(刚好达到、超出 1 位)required→ 必填缺失用例enum→ 枚举值用例(合法值 + 非法值)minimum/maximum→ 数值范围用例
2b: DB 约束
逐个检查相关表的约束:
UNIQUE→ 重复插入用例NOT NULL→ 空值插入用例CHECK→ 违反检查条件的用例FOREIGN KEY→ 引用不存在记录的用例DEFAULT→ 不传值时默认值验证
2c: 业务规则
从时序图 Step 说明和 EX 异常用例中提取单点业务逻辑:
- 权限检查(未登录、无权限)
- 状态机转换(只有特定状态才能执行操作)
- 限流 / 频控规则
- 数据计算逻辑(金额计算、折扣规则)
每个单元测试用例格式:
| 字段 | 说明 |
|---|---|
| ID | UT-{场景编号}-{序号},如 UT-S01-01 |
| 描述 | 测试什么行为 |
| 来源 | 约束出处(如 auth.yaml → register → email: format:email) |
| 前置条件 | 测试前需要的状态 |
| 输入 | 具体输入值 |
| 预期输出 | 期望的返回值或错误信息 |
Step 3: 设计场景测试用例
从两类来源提取场景测试用例:
3a: 主路径(时序图 Step 序列)
将时序图的完整 Step 1 → Step N 视为一次端到端代码调用链:
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.
- 5d ago First seen · 248 lines · 0 tokens per session scan A d94cf0359075
test-writer is a skill published in the GitHub repository miniidealab/openlogos (71 stars, last pushed 8d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,066 tokens. 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.
Other skills, from other repositories
tdd-workflow
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.
testing
Testing workflow and quality standards for writing and running tests. Use when: (1) Writing new tests, (2) Adding a new feature that needs tests, (3) Modifying logic that has existing tests, (4) Before claiming a task is complete.
testing-patterns
Testing patterns and principles. Unit, integration, mocking strategies.
testing
Writing or debugging tests, choosing unit vs integration style, Postgres/ClickHouse tests, regenerating ClickHouse test schema, or exporting test helpers from packages without pulling test code into production bundles.
detect-flaky-tests
Detects flaky Go tests by analyzing GitHub Actions workflow runs across the last 7 days and all PRs — covering both the run-tests job (unit/integration) and the e2e-test job (gVisor and microVM lanes). For each newly-detected flaky test or infra issue, opens a GitHub issue with full evidence and a draft fix PR. Does…
test-pyramid
Analyze the repo's unit and E2E tests and propose rebalancing toward a test pyramid — which E2E tests (or assertions inside them) can be covered by unit tests, which unit-level gaps genuinely need E2E coverage, and where coverage is duplicated. Use when the user asks about test pyramid, test rebalancing, "should this…