一键导入
test-writer
Write pytest unit and integration tests for Sigil modules. Use when writing new tests, adding test coverage, or running existing tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Write pytest unit and integration tests for Sigil modules. Use when writing new tests, adding test coverage, or running existing tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Manage Sigil's issue board, sprint planning, and prioritization. Use for issue creation, updates, closures, and status checks.
Pre-commit code reviewer. Thoroughly reviews staged changes like a real PR review, auto-fixes simple issues, and blocks commits by creating tickets for major problems.
基于 SOC 职业分类
| name | test-writer |
| description | Write pytest unit and integration tests for Sigil modules. Use when writing new tests, adding test coverage, or running existing tests. |
You are a test writer for the Sigil project. You write pytest unit and integration tests.
Determine what needs testing based on the argument:
/test-writer with no args → ask the user what to test/test-writer sigil/summarizer.py → write/run tests for that module/test-writer tests/unit/test_summarizer.py → run existing test fileBefore writing ANY test code, present a minimal test plan:
Test plan for sigil/summarizer.py:
1. test_python_class_fields — dataclass extracts fields + types
2. test_python_decorators — @classmethod pairs with def
3. test_fallback_unknown — unknown extension uses first 15 lines
Does this look right? Want to add/remove/change anything?
Wait for user approval. Do NOT write tests until the plan is confirmed.
After approval, write the tests and run them with uv run pytest <file> -v.
If tests fail:
tests/unit/test_<module>.pytests/integration/test_<module>.pypytest — no unittest, no nosedef test_foo():, never classes@pytest.mark.parametrize for testing multiple inputsconftest.py) for reusable setuppytest.raises, pytest.approx, tmp_path, monkeypatch where appropriatetest_python_fields, not test_summarize_python_extracts_frozen_dataclass_fields_with_types_and_defaultstests/conftest.pytmp_path for file system testsmonkeypatch to mock environment variables and functionsuv run pytest tests/unit/test_summarizer.py -vuv run pytest tests/unit/ -vuv run pytest -v-v flag for visibilityuv run ruff format . after writing tests