AgentSkillsCN

test-writer

编写测试用例,以达成覆盖率目标。该功能由4个智能体(分析器、编写器、检查器、修复器)协同运作,迭代生成并修正测试用例。若生产代码需要调整,该功能将以非零退出,并附上详细说明。

SKILL.md
--- frontmatter
name: test-writer
description: Write tests to reach a coverage target. Uses 4 agents (analyzer, writer, checker, fixer) to iteratively generate and fix tests. Exits non-zero with explanation if production code needs changes.

Run to generate tests for a Python file or project:

bash
~/.flatagents/skills/test_writer/run.sh "<target>"

Options

OptionDescriptionDefault
--target=NCoverage percentage to reach80
--max-rounds=NMax test generation rounds3

Examples

bash
# Cover a specific file to 80%
run.sh src/mymodule.py

# Cover entire project to 90%
run.sh --target=90 .

# Cover specific file to 95%
run.sh --target=95 src/utils.py

Exit Codes

CodeMeaning
0Success - coverage target met
1Production code likely has a bug (explanation provided)
2Max iterations reached, tests still failing