tdd-guide by alirezarezvani/claude-skills
npx skills add https://github.com/alirezarezvani/claude-skills --skill tdd-guide用于生成测试、分析覆盖率,并指导 Jest、Pytest、JUnit 和 Vitest 的红-绿-重构工作流的测试驱动开发技能。
| 能力 | 描述 |
|---|---|
| 测试生成 | 将需求或代码转换为具有适当结构的测试用例 |
| 覆盖率分析 | 解析 LCOV/JSON/XML 报告,识别缺口,确定修复优先级 |
| TDD 工作流 | 通过验证指导红-绿-重构循环 |
| 框架适配器 | 为 Jest、Pytest、JUnit、Vitest、Mocha 生成测试 |
| 质量评分 | 评估测试隔离性、断言、命名,检测测试异味 |
| 夹具生成 | 创建真实的测试数据、模拟对象和工厂 |
test_generator.py广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
npm test -- --coverage)coverage_analyzer.pytdd_workflow.py --phase red 进行验证tdd_workflow.py --phase green 进行验证| 工具 | 用途 | 用法 |
|---|---|---|
test_generator.py | 从代码/需求生成测试用例 | python scripts/test_generator.py --input source.py --framework pytest |
coverage_analyzer.py | 解析和分析覆盖率报告 | python scripts/coverage_analyzer.py --report lcov.info --threshold 80 |
tdd_workflow.py | 指导红-绿-重构循环 | python scripts/tdd_workflow.py --phase red --test test_auth.py |
framework_adapter.py | 在框架之间转换测试 | python scripts/framework_adapter.py --from jest --to pytest |
fixture_generator.py | 生成测试数据和模拟对象 | python scripts/fixture_generator.py --entity User --count 5 |
metrics_calculator.py | 计算测试质量指标 | python scripts/metrics_calculator.py --tests tests/ |
format_detector.py | 检测语言和框架 | python scripts/format_detector.py --file source.ts |
output_formatter.py | 为 CLI/桌面/CI 格式化输出 | python scripts/output_formatter.py --format markdown |
用于测试生成:
用于覆盖率分析:
用于 TDD 工作流:
| 范围 | 详情 |
|---|---|
| 单元测试焦点 | 集成测试和端到端测试需要不同的模式 |
| 静态分析 | 无法执行测试或测量运行时行为 |
| 语言支持 | 最适合 TypeScript、JavaScript、Python、Java |
| 报告格式 | 仅限 LCOV、JSON、XML;其他格式需要转换 |
| 生成的测试 | 提供脚手架;复杂逻辑需要人工审查 |
何时使用其他工具:
每周安装次数
196
代码仓库
GitHub 星标数
6.7K
首次出现
2026年1月20日
安全审计
安装于
claude-code168
opencode146
gemini-cli145
codex134
cursor124
github-copilot117
Test-driven development skill for generating tests, analyzing coverage, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, and Vitest.
| Capability | Description |
|---|---|
| Test Generation | Convert requirements or code into test cases with proper structure |
| Coverage Analysis | Parse LCOV/JSON/XML reports, identify gaps, prioritize fixes |
| TDD Workflow | Guide red-green-refactor cycles with validation |
| Framework Adapters | Generate tests for Jest, Pytest, JUnit, Vitest, Mocha |
| Quality Scoring | Assess test isolation, assertions, naming, detect test smells |
| Fixture Generation | Create realistic test data, mocks, and factories |
test_generator.py with requirementsnpm test -- --coverage)coverage_analyzer.py on LCOV/JSON/XML reporttdd_workflow.py --phase red to validatetdd_workflow.py --phase green to validate| Tool | Purpose | Usage |
|---|---|---|
test_generator.py | Generate test cases from code/requirements | python scripts/test_generator.py --input source.py --framework pytest |
coverage_analyzer.py | Parse and analyze coverage reports | python scripts/coverage_analyzer.py --report lcov.info --threshold 80 |
tdd_workflow.py | Guide red-green-refactor cycles | python scripts/tdd_workflow.py --phase red --test test_auth.py |
For Test Generation:
For Coverage Analysis:
For TDD Workflow:
| Scope | Details |
|---|---|
| Unit test focus | Integration and E2E tests require different patterns |
| Static analysis | Cannot execute tests or measure runtime behavior |
| Language support | Best for TypeScript, JavaScript, Python, Java |
| Report formats | LCOV, JSON, XML only; other formats need conversion |
| Generated tests | Provide scaffolding; require human review for complex logic |
When to use other tools:
Weekly Installs
196
Repository
GitHub Stars
6.7K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
claude-code168
opencode146
gemini-cli145
codex134
cursor124
github-copilot117
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
31,600 周安装
framework_adapter.py | Convert tests between frameworks | python scripts/framework_adapter.py --from jest --to pytest |
fixture_generator.py | Generate test data and mocks | python scripts/fixture_generator.py --entity User --count 5 |
metrics_calculator.py | Calculate test quality metrics | python scripts/metrics_calculator.py --tests tests/ |
format_detector.py | Detect language and framework | python scripts/format_detector.py --file source.ts |
output_formatter.py | Format output for CLI/desktop/CI | python scripts/output_formatter.py --format markdown |