borghei/Claude-Skills / engineering/tdd-guide
tdd-guide
VerifiedGuide red-green-refactor TDD with test generation, coverage-gap analysis, and multi- framework support. Use when writing tests first, analyzing coverage, generating test stubs, or converting tests between Jest, Pytest, JUnit, and Vitest.
| File | Kind | Size |
|---|---|---|
| HOW_TO_USE.md | markdown | 7.0 KB |
| README.md | markdown | 18.0 KB |
| SKILL.md | skill md | 8.9 KB |
| assets/expected_output.json | config | 2.3 KB |
| assets/sample_coverage_gaps.lcov | other | 438 B |
| assets/sample_coverage_report.lcov | other | 615 B |
| assets/sample_input_python.json | config | 1.4 KB |
| assets/sample_input_typescript.json | config | 1.4 KB |
| references/ci-integration.md | markdown | 3.9 KB |
| references/framework-guide.md | markdown | 4.2 KB |
| references/tdd-best-practices.md | markdown | 3.4 KB |
| references/tool-reference.md | markdown | 18.9 KB |
| references/troubleshooting-and-quality.md | markdown | 3.9 KB |
| references/workflows.md | markdown | 1.5 KB |
| scripts/coverage_analyzer.py | script | 15.3 KB |
| scripts/fixture_generator.py | script | 14.0 KB |
| scripts/format_detector.py | script | 11.9 KB |
| scripts/framework_adapter.py | script | 14.5 KB |
| scripts/metrics_calculator.py | script | 15.1 KB |
| scripts/output_formatter.py | script | 12.4 KB |
| scripts/tdd.py | script | 7.5 KB |
| scripts/tdd_workflow.py | script | 16.6 KB |
| scripts/test_generator.py | script | 14.4 KB |
assets/sample_input_python.json
View on GitHub{
"language": "python",
"framework": "pytest",
"source_code": "def calculate_discount(price: float, discount_percent: float) -> float:\n \"\"\"Calculate discounted price.\"\"\"\n if price < 0:\n raise ValueError(\"Price cannot be negative\")\n if discount_percent < 0 or discount_percent > 100:\n raise ValueError(\"Discount must be between 0 and 100\")\n \n discount_amount = price * (discount_percent / 100)\n return round(price - discount_amount, 2)",
"requirements": {
"user_stories": [
{
"description": "Calculate discounted price for valid inputs",
"action": "calculate_discount",
"given": ["Price is 100", "Discount is 20%"],
"when": "Discount is calculated",
"then": "Return 80.00",
"error_conditions": [
{
"condition": "negative_price",
"description": "Price is negative",
"error_type": "ValueError"
},
{
"condition": "invalid_discount",
"description": "Discount is out of range",
"error_type": "ValueError"
}
],
"edge_cases": [
{
"scenario": "zero_discount",
"description": "Discount is 0%"
},
{
"scenario": "full_discount",
"description": "Discount is 100%"
}
]
}
]
},
"coverage_threshold": 90
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |