Skip to content

alirezarezvani/claude-code-skill-factory / generated-skills/tdd-guide

tdd-guide

Verified

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

FileKindSize
HOW_TO_USE.mdmarkdown7.0 KB
README.mdmarkdown18.1 KB
SKILL.mdskill md10.7 KB
coverage_analyzer.pyscript15.1 KB
expected_output.jsonconfig2.3 KB
fixture_generator.pyscript14.0 KB
format_detector.pyscript11.9 KB
framework_adapter.pyscript14.5 KB
metrics_calculator.pyscript15.1 KB
output_formatter.pyscript12.4 KB
sample_coverage_report.lcovother615 B
sample_input_python.jsonconfig1.4 KB
sample_input_typescript.jsonconfig1.4 KB
tdd_workflow.pyscript16.6 KB
test_generator.pyscript14.3 KB

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
}
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 321kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 321kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 321kUpdated Claude CodeCodexVerifiedInstall
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: 197kUpdated Claude CodeCodexVerifiedInstall