Agent skill

Workflow Test Generation

by davidYichengWei in davidYichengWei/agentic-engineering-framework

测试生成。基于 spec.md 或被测代码,生成单元测试、集成测试、性能测试。当用户请求生成测试、TDD 模式、或 workflow-code-generation 完成后触发。

MITAuto-check passedTesting & QA

Install Workflow Test Generation

skills CLI
$ npx skills add davidYichengWei/agentic-engineering-framework --skill workflow-test-generation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davidYichengWei/agentic-engineering-framework workflow-test-generation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-framework.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/workflow-test-generation .claude/skills/workflow-test-generation && rm -rf skills-src

Use ~/.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/

Facts

Skill name
workflow-test-generation
GitHub stars
158
Token cost
~580 tokens
SKILL.md length
171 words
Files
2
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

测试生成。基于 spec.md 或被测代码,生成单元测试、集成测试、性能测试。当用户请求生成测试、TDD 模式、或 workflow-code-generation 完成后触发。

  • Works in 6 steps: 意图识别与路径路由 → 收集测试上下文 → 确定测试类型 → …
  • Tasks that involve Test generation
  • SKILL.md covers Step 0: 意图识别与路径路由, Step 1: 收集测试上下文, Step 2: 确定测试类型 and Step 3: 制定测试计划, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Workflow Test Generation is an agent skill from davidYichengWei/agentic-engineering-framework. 测试生成。基于 spec.md 或被测代码,生成单元测试、集成测试、性能测试。当用户请求生成测试、TDD 模式、或 workflow-code-generation 完成后触发。

Its SKILL.md is about 580 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `reference/boundary-checklist.md`).

It sits in Testing & QA, covering Test generation and Test-driven development. The repository describes itself as: 开箱即用、可按项目定制的 AI Coding Agent Skills 框架:提供通用 Workflow、可扩展的项目私有知识、自我学习闭环和问题排查能力,适配任意技术栈和工程场景。兼容主流 Coding Agent。 The licence is MIT.

When your agent uses it

  • Tasks that involve Test generation
  • Tasks that involve Test-driven development

Example prompts

  • “/workflow-test-generation”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. 意图识别与路径路由
  2. 收集测试上下文
  3. 确定测试类型
  4. 制定测试计划
  5. 逐个生成测试
  6. 收尾流程

What it can do on your machine

Read from SKILL.md and the folder at commit 1f7ac0f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Workflow Test Generation loads about 580 tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 171 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~580

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from davidYichengWei/agentic-engineering-framework at commit 1f7ac0f, republished under its MIT licence (© davidYichengWei). 171 words, ~580 tokens.

Download SKILL.mdSave it as .claude/skills/workflow-test-generation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
workflow-test-generation
description
测试生成。基于 spec.md 或被测代码,生成单元测试、集成测试、性能测试。当用户请求生成测试、TDD 模式、或 workflow-code-generation 完成后触发。

测试生成

Step 0: 意图识别与路径路由

根据调用上下文判断走哪条路径:

信号路径执行步骤
由 workflow-code-generation 完成后衔接进入,或用户明确提到需求管理链接完整流程Step 1 → 2 → 3 → 4 → 5
用户直接说"给 X 写个测试"/"补个单测",指定了具体代码快速补测试Step 2 → 3 → 4
由 workflow-system-design 讨论测试计划章节时加载测试策略设计Step 1 → 2 → 3,只输出计划,不生成代码

如果无法判断,默认走完整流程。


Step 1: 收集测试上下文

完整流程和测试策略设计执行本步骤。快速补测试跳过(用户已指定了被测代码)。

尝试读取 docs/design-docs/<module>/<feature>/spec.md:

有 spec.md:

  1. 读取 "7. 测试计划"
  2. 测试计划明确 → 进入 Step 2
  3. 测试计划不完整 → 补充读取 "2. 目标"、"3. 需求"、"4. 设计方案",自行判断

无 spec.md(为已有代码补测试):

  • 询问用户要测哪些函数/类,基于代码生成

Step 2: 确定测试类型

根据代码特征自动判断需要哪些测试类型(可组合,非互斥),无法判断时才询问:

特征测试类型
纯函数、无外部依赖单元测试
端到端流程、多组件交互集成测试
spec.md 有性能指标要求性能测试

一个 feature 通常需要多种测试类型组合,例如:核心逻辑用单元测试 + 端到端用集成测试。

Step 3: 制定测试计划

分析被测代码,制定测试计划(不生成代码):

  1. 读取被测代码,识别公共接口、输入/输出、副作用、需要 mock 的依赖
  2. 读取 reference/boundary-checklist.md,选择适用的边界条件
  3. 根据项目需要,读取对应模块的测试参考文档(如有)
  4. 为每个测试目标列出:正常路径、边界条件、异常场景的具体测试点

创建测试任务清单,与用户确认后再继续:

示例:
1. [pending] UnitTest - FooClass::Bar() 正常路径 + 边界条件
2. [pending] UnitTest - FooClass::Bar() 异常处理
3. [pending] IntegrationTest - 端到端流程

测试策略设计路径到此结束。将测试计划输出为 spec.md 测试计划章节的内容,不进入 Step 4。

Step 4: 逐个生成测试

仅完整流程和快速补测试执行本步骤。

4.1 加载编码规范(🚨 强制前置)
规范何时加载
bp-coding-best-practices始终
std-cpp.cc/.cpp/.h 文件
std-go.go 文件

根据项目需要,额外加载其他编码规范 skill。

4.2 逐个生成

对每个测试任务生成测试代码。每个测试必须覆盖三类场景:

  1. 正常路径 — happy path
  2. 边界条件 — 基于 Step 3 选出的 boundary-checklist 条目
  3. 异常场景 — 错误输入、异常处理

生成后更新构建配置,复用项目现有的测试基类和断言工具(不要自己造)。

每完成一个任务,标记 [completed],继续下一个。

Step 5: 收尾流程

仅完整流程执行本步骤。

前置条件:所有测试用例已通过。

提示用户进入 workflow-code-review 进行 AI 代码评审(同时评审功能代码和测试代码):

自测已全部通过。

推荐下一步:
- 说"CR"或"代码评审"进入 AI 代码评审阶段

强制规则

  1. 测试计划必须经用户确认后才能生成代码
  2. 必须覆盖三类场景:正常路径 + 边界条件 + 异常场景
  3. 必须应用 boundary-checklist:Step 3 中读取并选择适用条目
  4. 必须可编译运行:包含所有必要头文件/导入,更新构建配置
  5. 复用现有基础设施:使用项目的测试基类和断言工具,不要自己造
  6. 测试全部通过才能推进:编译失败或用例未通过时,先修复,确认全部 PASS 后才可进入 CR

© davidYichengWei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/workflow-test-generation of davidYichengWei/agentic-engineering-framework.

  • SKILL.md
  • reference/boundary-checklist.md

Open the folder on GitHubat commit 1f7ac0f

Compare with similar skills

Workflow Test Generation 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.

Workflow Test Generation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Workflow Test Generation this skilldavidYichengWei/agentic-engineering-framework158—~580Automated safety check: PassMIT
Designing TestsCloudAI-X/opencode-workflow275—~2.9kAutomated safety check: PassMIT
TDD Guidealirezarezvani/claude-code-skill-factory8801 repos~2.7kAutomated safety check: PassMIT
Automated Test Planningtestdouble/han279—~6.7kAutomated safety check: PassMIT
TDDparcadei/Continuous-Claude-v33.9k1 repos~2.3kAutomated safety check: PassMIT
Manual Test Planningtestdouble/han279—~2.9kAutomated safety check: PassMIT

Similar skills

  • Designing Tests

    CloudAI-X/opencode-workflow

    Guides test strategy, TDD/BDD approaches, test coverage planning, and testing best practices.

    275 GitHub stars~2.9k tokensUpdated 9 mo ago
    Testing & QAAuto-check passed
  • TDD Guide

    alirezarezvani/claude-code-skill-factory

    Comprehensive Test Driven Development guide for engineering subagents with multi-framework support, coverage analysis, and intelligent test generation

    880 GitHub starsUsed in 1 repo~2.7k tokens
    Testing & QAAuto-check passed
  • Produce a standalone test plan by analyzing code for test coverage gaps and edge cases.

    279 GitHub stars~6.7k tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • TDD

    parcadei/Continuous-Claude-v3

    Test-driven development workflow with philosophy guide - plan → write tests → implement → validate

    3.9k GitHub starsUsed in 1 repo~2.3k tokens
    Testing & QAAuto-check passed
  • Manual Test Planning

    testdouble/han

    Produce a plain-language manual test plan from the context supplied to it — an executive summary, a high-level list of named tests, and a detail section per test with the steps a person follows by…

    279 GitHub stars~2.9k tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • Shift Left Testing

    proffesor-for-testing/agentic-qe

    Move testing activities earlier in the development lifecycle to catch defects when they're cheapest to fix.

    494 GitHub stars~1.2k tokensUpdated 4 days ago
    Testing & QAAuto-check passed

More from davidYichengWei/agentic-engineering-framework

All 14 skills in this repo
  • Architecture Design Principles

    davidYichengWei/agentic-engineering-framework

    Gives architecture design principles for system design discussions and code review: module boundaries, dependency direction, data ownership and interface rules, plus a checklist.

    158 GitHub stars~545 tokensUpdated 6 mo ago
    Auto-check passed
  • General Coding Best Practices

    davidYichengWei/agentic-engineering-framework

    A checklist of language-neutral rules for writing and reviewing code: naming, function design, control flow, resource safety, comments and logging.

    158 GitHub stars~631 tokensUpdated 6 mo ago
    Auto-check passed
  • Component Design Principles

    davidYichengWei/agentic-engineering-framework

    Chinese-language checklists for component-level design: class and module structure, public interfaces, data models, concurrency and error handling.

    158 GitHub stars~1k tokensUpdated 6 mo ago
    Auto-check passed
  • Skill Authoring Guide (Chinese)

    davidYichengWei/agentic-engineering-framework

    Chinese-language guide to writing and improving SKILL.md files: frontmatter rules, concise writing, progressive disclosure, common patterns and a pre-release checklist.

    158 GitHub stars~788 tokensUpdated 6 mo ago
    Auto-check passed
  • Self-Refinement from Corrections

    davidYichengWei/agentic-engineering-framework

    Turns mistakes you correct into proposed updates to persistent Rules and Skills so the same error does not recur in later sessions, triggered automatically or with /reflect.

    158 GitHub stars~575 tokensUpdated 6 mo ago
    Auto-check passed
  • Root-Cause Troubleshooting

    davidYichengWei/agentic-engineering-framework

    Diagnoses compile errors, runtime exceptions, failing tests, pipeline failures and production alerts from code and logs, giving a root cause before any fix.

    158 GitHub stars~646 tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about Workflow Test Generation

What does Workflow Test Generation do?

测试生成。基于 spec.md 或被测代码,生成单元测试、集成测试、性能测试。当用户请求生成测试、TDD 模式、或 workflow-code-generation 完成后触发。. Workflow Test Generation is an agent skill from davidYichengWei/agentic-engineering-framework.

When should I use Workflow Test Generation?

Workflow Test Generation fits situations like: tasks that involve Test generation; tasks that involve Test-driven development.

How do I install Workflow Test Generation in Claude Code?

Run `npx skills add davidYichengWei/agentic-engineering-framework --skill workflow-test-generation -a claude-code`. Or copy the skill folder (skills/workflow-test-generation in davidYichengWei/agentic-engineering-framework) into .claude/skills/workflow-test-generation in your project. Claude Code loads it when a task matches its description.

How do I install Workflow Test Generation in Codex?

Run `npx skills add davidYichengWei/agentic-engineering-framework --skill workflow-test-generation -a codex`. Or copy the skill folder (skills/workflow-test-generation in davidYichengWei/agentic-engineering-framework) into .agents/skills/workflow-test-generation in your project. Codex loads it when a task matches its description.

Can I use Workflow Test Generation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davidYichengWei/agentic-engineering-framework --skill workflow-test-generation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/workflow-test-generation, .gemini/skills/workflow-test-generation, .github/skills/workflow-test-generation and .opencode/skills/workflow-test-generation in your project.

What does Workflow Test Generation need to run?

SKILL.md names no scripts, command-line tools or credentials: Workflow Test Generation is instructions for the agent only.

Does Workflow Test Generation access the network?

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.

Is Workflow Test Generation safe to install?

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.

What licence does Workflow Test Generation use?

Workflow Test Generation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Workflow Test Generation use?

About 580 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Workflow Test Generation?

Skills that share tags, products or a category with Workflow Test Generation: Designing Tests (CloudAI-X/opencode-workflow, 275 stars), TDD Guide (alirezarezvani/claude-code-skill-factory, 880 stars), Automated Test Planning (testdouble/han, 279 stars) and TDD (parcadei/Continuous-Claude-v3, 3.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Workflow Test Generation?

davidYichengWei (a GitHub user) maintains it in davidYichengWei/agentic-engineering-framework, which has 158 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on March 25, 2026.

Source: davidYichengWei/agentic-engineering-framework on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.